1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 VALID_JVM_FEATURES
 658 JVM_FEATURES_custom
 659 JVM_FEATURES_zeroshark
 660 JVM_FEATURES_zero
 661 JVM_FEATURES_minimal
 662 JVM_FEATURES_core
 663 JVM_FEATURES_client
 664 JVM_FEATURES_server
 665 INCLUDE_GRAAL
 666 ELF_LIBS
 667 ELF_CFLAGS
 668 STLPORT_LIB
 669 LIBZIP_CAN_USE_MMAP
 670 LIBDL
 671 LIBM
 672 USE_EXTERNAL_LCMS
 673 LCMS_LIBS
 674 LCMS_CFLAGS
 675 USE_EXTERNAL_LIBZ
 676 USE_EXTERNAL_LIBPNG
 677 PNG_LIBS
 678 PNG_CFLAGS
 679 USE_EXTERNAL_LIBGIF
 680 USE_EXTERNAL_LIBJPEG
 681 LLVM_LIBS
 682 LLVM_LDFLAGS
 683 LLVM_CFLAGS
 684 LLVM_CONFIG
 685 LIBFFI_LIB_FILE
 686 ENABLE_LIBFFI_BUNDLING
 687 LIBFFI_LIBS
 688 LIBFFI_CFLAGS
 689 ALSA_LIBS
 690 ALSA_CFLAGS
 691 FREETYPE_BUNDLE_LIB_PATH
 692 FREETYPE_LIBS
 693 FREETYPE_CFLAGS
 694 CUPS_CFLAGS
 695 X_EXTRA_LIBS
 696 X_LIBS
 697 X_PRE_LIBS
 698 X_CFLAGS
 699 XMKMF
 700 MSVCP_DLL
 701 MSVCR_DLL
 702 LIBCXX
 703 FIXPATH_DETACH_FLAG
 704 FIXPATH
 705 BUILD_GTEST
 706 ENABLE_AOT
 707 INCLUDE_DTRACE
 708 GCOV_ENABLED
 709 ZIP_EXTERNAL_DEBUG_SYMBOLS
 710 COPY_DEBUG_SYMBOLS
 711 COMPILE_WITH_DEBUG_SYMBOLS
 712 CFLAGS_WARNINGS_ARE_ERRORS
 713 BUILD_CC_DISABLE_WARNING_PREFIX
 714 DISABLE_WARNING_PREFIX
 715 HOTSPOT_SET_WARNINGS_AS_ERRORS
 716 WARNINGS_AS_ERRORS
 717 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 718 ZERO_ARCHFLAG
 719 LDFLAGS_TESTEXE
 720 LDFLAGS_TESTLIB
 721 CXXFLAGS_TESTEXE
 722 CXXFLAGS_TESTLIB
 723 CFLAGS_TESTEXE
 724 CFLAGS_TESTLIB
 725 OPENJDK_BUILD_JVM_LIBS
 726 OPENJDK_BUILD_JVM_ASFLAGS
 727 OPENJDK_BUILD_JVM_LDFLAGS
 728 OPENJDK_BUILD_JVM_CFLAGS
 729 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 730 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 731 OPENJDK_BUILD_JDKEXE_LIBS
 732 OPENJDK_BUILD_JDKLIB_LIBS
 733 OPENJDK_BUILD_LDFLAGS_JDKEXE
 734 OPENJDK_BUILD_LDFLAGS_JDKLIB
 735 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 736 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 737 OPENJDK_BUILD_CFLAGS_JDKEXE
 738 OPENJDK_BUILD_CFLAGS_JDKLIB
 739 OPENJDK_BUILD_CXXSTD_CXXFLAG
 740 JVM_LIBS
 741 JVM_ASFLAGS
 742 JVM_LDFLAGS
 743 JVM_CFLAGS
 744 LDFLAGS_HASH_STYLE
 745 LDFLAGS_CXX_JDK
 746 JDKEXE_LIBS
 747 JDKLIB_LIBS
 748 LDFLAGS_JDKEXE
 749 LDFLAGS_JDKLIB
 750 CXXFLAGS_JDKEXE
 751 CXXFLAGS_JDKLIB
 752 CFLAGS_JDKEXE
 753 CFLAGS_JDKLIB
 754 MACOSX_VERSION_MIN
 755 CXXSTD_CXXFLAG
 756 JDK_ARCH_ABI_PROP_NAME
 757 CXX_O_FLAG_SIZE
 758 CXX_O_FLAG_NONE
 759 CXX_O_FLAG_DEBUG
 760 CXX_O_FLAG_NORM
 761 CXX_O_FLAG_HI
 762 CXX_O_FLAG_HIGHEST
 763 CXX_O_FLAG_HIGHEST_JVM
 764 C_O_FLAG_SIZE
 765 C_O_FLAG_NONE
 766 C_O_FLAG_DEBUG
 767 C_O_FLAG_NORM
 768 C_O_FLAG_HI
 769 C_O_FLAG_HIGHEST
 770 C_O_FLAG_HIGHEST_JVM
 771 JVM_CFLAGS_SYMBOLS
 772 CXXFLAGS_DEBUG_SYMBOLS
 773 CFLAGS_DEBUG_SYMBOLS
 774 CXX_FLAG_DEPS
 775 C_FLAG_DEPS
 776 SHARED_LIBRARY_FLAGS
 777 SET_SHARED_LIBRARY_MAPFILE
 778 SET_SHARED_LIBRARY_NAME
 779 SET_SHARED_LIBRARY_ORIGIN
 780 SET_EXECUTABLE_ORIGIN
 781 CXX_FLAG_REORDER
 782 C_FLAG_REORDER
 783 JVM_RCFLAGS
 784 RC_FLAGS
 785 AR_OUT_OPTION
 786 LD_OUT_OPTION
 787 EXE_OUT_OPTION
 788 CC_OUT_OPTION
 789 STRIPFLAGS
 790 ARFLAGS
 791 COMPILER_BINDCMD_FILE_FLAG
 792 COMPILER_COMMAND_FILE_FLAG
 793 COMPILER_TARGET_BITS_FLAG
 794 JT_HOME
 795 JTREGEXE
 796 HOTSPOT_TOOLCHAIN_TYPE
 797 USING_BROKEN_SUSE_LD
 798 PACKAGE_PATH
 799 BUILD_AS
 800 BUILD_LDCXX
 801 BUILD_LD
 802 BUILD_STRIP
 803 BUILD_OBJCOPY
 804 BUILD_AR
 805 BUILD_NM
 806 BUILD_CXX
 807 BUILD_CC
 808 BUILD_SYSROOT_LDFLAGS
 809 BUILD_SYSROOT_CFLAGS
 810 ac_ct_OBJDUMP
 811 OBJDUMP
 812 ac_ct_OBJCOPY
 813 OBJCOPY
 814 ac_ct_NM
 815 ac_ct_STRIP
 816 GNM
 817 NM
 818 STRIP
 819 MSBUILD
 820 DUMPBIN
 821 RC
 822 MT
 823 LIPO
 824 ac_ct_AR
 825 AR
 826 AS
 827 LDCXX
 828 LD
 829 CXXCPP
 830 CPP
 831 CXX_VERSION_NUMBER
 832 CC_VERSION_NUMBER
 833 ac_ct_CXX
 834 CXXFLAGS
 835 CXX
 836 TOOLCHAIN_PATH_CXX
 837 POTENTIAL_CXX
 838 OBJEXT
 839 EXEEXT
 840 ac_ct_CC
 841 CPPFLAGS
 842 LDFLAGS
 843 CFLAGS
 844 CC
 845 TOOLCHAIN_PATH_CC
 846 POTENTIAL_CC
 847 TOOLCHAIN_VERSION
 848 VS_LIB
 849 VS_INCLUDE
 850 VS_PATH
 851 CYGWIN_LINK
 852 SYSROOT_LDFLAGS
 853 SYSROOT_CFLAGS
 854 EXTRA_LDFLAGS
 855 EXTRA_CXXFLAGS
 856 EXTRA_CFLAGS
 857 EXE_SUFFIX
 858 OBJ_SUFFIX
 859 STATIC_LIBRARY
 860 SHARED_LIBRARY
 861 STATIC_LIBRARY_SUFFIX
 862 SHARED_LIBRARY_SUFFIX
 863 LIBRARY_PREFIX
 864 TOOLCHAIN_TYPE
 865 STATIC_BUILD
 866 IMPORT_MODULES_MAKE
 867 IMPORT_MODULES_SRC
 868 IMPORT_MODULES_MAN
 869 IMPORT_MODULES_LEGAL
 870 IMPORT_MODULES_CONF
 871 IMPORT_MODULES_LIBS
 872 IMPORT_MODULES_CMDS
 873 IMPORT_MODULES_CLASSES
 874 BUILD_OUTPUT
 875 JDK_TOPDIR
 876 NASHORN_TOPDIR
 877 HOTSPOT_TOPDIR
 878 JAXWS_TOPDIR
 879 JAXP_TOPDIR
 880 CORBA_TOPDIR
 881 LANGTOOLS_TOPDIR
 882 EXTERNAL_BUILDJDK
 883 BUILD_JDK
 884 CREATE_BUILDJDK
 885 JLINK
 886 JMOD
 887 BOOT_JDK_BITS
 888 JAVAC_FLAGS
 889 BOOT_JDK_MODULAR
 890 BOOT_JDK_SOURCETARGET
 891 JARSIGNER
 892 JAR
 893 JAVAH
 894 JAVAC
 895 JAVA
 896 BOOT_JDK
 897 JAVA_CHECK
 898 JAVAC_CHECK
 899 VERSION_IS_GA
 900 VERSION_SHORT
 901 VERSION_STRING
 902 VERSION_NUMBER_FOUR_POSITIONS
 903 VERSION_NUMBER
 904 VERSION_OPT
 905 VERSION_BUILD
 906 VERSION_PRE
 907 VERSION_PATCH
 908 VERSION_SECURITY
 909 VERSION_MINOR
 910 VERSION_MAJOR
 911 MACOSX_BUNDLE_ID_BASE
 912 MACOSX_BUNDLE_NAME_BASE
 913 HOTSPOT_VM_DISTRO
 914 COMPANY_NAME
 915 JDK_RC_PLATFORM_NAME
 916 PRODUCT_SUFFIX
 917 PRODUCT_NAME
 918 LAUNCHER_NAME
 919 JLINK_KEEP_PACKAGED_MODULES
 920 COPYRIGHT_YEAR
 921 COMPRESS_JARS
 922 INCLUDE_SA
 923 UNLIMITED_CRYPTO
 924 CACERTS_FILE
 925 ENABLE_HEADLESS_ONLY
 926 DEFAULT_MAKE_TARGET
 927 OS_VERSION_MICRO
 928 OS_VERSION_MINOR
 929 OS_VERSION_MAJOR
 930 PKG_CONFIG
 931 BASH_ARGS
 932 SETFILE
 933 CODESIGN
 934 XATTR
 935 DSYMUTIL
 936 IS_GNU_TIME
 937 PATCH
 938 DTRACE
 939 TIME
 940 STAT
 941 HG
 942 READELF
 943 OTOOL
 944 LDD
 945 ZIPEXE
 946 UNZIP
 947 TAR_SUPPORTS_TRANSFORM
 948 TAR_INCLUDE_PARAM
 949 TAR_CREATE_EXTRA_PARAM
 950 TAR_TYPE
 951 FIND_DELETE
 952 OUTPUT_SYNC
 953 OUTPUT_SYNC_SUPPORTED
 954 CHECK_TOOLSDIR_MAKE
 955 CHECK_TOOLSDIR_GMAKE
 956 CHECK_MAKE
 957 CHECK_GMAKE
 958 MAKE
 959 PKGHANDLER
 960 CONFIGURESUPPORT_OUTPUTDIR
 961 OUTPUT_ROOT
 962 CONF_NAME
 963 SPEC
 964 SDKROOT
 965 XCODEBUILD
 966 JVM_VARIANT_MAIN
 967 VALID_JVM_VARIANTS
 968 JVM_VARIANTS
 969 DEBUG_LEVEL
 970 HOTSPOT_DEBUG_LEVEL
 971 JDK_VARIANT
 972 USERNAME
 973 CANONICAL_TOPDIR
 974 ORIGINAL_TOPDIR
 975 TOPDIR
 976 PATH_SEP
 977 ZERO_ARCHDEF
 978 HOTSPOT_BUILD_CPU_DEFINE
 979 HOTSPOT_BUILD_CPU_ARCH
 980 HOTSPOT_BUILD_CPU
 981 HOTSPOT_BUILD_OS_TYPE
 982 HOTSPOT_BUILD_OS
 983 OPENJDK_BUILD_BUNDLE_PLATFORM
 984 OPENJDK_BUILD_CPU_BUNDLE
 985 OPENJDK_BUILD_OS_BUNDLE
 986 OPENJDK_BUILD_OS_EXPORT_DIR
 987 OPENJDK_BUILD_CPU_OSARCH
 988 OPENJDK_BUILD_CPU_ISADIR
 989 OPENJDK_BUILD_CPU_LEGACY_LIB
 990 OPENJDK_BUILD_CPU_LEGACY
 991 HOTSPOT_TARGET_CPU_DEFINE
 992 HOTSPOT_TARGET_CPU_ARCH
 993 HOTSPOT_TARGET_CPU
 994 HOTSPOT_TARGET_OS_TYPE
 995 HOTSPOT_TARGET_OS
 996 DEFINE_CROSS_COMPILE_ARCH
 997 LP64
 998 OPENJDK_TARGET_BUNDLE_PLATFORM
 999 OPENJDK_TARGET_CPU_BUNDLE
1000 OPENJDK_TARGET_OS_BUNDLE
1001 OPENJDK_TARGET_OS_EXPORT_DIR
1002 OPENJDK_TARGET_CPU_OSARCH
1003 OPENJDK_TARGET_CPU_ISADIR
1004 OPENJDK_TARGET_CPU_LEGACY_LIB
1005 OPENJDK_TARGET_CPU_LEGACY
1006 REQUIRED_OS_VERSION
1007 REQUIRED_OS_NAME
1008 COMPILE_TYPE
1009 OPENJDK_TARGET_CPU_ENDIAN
1010 OPENJDK_TARGET_CPU_BITS
1011 OPENJDK_TARGET_CPU_ARCH
1012 OPENJDK_TARGET_CPU
1013 OPENJDK_TARGET_OS_ENV
1014 OPENJDK_TARGET_OS_TYPE
1015 OPENJDK_TARGET_OS
1016 OPENJDK_BUILD_CPU_ENDIAN
1017 OPENJDK_BUILD_CPU_BITS
1018 OPENJDK_BUILD_CPU_ARCH
1019 OPENJDK_BUILD_CPU
1020 OPENJDK_BUILD_OS_ENV
1021 OPENJDK_BUILD_OS_TYPE
1022 OPENJDK_BUILD_OS
1023 OPENJDK_BUILD_AUTOCONF_NAME
1024 OPENJDK_TARGET_AUTOCONF_NAME
1025 target_os
1026 target_vendor
1027 target_cpu
1028 target
1029 host_os
1030 host_vendor
1031 host_cpu
1032 host
1033 build_os
1034 build_vendor
1035 build_cpu
1036 build
1037 NICE
1038 CPIO
1039 DF
1040 READLINK
1041 CYGPATH
1042 SED
1043 FGREP
1044 EGREP
1045 GREP
1046 AWK
1047 XARGS
1048 WHICH
1049 WC
1050 UNIQ
1051 UNAME
1052 TR
1053 TOUCH
1054 TEE
1055 TAR
1056 TAIL
1057 SORT
1058 SH
1059 RMDIR
1060 RM
1061 PRINTF
1062 NAWK
1063 MV
1064 MKTEMP
1065 MKDIR
1066 LS
1067 LN
1068 GZIP
1069 GUNZIP
1070 HEAD
1071 FIND
1072 FILE
1073 EXPR
1074 ECHO
1075 DIRNAME
1076 DIFF
1077 DATE
1078 CUT
1079 CP
1080 COMM
1081 CMP
1082 CHMOD
1083 CAT
1084 BASH
1085 BASENAME
1086 DATE_WHEN_CONFIGURED
1087 ORIGINAL_PATH
1088 CONFIGURE_COMMAND_LINE
1089 target_alias
1090 host_alias
1091 build_alias
1092 LIBS
1093 ECHO_T
1094 ECHO_N
1095 ECHO_C
1096 DEFS
1097 mandir
1098 localedir
1099 libdir
1100 psdir
1101 pdfdir
1102 dvidir
1103 htmldir
1104 infodir
1105 docdir
1106 oldincludedir
1107 includedir
1108 localstatedir
1109 sharedstatedir
1110 sysconfdir
1111 datadir
1112 datarootdir
1113 libexecdir
1114 sbindir
1115 bindir
1116 program_transform_name
1117 prefix
1118 exec_prefix
1119 PACKAGE_URL
1120 PACKAGE_BUGREPORT
1121 PACKAGE_STRING
1122 PACKAGE_VERSION
1123 PACKAGE_TARNAME
1124 PACKAGE_NAME
1125 PATH_SEPARATOR
1126 SHELL'
1127 ac_subst_files=''
1128 ac_user_opts='
1129 enable_option_checking
1130 with_target_bits
1131 enable_openjdk_only
1132 with_custom_make_dir
1133 with_jdk_variant
1134 enable_debug
1135 with_debug_level
1136 with_jvm_variants
1137 with_cpu_port
1138 with_devkit
1139 with_sys_root
1140 with_sysroot
1141 with_tools_dir
1142 with_toolchain_path
1143 with_extra_path
1144 with_sdk_name
1145 with_conf_name
1146 with_output_sync
1147 with_default_make_target
1148 enable_headless_only
1149 with_cacerts_file
1150 enable_unlimited_crypto
1151 with_copyright_year
1152 enable_keep_packaged_modules
1153 with_milestone
1154 with_update_version
1155 with_user_release_suffix
1156 with_build_number
1157 with_version_string
1158 with_version_pre
1159 with_version_opt
1160 with_version_build
1161 with_version_major
1162 with_version_minor
1163 with_version_security
1164 with_version_patch
1165 with_boot_jdk
1166 with_build_jdk
1167 with_add_source_root
1168 with_override_source_root
1169 with_adds_and_overrides
1170 with_override_langtools
1171 with_override_corba
1172 with_override_jaxp
1173 with_override_jaxws
1174 with_override_hotspot
1175 with_override_nashorn
1176 with_override_jdk
1177 with_import_hotspot
1178 with_import_modules
1179 enable_static_build
1180 with_toolchain_type
1181 with_extra_cflags
1182 with_extra_cxxflags
1183 with_extra_ldflags
1184 with_toolchain_version
1185 with_build_devkit
1186 with_jtreg
1187 with_abi_profile
1188 enable_warnings_as_errors
1189 with_native_debug_symbols
1190 enable_debug_symbols
1191 enable_zip_debug_info
1192 enable_native_coverage
1193 enable_dtrace
1194 enable_aot
1195 enable_hotspot_gtest
1196 with_stdc__lib
1197 with_msvcr_dll
1198 with_msvcp_dll
1199 with_x
1200 with_cups
1201 with_cups_include
1202 with_freetype
1203 with_freetype_include
1204 with_freetype_lib
1205 with_freetype_src
1206 enable_freetype_bundling
1207 with_alsa
1208 with_alsa_include
1209 with_alsa_lib
1210 with_libffi
1211 with_libffi_include
1212 with_libffi_lib
1213 enable_libffi_bundling
1214 with_libjpeg
1215 with_giflib
1216 with_libpng
1217 with_zlib
1218 with_lcms
1219 with_dxsdk
1220 with_dxsdk_lib
1221 with_dxsdk_include
1222 with_libelf
1223 with_libelf_include
1224 with_libelf_lib
1225 with_jvm_features
1226 with_jvm_interpreter
1227 enable_jtreg_failure_handler
1228 enable_generate_classlist
1229 with_num_cores
1230 with_memory_size
1231 with_jobs
1232 with_test_jobs
1233 with_boot_jdk_jvmargs
1234 with_sjavac_server_java
1235 enable_sjavac
1236 enable_javac_server
1237 enable_icecc
1238 enable_precompiled_headers
1239 enable_ccache
1240 with_ccache_dir
1241 '
1242       ac_precious_vars='build_alias
1243 host_alias
1244 target_alias
1245 BASENAME
1246 BASH
1247 CAT
1248 CHMOD
1249 CMP
1250 COMM
1251 CP
1252 CUT
1253 DATE
1254 DIFF
1255 DIRNAME
1256 ECHO
1257 EXPR
1258 FILE
1259 FIND
1260 HEAD
1261 GUNZIP
1262 GZIP
1263 LN
1264 LS
1265 MKDIR
1266 MKTEMP
1267 MV
1268 NAWK
1269 PRINTF
1270 RM
1271 RMDIR
1272 SH
1273 SORT
1274 TAIL
1275 TAR
1276 TEE
1277 TOUCH
1278 TR
1279 UNAME
1280 UNIQ
1281 WC
1282 WHICH
1283 XARGS
1284 AWK
1285 GREP
1286 EGREP
1287 FGREP
1288 SED
1289 CYGPATH
1290 READLINK
1291 DF
1292 CPIO
1293 NICE
1294 MAKE
1295 UNZIP
1296 ZIPEXE
1297 LDD
1298 OTOOL
1299 READELF
1300 HG
1301 STAT
1302 TIME
1303 DTRACE
1304 PATCH
1305 DSYMUTIL
1306 XATTR
1307 CODESIGN
1308 SETFILE
1309 PKG_CONFIG
1310 JAVA
1311 JAVAC
1312 JAVAH
1313 JAR
1314 JARSIGNER
1315 CC
1316 CFLAGS
1317 LDFLAGS
1318 LIBS
1319 CPPFLAGS
1320 CXX
1321 CXXFLAGS
1322 CCC
1323 CPP
1324 CXXCPP
1325 AS
1326 AR
1327 LIPO
1328 STRIP
1329 NM
1330 GNM
1331 OBJCOPY
1332 OBJDUMP
1333 BUILD_CC
1334 BUILD_CXX
1335 BUILD_NM
1336 BUILD_AR
1337 BUILD_OBJCOPY
1338 BUILD_STRIP
1339 JTREGEXE
1340 XMKMF
1341 FREETYPE_CFLAGS
1342 FREETYPE_LIBS
1343 ALSA_CFLAGS
1344 ALSA_LIBS
1345 LIBFFI_CFLAGS
1346 LIBFFI_LIBS
1347 PNG_CFLAGS
1348 PNG_LIBS
1349 LCMS_CFLAGS
1350 LCMS_LIBS
1351 ELF_CFLAGS
1352 ELF_LIBS
1353 ICECC_CMD
1354 ICECC_CREATE_ENV
1355 ICECC_WRAPPER
1356 CCACHE'
1357 
1358 
1359 # Initialize some variables set by options.
1360 ac_init_help=
1361 ac_init_version=false
1362 ac_unrecognized_opts=
1363 ac_unrecognized_sep=
1364 # The variables have the same names as the options, with
1365 # dashes changed to underlines.
1366 cache_file=/dev/null
1367 exec_prefix=NONE
1368 no_create=
1369 no_recursion=
1370 prefix=NONE
1371 program_prefix=NONE
1372 program_suffix=NONE
1373 program_transform_name=s,x,x,
1374 silent=
1375 site=
1376 srcdir=
1377 verbose=
1378 x_includes=NONE
1379 x_libraries=NONE
1380 
1381 # Installation directory options.
1382 # These are left unexpanded so users can "make install exec_prefix=/foo"
1383 # and all the variables that are supposed to be based on exec_prefix
1384 # by default will actually change.
1385 # Use braces instead of parens because sh, perl, etc. also accept them.
1386 # (The list follows the same order as the GNU Coding Standards.)
1387 bindir='${exec_prefix}/bin'
1388 sbindir='${exec_prefix}/sbin'
1389 libexecdir='${exec_prefix}/libexec'
1390 datarootdir='${prefix}/share'
1391 datadir='${datarootdir}'
1392 sysconfdir='${prefix}/etc'
1393 sharedstatedir='${prefix}/com'
1394 localstatedir='${prefix}/var'
1395 includedir='${prefix}/include'
1396 oldincludedir='/usr/include'
1397 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398 infodir='${datarootdir}/info'
1399 htmldir='${docdir}'
1400 dvidir='${docdir}'
1401 pdfdir='${docdir}'
1402 psdir='${docdir}'
1403 libdir='${exec_prefix}/lib'
1404 localedir='${datarootdir}/locale'
1405 mandir='${datarootdir}/man'
1406 
1407 ac_prev=
1408 ac_dashdash=
1409 for ac_option
1410 do
1411   # If the previous option needs an argument, assign it.
1412   if test -n "$ac_prev"; then
1413     eval $ac_prev=\$ac_option
1414     ac_prev=
1415     continue
1416   fi
1417 
1418   case $ac_option in
1419   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420   *=)   ac_optarg= ;;
1421   *)    ac_optarg=yes ;;
1422   esac
1423 
1424   # Accept the important Cygnus configure options, so we can diagnose typos.
1425 
1426   case $ac_dashdash$ac_option in
1427   --)
1428     ac_dashdash=yes ;;
1429 
1430   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431     ac_prev=bindir ;;
1432   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433     bindir=$ac_optarg ;;
1434 
1435   -build | --build | --buil | --bui | --bu)
1436     ac_prev=build_alias ;;
1437   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438     build_alias=$ac_optarg ;;
1439 
1440   -cache-file | --cache-file | --cache-fil | --cache-fi \
1441   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442     ac_prev=cache_file ;;
1443   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445     cache_file=$ac_optarg ;;
1446 
1447   --config-cache | -C)
1448     cache_file=config.cache ;;
1449 
1450   -datadir | --datadir | --datadi | --datad)
1451     ac_prev=datadir ;;
1452   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453     datadir=$ac_optarg ;;
1454 
1455   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456   | --dataroo | --dataro | --datar)
1457     ac_prev=datarootdir ;;
1458   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460     datarootdir=$ac_optarg ;;
1461 
1462   -disable-* | --disable-*)
1463     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464     # Reject names that are not valid shell variable names.
1465     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466       as_fn_error $? "invalid feature name: $ac_useropt"
1467     ac_useropt_orig=$ac_useropt
1468     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469     case $ac_user_opts in
1470       *"
1471 "enable_$ac_useropt"
1472 "*) ;;
1473       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474          ac_unrecognized_sep=', ';;
1475     esac
1476     eval enable_$ac_useropt=no ;;
1477 
1478   -docdir | --docdir | --docdi | --doc | --do)
1479     ac_prev=docdir ;;
1480   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481     docdir=$ac_optarg ;;
1482 
1483   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484     ac_prev=dvidir ;;
1485   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486     dvidir=$ac_optarg ;;
1487 
1488   -enable-* | --enable-*)
1489     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490     # Reject names that are not valid shell variable names.
1491     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492       as_fn_error $? "invalid feature name: $ac_useropt"
1493     ac_useropt_orig=$ac_useropt
1494     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495     case $ac_user_opts in
1496       *"
1497 "enable_$ac_useropt"
1498 "*) ;;
1499       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500          ac_unrecognized_sep=', ';;
1501     esac
1502     eval enable_$ac_useropt=\$ac_optarg ;;
1503 
1504   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506   | --exec | --exe | --ex)
1507     ac_prev=exec_prefix ;;
1508   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510   | --exec=* | --exe=* | --ex=*)
1511     exec_prefix=$ac_optarg ;;
1512 
1513   -gas | --gas | --ga | --g)
1514     # Obsolete; use --with-gas.
1515     with_gas=yes ;;
1516 
1517   -help | --help | --hel | --he | -h)
1518     ac_init_help=long ;;
1519   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520     ac_init_help=recursive ;;
1521   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522     ac_init_help=short ;;
1523 
1524   -host | --host | --hos | --ho)
1525     ac_prev=host_alias ;;
1526   -host=* | --host=* | --hos=* | --ho=*)
1527     host_alias=$ac_optarg ;;
1528 
1529   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530     ac_prev=htmldir ;;
1531   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532   | --ht=*)
1533     htmldir=$ac_optarg ;;
1534 
1535   -includedir | --includedir | --includedi | --included | --include \
1536   | --includ | --inclu | --incl | --inc)
1537     ac_prev=includedir ;;
1538   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539   | --includ=* | --inclu=* | --incl=* | --inc=*)
1540     includedir=$ac_optarg ;;
1541 
1542   -infodir | --infodir | --infodi | --infod | --info | --inf)
1543     ac_prev=infodir ;;
1544   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545     infodir=$ac_optarg ;;
1546 
1547   -libdir | --libdir | --libdi | --libd)
1548     ac_prev=libdir ;;
1549   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550     libdir=$ac_optarg ;;
1551 
1552   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553   | --libexe | --libex | --libe)
1554     ac_prev=libexecdir ;;
1555   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556   | --libexe=* | --libex=* | --libe=*)
1557     libexecdir=$ac_optarg ;;
1558 
1559   -localedir | --localedir | --localedi | --localed | --locale)
1560     ac_prev=localedir ;;
1561   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562     localedir=$ac_optarg ;;
1563 
1564   -localstatedir | --localstatedir | --localstatedi | --localstated \
1565   | --localstate | --localstat | --localsta | --localst | --locals)
1566     ac_prev=localstatedir ;;
1567   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569     localstatedir=$ac_optarg ;;
1570 
1571   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572     ac_prev=mandir ;;
1573   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574     mandir=$ac_optarg ;;
1575 
1576   -nfp | --nfp | --nf)
1577     # Obsolete; use --without-fp.
1578     with_fp=no ;;
1579 
1580   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581   | --no-cr | --no-c | -n)
1582     no_create=yes ;;
1583 
1584   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586     no_recursion=yes ;;
1587 
1588   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590   | --oldin | --oldi | --old | --ol | --o)
1591     ac_prev=oldincludedir ;;
1592   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595     oldincludedir=$ac_optarg ;;
1596 
1597   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598     ac_prev=prefix ;;
1599   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600     prefix=$ac_optarg ;;
1601 
1602   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603   | --program-pre | --program-pr | --program-p)
1604     ac_prev=program_prefix ;;
1605   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607     program_prefix=$ac_optarg ;;
1608 
1609   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610   | --program-suf | --program-su | --program-s)
1611     ac_prev=program_suffix ;;
1612   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614     program_suffix=$ac_optarg ;;
1615 
1616   -program-transform-name | --program-transform-name \
1617   | --program-transform-nam | --program-transform-na \
1618   | --program-transform-n | --program-transform- \
1619   | --program-transform | --program-transfor \
1620   | --program-transfo | --program-transf \
1621   | --program-trans | --program-tran \
1622   | --progr-tra | --program-tr | --program-t)
1623     ac_prev=program_transform_name ;;
1624   -program-transform-name=* | --program-transform-name=* \
1625   | --program-transform-nam=* | --program-transform-na=* \
1626   | --program-transform-n=* | --program-transform-=* \
1627   | --program-transform=* | --program-transfor=* \
1628   | --program-transfo=* | --program-transf=* \
1629   | --program-trans=* | --program-tran=* \
1630   | --progr-tra=* | --program-tr=* | --program-t=*)
1631     program_transform_name=$ac_optarg ;;
1632 
1633   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634     ac_prev=pdfdir ;;
1635   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636     pdfdir=$ac_optarg ;;
1637 
1638   -psdir | --psdir | --psdi | --psd | --ps)
1639     ac_prev=psdir ;;
1640   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641     psdir=$ac_optarg ;;
1642 
1643   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644   | -silent | --silent | --silen | --sile | --sil)
1645     silent=yes ;;
1646 
1647   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648     ac_prev=sbindir ;;
1649   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650   | --sbi=* | --sb=*)
1651     sbindir=$ac_optarg ;;
1652 
1653   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655   | --sharedst | --shareds | --shared | --share | --shar \
1656   | --sha | --sh)
1657     ac_prev=sharedstatedir ;;
1658   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661   | --sha=* | --sh=*)
1662     sharedstatedir=$ac_optarg ;;
1663 
1664   -site | --site | --sit)
1665     ac_prev=site ;;
1666   -site=* | --site=* | --sit=*)
1667     site=$ac_optarg ;;
1668 
1669   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670     ac_prev=srcdir ;;
1671   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672     srcdir=$ac_optarg ;;
1673 
1674   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675   | --syscon | --sysco | --sysc | --sys | --sy)
1676     ac_prev=sysconfdir ;;
1677   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679     sysconfdir=$ac_optarg ;;
1680 
1681   -target | --target | --targe | --targ | --tar | --ta | --t)
1682     ac_prev=target_alias ;;
1683   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684     target_alias=$ac_optarg ;;
1685 
1686   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687     verbose=yes ;;
1688 
1689   -version | --version | --versio | --versi | --vers | -V)
1690     ac_init_version=: ;;
1691 
1692   -with-* | --with-*)
1693     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694     # Reject names that are not valid shell variable names.
1695     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696       as_fn_error $? "invalid package name: $ac_useropt"
1697     ac_useropt_orig=$ac_useropt
1698     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699     case $ac_user_opts in
1700       *"
1701 "with_$ac_useropt"
1702 "*) ;;
1703       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704          ac_unrecognized_sep=', ';;
1705     esac
1706     eval with_$ac_useropt=\$ac_optarg ;;
1707 
1708   -without-* | --without-*)
1709     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710     # Reject names that are not valid shell variable names.
1711     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712       as_fn_error $? "invalid package name: $ac_useropt"
1713     ac_useropt_orig=$ac_useropt
1714     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715     case $ac_user_opts in
1716       *"
1717 "with_$ac_useropt"
1718 "*) ;;
1719       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720          ac_unrecognized_sep=', ';;
1721     esac
1722     eval with_$ac_useropt=no ;;
1723 
1724   --x)
1725     # Obsolete; use --with-x.
1726     with_x=yes ;;
1727 
1728   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729   | --x-incl | --x-inc | --x-in | --x-i)
1730     ac_prev=x_includes ;;
1731   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733     x_includes=$ac_optarg ;;
1734 
1735   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737     ac_prev=x_libraries ;;
1738   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740     x_libraries=$ac_optarg ;;
1741 
1742   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743 Try \`$0 --help' for more information"
1744     ;;
1745 
1746   *=*)
1747     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748     # Reject names that are not valid shell variable names.
1749     case $ac_envvar in #(
1750       '' | [0-9]* | *[!_$as_cr_alnum]* )
1751       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752     esac
1753     eval $ac_envvar=\$ac_optarg
1754     export $ac_envvar ;;
1755 
1756   *)
1757     # FIXME: should be removed in autoconf 3.0.
1758     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762     ;;
1763 
1764   esac
1765 done
1766 
1767 if test -n "$ac_prev"; then
1768   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769   as_fn_error $? "missing argument to $ac_option"
1770 fi
1771 
1772 if test -n "$ac_unrecognized_opts"; then
1773   case $enable_option_checking in
1774     no) ;;
1775     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777   esac
1778 fi
1779 
1780 # Check all directory arguments for consistency.
1781 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782                 datadir sysconfdir sharedstatedir localstatedir includedir \
1783                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784                 libdir localedir mandir
1785 do
1786   eval ac_val=\$$ac_var
1787   # Remove trailing slashes.
1788   case $ac_val in
1789     */ )
1790       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791       eval $ac_var=\$ac_val;;
1792   esac
1793   # Be sure to have absolute directory names.
1794   case $ac_val in
1795     [\\/$]* | ?:[\\/]* )  continue;;
1796     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797   esac
1798   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799 done
1800 
1801 # There might be people who depend on the old broken behavior: `$host'
1802 # used to hold the argument of --host etc.
1803 # FIXME: To remove some day.
1804 build=$build_alias
1805 host=$host_alias
1806 target=$target_alias
1807 
1808 # FIXME: To remove some day.
1809 if test "x$host_alias" != x; then
1810   if test "x$build_alias" = x; then
1811     cross_compiling=maybe
1812   elif test "x$build_alias" != "x$host_alias"; then
1813     cross_compiling=yes
1814   fi
1815 fi
1816 
1817 ac_tool_prefix=
1818 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819 
1820 test "$silent" = yes && exec 6>/dev/null
1821 
1822 
1823 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824 ac_ls_di=`ls -di .` &&
1825 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826   as_fn_error $? "working directory cannot be determined"
1827 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828   as_fn_error $? "pwd does not report name of working directory"
1829 
1830 
1831 # Find the source files, if location was not specified.
1832 if test -z "$srcdir"; then
1833   ac_srcdir_defaulted=yes
1834   # Try the directory containing this script, then the parent directory.
1835   ac_confdir=`$as_dirname -- "$as_myself" ||
1836 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837          X"$as_myself" : 'X\(//\)[^/]' \| \
1838          X"$as_myself" : 'X\(//\)$' \| \
1839          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840 $as_echo X"$as_myself" |
1841     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842             s//\1/
1843             q
1844           }
1845           /^X\(\/\/\)[^/].*/{
1846             s//\1/
1847             q
1848           }
1849           /^X\(\/\/\)$/{
1850             s//\1/
1851             q
1852           }
1853           /^X\(\/\).*/{
1854             s//\1/
1855             q
1856           }
1857           s/.*/./; q'`
1858   srcdir=$ac_confdir
1859   if test ! -r "$srcdir/$ac_unique_file"; then
1860     srcdir=..
1861   fi
1862 else
1863   ac_srcdir_defaulted=no
1864 fi
1865 if test ! -r "$srcdir/$ac_unique_file"; then
1866   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868 fi
1869 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870 ac_abs_confdir=`(
1871         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872         pwd)`
1873 # When building in place, set srcdir=.
1874 if test "$ac_abs_confdir" = "$ac_pwd"; then
1875   srcdir=.
1876 fi
1877 # Remove unnecessary trailing slashes from srcdir.
1878 # Double slashes in file names in object file debugging info
1879 # mess up M-x gdb in Emacs.
1880 case $srcdir in
1881 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882 esac
1883 for ac_var in $ac_precious_vars; do
1884   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885   eval ac_env_${ac_var}_value=\$${ac_var}
1886   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888 done
1889 
1890 #
1891 # Report the --help message.
1892 #
1893 if test "$ac_init_help" = "long"; then
1894   # Omit some internal or obsolete options to make the list less imposing.
1895   # This message is too long to be a string in the A/UX 3.1 sh.
1896   cat <<_ACEOF
1897 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898 
1899 Usage: $0 [OPTION]... [VAR=VALUE]...
1900 
1901 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902 VAR=VALUE.  See below for descriptions of some of the useful variables.
1903 
1904 Defaults for the options are specified in brackets.
1905 
1906 Configuration:
1907   -h, --help              display this help and exit
1908       --help=short        display options specific to this package
1909       --help=recursive    display the short help of all the included packages
1910   -V, --version           display version information and exit
1911   -q, --quiet, --silent   do not print \`checking ...' messages
1912       --cache-file=FILE   cache test results in FILE [disabled]
1913   -C, --config-cache      alias for \`--cache-file=config.cache'
1914   -n, --no-create         do not create output files
1915       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916 
1917 Installation directories:
1918   --prefix=PREFIX         install architecture-independent files in PREFIX
1919                           [$ac_default_prefix]
1920   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                           [PREFIX]
1922 
1923 By default, \`make install' will install all the files in
1924 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926 for instance \`--prefix=\$HOME'.
1927 
1928 For better control, use the options below.
1929 
1930 Fine tuning of the installation directories:
1931   --bindir=DIR            user executables [EPREFIX/bin]
1932   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933   --libexecdir=DIR        program executables [EPREFIX/libexec]
1934   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937   --libdir=DIR            object code libraries [EPREFIX/lib]
1938   --includedir=DIR        C header files [PREFIX/include]
1939   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942   --infodir=DIR           info documentation [DATAROOTDIR/info]
1943   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944   --mandir=DIR            man documentation [DATAROOTDIR/man]
1945   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946   --htmldir=DIR           html documentation [DOCDIR]
1947   --dvidir=DIR            dvi documentation [DOCDIR]
1948   --pdfdir=DIR            pdf documentation [DOCDIR]
1949   --psdir=DIR             ps documentation [DOCDIR]
1950 _ACEOF
1951 
1952   cat <<\_ACEOF
1953 
1954 X features:
1955   --x-includes=DIR    X include files are in DIR
1956   --x-libraries=DIR   X library files are in DIR
1957 
1958 System types:
1959   --build=BUILD     configure for building on BUILD [guessed]
1960   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961   --target=TARGET   configure for building compilers for TARGET [HOST]
1962 _ACEOF
1963 fi
1964 
1965 if test -n "$ac_init_help"; then
1966   case $ac_init_help in
1967      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968    esac
1969   cat <<\_ACEOF
1970 
1971 Optional Features:
1972   --disable-option-checking  ignore unrecognized --enable/--with options
1973   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975   --enable-openjdk-only   suppress building custom source even if present
1976                           [disabled]
1977   --enable-debug          set the debug level to fastdebug (shorthand for
1978                           --with-debug-level=fastdebug) [disabled]
1979   --enable-headless-only  only build headless (no GUI) support [disabled]
1980   --disable-unlimited-crypto
1981                           Disable unlimited crypto policy [enabled]
1982   --disable-keep-packaged-modules
1983                           Do not keep packaged modules in jdk image [enable]
1984   --enable-static-build   enable static library build [disabled]
1985   --disable-warnings-as-errors
1986                           do not consider native warnings to be an error
1987                           [enabled]
1988   --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                           compatibility and is ignored
1990   --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                           compatibility and is ignored
1992   --enable-native-coverage
1993                           enable native compilation with code coverage
1994                           data[disabled]
1995   --enable-dtrace[=yes/no/auto]
1996                           enable dtrace. Default is auto, where dtrace is
1997                           enabled if all dependencies are present.
1998   --enable-aot[=yes/no/auto]
1999                           enable ahead of time compilation feature. Default is
2000                           auto, where aot is enabled if all dependencies are
2001                           present.
2002   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003   --disable-freetype-bundling
2004                           disable bundling of the freetype library with the
2005                           build result [enabled on Windows or when using
2006                           --with-freetype, disabled otherwise]
2007   --enable-libffi-bundling
2008                           enable bundling of libffi.so to make the built JDK
2009                           runnable on more systems
2010   --enable-jtreg-failure-handler
2011                           forces build of the jtreg failure handler to be
2012                           enabled, missing dependencies become fatal errors.
2013                           Default is auto, where the failure handler is built
2014                           if all dependencies are present and otherwise just
2015                           disabled.
2016   --disable-generate-classlist
2017                           forces enabling or disabling of the generation of a
2018                           CDS classlist at build time. Default is to generate
2019                           it when either the server or client JVMs are built.
2020   --enable-sjavac         use sjavac to do fast incremental compiles
2021                           [disabled]
2022   --disable-javac-server  disable javac server [enabled]
2023   --enable-icecc          enable distribted compilation of native code using
2024                           icecc/icecream [disabled]
2025   --disable-precompiled-headers
2026                           disable using precompiled headers when compiling C++
2027                           [enabled]
2028   --enable-ccache         enable using ccache to speed up recompilations
2029                           [disabled]
2030 
2031 Optional Packages:
2032   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                           support it), e.g. --with-target-bits=32 [guessed]
2036   --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                           compatibility and is ignored
2038   --with-jdk-variant      JDK variant to build (normal) [normal]
2039   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                           optimized) [release]
2041   --with-jvm-variants     JVM variants (separated by commas) to build
2042                           (server,client,minimal,core,zero,zeroshark,custom)
2043                           [server]
2044   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                           (arm64,aarch64) [aarch64]
2046   --with-devkit           use this devkit for compilers, tools and resources
2047   --with-sys-root         alias for --with-sysroot for backwards compatability
2048   --with-sysroot          use this directory as sysroot
2049   --with-tools-dir        alias for --with-toolchain-path for backwards
2050                           compatibility
2051   --with-toolchain-path   prepend these directories when searching for
2052                           toolchain binaries (compilers etc)
2053   --with-extra-path       prepend these directories to the default path
2054   --with-sdk-name         use the platform SDK of the given name. [macosx]
2055   --with-conf-name        use this as the name of the configuration [generated
2056                           from important configuration options]
2057   --with-output-sync      set make output sync type if supported by make.
2058                           [recurse]
2059   --with-default-make-target
2060                           set the default make target [exploded-image]
2061   --with-cacerts-file     specify alternative cacerts file
2062   --with-copyright-year   Set copyright year value for build [current year]
2063   --with-milestone        Deprecated. Option is kept for backwards
2064                           compatibility and is ignored
2065   --with-update-version   Deprecated. Option is kept for backwards
2066                           compatibility and is ignored
2067   --with-user-release-suffix
2068                           Deprecated. Option is kept for backwards
2069                           compatibility and is ignored
2070   --with-build-number     Deprecated. Option is kept for backwards
2071                           compatibility and is ignored
2072   --with-version-string   Set version string [calculated]
2073   --with-version-pre      Set the base part of the version 'PRE' field
2074                           (pre-release identifier) ['internal']
2075   --with-version-opt      Set version 'OPT' field (build metadata)
2076                           [<timestamp>.<user>.<dirname>]
2077   --with-version-build    Set version 'BUILD' field (build number) [not
2078                           specified]
2079   --with-version-major    Set version 'MAJOR' field (first number) [current
2080                           source value]
2081   --with-version-minor    Set version 'MINOR' field (second number) [current
2082                           source value]
2083   --with-version-security Set version 'SECURITY' field (third number) [current
2084                           source value]
2085   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                           specified]
2087   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088   --with-build-jdk        path to JDK of same version as is being built[the
2089                           newly built JDK]
2090   --with-add-source-root  Deprecated. Option is kept for backwards
2091                           compatibility and is ignored
2092   --with-override-source-root
2093                           Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-adds-and-overrides
2096                           Deprecated. Option is kept for backwards
2097                           compatibility and is ignored
2098   --with-override-langtools
2099                           Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-corba   Deprecated. Option is kept for backwards
2102                           compatibility and is ignored
2103   --with-override-jaxp    Deprecated. Option is kept for backwards
2104                           compatibility and is ignored
2105   --with-override-jaxws   Deprecated. Option is kept for backwards
2106                           compatibility and is ignored
2107   --with-override-hotspot Deprecated. Option is kept for backwards
2108                           compatibility and is ignored
2109   --with-override-nashorn Deprecated. Option is kept for backwards
2110                           compatibility and is ignored
2111   --with-override-jdk     Deprecated. Option is kept for backwards
2112                           compatibility and is ignored
2113   --with-import_hotspot   Deprecated. Option is kept for backwards
2114                           compatibility and is ignored
2115   --with-import-modules   import a set of prebuilt modules either as a zip
2116                           file or an exploded directory
2117   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                           to show possible values [platform dependent]
2119   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121   --with-extra-ldflags    extra flags to be used when linking jdk
2122   --with-toolchain-version
2123                           the version of the toolchain to look for, use
2124                           '--help' to show possible values [platform
2125                           dependent]
2126   --with-build-devkit     Devkit to use for the build platform toolchain
2127   --with-jtreg            Regression Test Harness [probed]
2128   --with-abi-profile      specify ABI profile for ARM builds
2129                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                           [toolchain dependent]
2132   --with-native-debug-symbols
2133                           set the native debug symbol configuration (none,
2134                           internal, external, zipped) [varying]
2135   --with-stdc++lib=<static>,<dynamic>,<default>
2136                           force linking of the C++ runtime on Linux to either
2137                           static or dynamic, default is static with dynamic as
2138                           fallback
2139   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2140                           (Windows only) [probed]
2141   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2142                           (Windows only) [probed]
2143   --with-x                use the X Window System
2144   --with-cups             specify prefix directory for the cups package
2145                           (expecting the headers under PATH/include)
2146   --with-cups-include     specify directory for the cups include files
2147   --with-freetype         specify prefix directory for the freetype package
2148                           (expecting the libraries under PATH/lib and the
2149                           headers under PATH/include)
2150   --with-freetype-include specify directory for the freetype include files
2151   --with-freetype-lib     specify directory for the freetype library
2152   --with-freetype-src     specify directory with freetype sources to
2153                           automatically build the library (experimental,
2154                           Windows-only)
2155   --with-alsa             specify prefix directory for the alsa package
2156                           (expecting the libraries under PATH/lib and the
2157                           headers under PATH/include)
2158   --with-alsa-include     specify directory for the alsa include files
2159   --with-alsa-lib         specify directory for the alsa library
2160   --with-libffi           specify prefix directory for the libffi package
2161                           (expecting the libraries under PATH/lib and the
2162                           headers under PATH/include)
2163   --with-libffi-include   specify directory for the libffi include files
2164   --with-libffi-lib       specify directory for the libffi library
2165   --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                           (system, bundled) [bundled]
2167   --with-giflib           use giflib from build system or OpenJDK source
2168                           (system, bundled) [bundled]
2169   --with-libpng           use libpng from build system or OpenJDK source
2170                           (system, bundled) [bundled]
2171   --with-zlib             use zlib from build system or OpenJDK source
2172                           (system, bundled) [bundled]
2173   --with-lcms             use lcms2 from build system or OpenJDK source
2174                           (system, bundled) [bundled]
2175   --with-dxsdk            Deprecated. Option is kept for backwards
2176                           compatibility and is ignored
2177   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                           compatibility and is ignored
2179   --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                           compatibility and is ignored
2181   --with-libelf           specify prefix directory for the libelf package
2182                           (expecting the libraries under PATH/lib and the
2183                           headers under PATH/include)
2184   --with-libelf-include   specify directory for the libelf include files
2185   --with-libelf-lib       specify directory for the libelf library
2186   --with-jvm-features     additional JVM features to enable (separated by
2187                           comma), use '--help' to show possible values [none]
2188   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2189                           compatibility and is ignored
2190   --with-num-cores        number of cores in the build system, e.g.
2191                           --with-num-cores=8 [probed]
2192   --with-memory-size      memory (in MB) available in the build system, e.g.
2193                           --with-memory-size=1024 [probed]
2194   --with-jobs             number of parallel jobs to let make run [calculated
2195                           based on cores and memory]
2196   --with-test-jobs        number of parallel tests jobs to run [based on build
2197                           jobs]
2198   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2199                           invocations of boot JDK, overriding the default
2200                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2201                           -enableassertions"
2202   --with-sjavac-server-java
2203                           use this java binary for running the sjavac
2204                           background server [Boot JDK java]
2205   --with-ccache-dir       where to store ccache files [~/.ccache]
2206 
2207 Some influential environment variables:
2208   BASENAME    Override default value for BASENAME
2209   BASH        Override default value for BASH
2210   CAT         Override default value for CAT
2211   CHMOD       Override default value for CHMOD
2212   CMP         Override default value for CMP
2213   COMM        Override default value for COMM
2214   CP          Override default value for CP
2215   CUT         Override default value for CUT
2216   DATE        Override default value for DATE
2217   DIFF        Override default value for DIFF
2218   DIRNAME     Override default value for DIRNAME
2219   ECHO        Override default value for ECHO
2220   EXPR        Override default value for EXPR
2221   FILE        Override default value for FILE
2222   FIND        Override default value for FIND
2223   HEAD        Override default value for HEAD
2224   GUNZIP      Override default value for GUNZIP
2225   GZIP        Override default value for GZIP
2226   LN          Override default value for LN
2227   LS          Override default value for LS
2228   MKDIR       Override default value for MKDIR
2229   MKTEMP      Override default value for MKTEMP
2230   MV          Override default value for MV
2231   NAWK        Override default value for NAWK
2232   PRINTF      Override default value for PRINTF
2233   RM          Override default value for RM
2234   RMDIR       Override default value for RMDIR
2235   SH          Override default value for SH
2236   SORT        Override default value for SORT
2237   TAIL        Override default value for TAIL
2238   TAR         Override default value for TAR
2239   TEE         Override default value for TEE
2240   TOUCH       Override default value for TOUCH
2241   TR          Override default value for TR
2242   UNAME       Override default value for UNAME
2243   UNIQ        Override default value for UNIQ
2244   WC          Override default value for WC
2245   WHICH       Override default value for WHICH
2246   XARGS       Override default value for XARGS
2247   AWK         Override default value for AWK
2248   GREP        Override default value for GREP
2249   EGREP       Override default value for EGREP
2250   FGREP       Override default value for FGREP
2251   SED         Override default value for SED
2252   CYGPATH     Override default value for CYGPATH
2253   READLINK    Override default value for READLINK
2254   DF          Override default value for DF
2255   CPIO        Override default value for CPIO
2256   NICE        Override default value for NICE
2257   MAKE        Override default value for MAKE
2258   UNZIP       Override default value for UNZIP
2259   ZIPEXE      Override default value for ZIPEXE
2260   LDD         Override default value for LDD
2261   OTOOL       Override default value for OTOOL
2262   READELF     Override default value for READELF
2263   HG          Override default value for HG
2264   STAT        Override default value for STAT
2265   TIME        Override default value for TIME
2266   DTRACE      Override default value for DTRACE
2267   PATCH       Override default value for PATCH
2268   DSYMUTIL    Override default value for DSYMUTIL
2269   XATTR       Override default value for XATTR
2270   CODESIGN    Override default value for CODESIGN
2271   SETFILE     Override default value for SETFILE
2272   PKG_CONFIG  path to pkg-config utility
2273   JAVA        Override default value for JAVA
2274   JAVAC       Override default value for JAVAC
2275   JAVAH       Override default value for JAVAH
2276   JAR         Override default value for JAR
2277   JARSIGNER   Override default value for JARSIGNER
2278   CC          C compiler command
2279   CFLAGS      C compiler flags
2280   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2281               nonstandard directory <lib dir>
2282   LIBS        libraries to pass to the linker, e.g. -l<library>
2283   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284               you have headers in a nonstandard directory <include dir>
2285   CXX         C++ compiler command
2286   CXXFLAGS    C++ compiler flags
2287   CPP         C preprocessor
2288   CXXCPP      C++ preprocessor
2289   AS          Override default value for AS
2290   AR          Override default value for AR
2291   LIPO        Override default value for LIPO
2292   STRIP       Override default value for STRIP
2293   NM          Override default value for NM
2294   GNM         Override default value for GNM
2295   OBJCOPY     Override default value for OBJCOPY
2296   OBJDUMP     Override default value for OBJDUMP
2297   BUILD_CC    Override default value for BUILD_CC
2298   BUILD_CXX   Override default value for BUILD_CXX
2299   BUILD_NM    Override default value for BUILD_NM
2300   BUILD_AR    Override default value for BUILD_AR
2301   BUILD_OBJCOPY
2302               Override default value for BUILD_OBJCOPY
2303   BUILD_STRIP Override default value for BUILD_STRIP
2304   JTREGEXE    Override default value for JTREGEXE
2305   XMKMF       Path to xmkmf, Makefile generator for X Window System
2306   FREETYPE_CFLAGS
2307               C compiler flags for FREETYPE, overriding pkg-config
2308   FREETYPE_LIBS
2309               linker flags for FREETYPE, overriding pkg-config
2310   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2311   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2312   LIBFFI_CFLAGS
2313               C compiler flags for LIBFFI, overriding pkg-config
2314   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2315   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2316   PNG_LIBS    linker flags for PNG, overriding pkg-config
2317   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2318   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2319   ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2320   ELF_LIBS    linker flags for ELF, overriding pkg-config
2321   ICECC_CMD   Override default value for ICECC_CMD
2322   ICECC_CREATE_ENV
2323               Override default value for ICECC_CREATE_ENV
2324   ICECC_WRAPPER
2325               Override default value for ICECC_WRAPPER
2326   CCACHE      Override default value for CCACHE
2327 
2328 Use these variables to override the choices made by `configure' or to help
2329 it to find libraries and programs with nonstandard names/locations.
2330 
2331 Report bugs to <build-dev@openjdk.java.net>.
2332 OpenJDK home page: <http://openjdk.java.net>.
2333 _ACEOF
2334 ac_status=$?
2335 fi
2336 
2337 if test "$ac_init_help" = "recursive"; then
2338   # If there are subdirs, report their specific --help.
2339   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340     test -d "$ac_dir" ||
2341       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342       continue
2343     ac_builddir=.
2344 
2345 case "$ac_dir" in
2346 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347 *)
2348   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349   # A ".." for each directory in $ac_dir_suffix.
2350   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351   case $ac_top_builddir_sub in
2352   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354   esac ;;
2355 esac
2356 ac_abs_top_builddir=$ac_pwd
2357 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358 # for backward compatibility:
2359 ac_top_builddir=$ac_top_build_prefix
2360 
2361 case $srcdir in
2362   .)  # We are building in place.
2363     ac_srcdir=.
2364     ac_top_srcdir=$ac_top_builddir_sub
2365     ac_abs_top_srcdir=$ac_pwd ;;
2366   [\\/]* | ?:[\\/]* )  # Absolute name.
2367     ac_srcdir=$srcdir$ac_dir_suffix;
2368     ac_top_srcdir=$srcdir
2369     ac_abs_top_srcdir=$srcdir ;;
2370   *) # Relative name.
2371     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372     ac_top_srcdir=$ac_top_build_prefix$srcdir
2373     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374 esac
2375 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376 
2377     cd "$ac_dir" || { ac_status=$?; continue; }
2378     # Check for guested configure.
2379     if test -f "$ac_srcdir/configure.gnu"; then
2380       echo &&
2381       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382     elif test -f "$ac_srcdir/configure"; then
2383       echo &&
2384       $SHELL "$ac_srcdir/configure" --help=recursive
2385     else
2386       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387     fi || ac_status=$?
2388     cd "$ac_pwd" || { ac_status=$?; break; }
2389   done
2390 fi
2391 
2392 test -n "$ac_init_help" && exit $ac_status
2393 if $ac_init_version; then
2394   cat <<\_ACEOF
2395 OpenJDK configure jdk9
2396 generated by GNU Autoconf 2.69
2397 
2398 Copyright (C) 2012 Free Software Foundation, Inc.
2399 This configure script is free software; the Free Software Foundation
2400 gives unlimited permission to copy, distribute and modify it.
2401 _ACEOF
2402   exit
2403 fi
2404 
2405 ## ------------------------ ##
2406 ## Autoconf initialization. ##
2407 ## ------------------------ ##
2408 
2409 # ac_fn_c_try_compile LINENO
2410 # --------------------------
2411 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2412 ac_fn_c_try_compile ()
2413 {
2414   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415   rm -f conftest.$ac_objext
2416   if { { ac_try="$ac_compile"
2417 case "(($ac_try" in
2418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419   *) ac_try_echo=$ac_try;;
2420 esac
2421 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422 $as_echo "$ac_try_echo"; } >&5
2423   (eval "$ac_compile") 2>conftest.err
2424   ac_status=$?
2425   if test -s conftest.err; then
2426     grep -v '^ *+' conftest.err >conftest.er1
2427     cat conftest.er1 >&5
2428     mv -f conftest.er1 conftest.err
2429   fi
2430   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431   test $ac_status = 0; } && {
2432          test -z "$ac_c_werror_flag" ||
2433          test ! -s conftest.err
2434        } && test -s conftest.$ac_objext; then :
2435   ac_retval=0
2436 else
2437   $as_echo "$as_me: failed program was:" >&5
2438 sed 's/^/| /' conftest.$ac_ext >&5
2439 
2440         ac_retval=1
2441 fi
2442   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443   as_fn_set_status $ac_retval
2444 
2445 } # ac_fn_c_try_compile
2446 
2447 # ac_fn_cxx_try_compile LINENO
2448 # ----------------------------
2449 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2450 ac_fn_cxx_try_compile ()
2451 {
2452   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453   rm -f conftest.$ac_objext
2454   if { { ac_try="$ac_compile"
2455 case "(($ac_try" in
2456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457   *) ac_try_echo=$ac_try;;
2458 esac
2459 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460 $as_echo "$ac_try_echo"; } >&5
2461   (eval "$ac_compile") 2>conftest.err
2462   ac_status=$?
2463   if test -s conftest.err; then
2464     grep -v '^ *+' conftest.err >conftest.er1
2465     cat conftest.er1 >&5
2466     mv -f conftest.er1 conftest.err
2467   fi
2468   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469   test $ac_status = 0; } && {
2470          test -z "$ac_cxx_werror_flag" ||
2471          test ! -s conftest.err
2472        } && test -s conftest.$ac_objext; then :
2473   ac_retval=0
2474 else
2475   $as_echo "$as_me: failed program was:" >&5
2476 sed 's/^/| /' conftest.$ac_ext >&5
2477 
2478         ac_retval=1
2479 fi
2480   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481   as_fn_set_status $ac_retval
2482 
2483 } # ac_fn_cxx_try_compile
2484 
2485 # ac_fn_c_try_cpp LINENO
2486 # ----------------------
2487 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488 ac_fn_c_try_cpp ()
2489 {
2490   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491   if { { ac_try="$ac_cpp conftest.$ac_ext"
2492 case "(($ac_try" in
2493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494   *) ac_try_echo=$ac_try;;
2495 esac
2496 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497 $as_echo "$ac_try_echo"; } >&5
2498   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499   ac_status=$?
2500   if test -s conftest.err; then
2501     grep -v '^ *+' conftest.err >conftest.er1
2502     cat conftest.er1 >&5
2503     mv -f conftest.er1 conftest.err
2504   fi
2505   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506   test $ac_status = 0; } > conftest.i && {
2507          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508          test ! -s conftest.err
2509        }; then :
2510   ac_retval=0
2511 else
2512   $as_echo "$as_me: failed program was:" >&5
2513 sed 's/^/| /' conftest.$ac_ext >&5
2514 
2515     ac_retval=1
2516 fi
2517   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518   as_fn_set_status $ac_retval
2519 
2520 } # ac_fn_c_try_cpp
2521 
2522 # ac_fn_cxx_try_cpp LINENO
2523 # ------------------------
2524 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525 ac_fn_cxx_try_cpp ()
2526 {
2527   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528   if { { ac_try="$ac_cpp conftest.$ac_ext"
2529 case "(($ac_try" in
2530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531   *) ac_try_echo=$ac_try;;
2532 esac
2533 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534 $as_echo "$ac_try_echo"; } >&5
2535   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536   ac_status=$?
2537   if test -s conftest.err; then
2538     grep -v '^ *+' conftest.err >conftest.er1
2539     cat conftest.er1 >&5
2540     mv -f conftest.er1 conftest.err
2541   fi
2542   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543   test $ac_status = 0; } > conftest.i && {
2544          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545          test ! -s conftest.err
2546        }; then :
2547   ac_retval=0
2548 else
2549   $as_echo "$as_me: failed program was:" >&5
2550 sed 's/^/| /' conftest.$ac_ext >&5
2551 
2552     ac_retval=1
2553 fi
2554   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555   as_fn_set_status $ac_retval
2556 
2557 } # ac_fn_cxx_try_cpp
2558 
2559 # ac_fn_c_try_link LINENO
2560 # -----------------------
2561 # Try to link conftest.$ac_ext, and return whether this succeeded.
2562 ac_fn_c_try_link ()
2563 {
2564   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565   rm -f conftest.$ac_objext conftest$ac_exeext
2566   if { { ac_try="$ac_link"
2567 case "(($ac_try" in
2568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569   *) ac_try_echo=$ac_try;;
2570 esac
2571 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572 $as_echo "$ac_try_echo"; } >&5
2573   (eval "$ac_link") 2>conftest.err
2574   ac_status=$?
2575   if test -s conftest.err; then
2576     grep -v '^ *+' conftest.err >conftest.er1
2577     cat conftest.er1 >&5
2578     mv -f conftest.er1 conftest.err
2579   fi
2580   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581   test $ac_status = 0; } && {
2582          test -z "$ac_c_werror_flag" ||
2583          test ! -s conftest.err
2584        } && test -s conftest$ac_exeext && {
2585          test "$cross_compiling" = yes ||
2586          test -x conftest$ac_exeext
2587        }; then :
2588   ac_retval=0
2589 else
2590   $as_echo "$as_me: failed program was:" >&5
2591 sed 's/^/| /' conftest.$ac_ext >&5
2592 
2593         ac_retval=1
2594 fi
2595   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597   # interfere with the next link command; also delete a directory that is
2598   # left behind by Apple's compiler.  We do this before executing the actions.
2599   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601   as_fn_set_status $ac_retval
2602 
2603 } # ac_fn_c_try_link
2604 
2605 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606 # ---------------------------------------------------------
2607 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608 # the include files in INCLUDES and setting the cache variable VAR
2609 # accordingly.
2610 ac_fn_cxx_check_header_mongrel ()
2611 {
2612   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613   if eval \${$3+:} false; then :
2614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615 $as_echo_n "checking for $2... " >&6; }
2616 if eval \${$3+:} false; then :
2617   $as_echo_n "(cached) " >&6
2618 fi
2619 eval ac_res=\$$3
2620                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621 $as_echo "$ac_res" >&6; }
2622 else
2623   # Is the header compilable?
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625 $as_echo_n "checking $2 usability... " >&6; }
2626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $4
2629 #include <$2>
2630 _ACEOF
2631 if ac_fn_cxx_try_compile "$LINENO"; then :
2632   ac_header_compiler=yes
2633 else
2634   ac_header_compiler=no
2635 fi
2636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638 $as_echo "$ac_header_compiler" >&6; }
2639 
2640 # Is the header present?
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642 $as_echo_n "checking $2 presence... " >&6; }
2643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644 /* end confdefs.h.  */
2645 #include <$2>
2646 _ACEOF
2647 if ac_fn_cxx_try_cpp "$LINENO"; then :
2648   ac_header_preproc=yes
2649 else
2650   ac_header_preproc=no
2651 fi
2652 rm -f conftest.err conftest.i conftest.$ac_ext
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654 $as_echo "$ac_header_preproc" >&6; }
2655 
2656 # So?  What about this header?
2657 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658   yes:no: )
2659     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663     ;;
2664   no:yes:* )
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675 ( $as_echo "## ----------------------------------------- ##
2676 ## Report this to build-dev@openjdk.java.net ##
2677 ## ----------------------------------------- ##"
2678      ) | sed "s/^/$as_me: WARNING:     /" >&2
2679     ;;
2680 esac
2681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682 $as_echo_n "checking for $2... " >&6; }
2683 if eval \${$3+:} false; then :
2684   $as_echo_n "(cached) " >&6
2685 else
2686   eval "$3=\$ac_header_compiler"
2687 fi
2688 eval ac_res=\$$3
2689                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690 $as_echo "$ac_res" >&6; }
2691 fi
2692   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693 
2694 } # ac_fn_cxx_check_header_mongrel
2695 
2696 # ac_fn_cxx_try_run LINENO
2697 # ------------------------
2698 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699 # that executables *can* be run.
2700 ac_fn_cxx_try_run ()
2701 {
2702   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703   if { { ac_try="$ac_link"
2704 case "(($ac_try" in
2705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706   *) ac_try_echo=$ac_try;;
2707 esac
2708 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709 $as_echo "$ac_try_echo"; } >&5
2710   (eval "$ac_link") 2>&5
2711   ac_status=$?
2712   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714   { { case "(($ac_try" in
2715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716   *) ac_try_echo=$ac_try;;
2717 esac
2718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719 $as_echo "$ac_try_echo"; } >&5
2720   (eval "$ac_try") 2>&5
2721   ac_status=$?
2722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723   test $ac_status = 0; }; }; then :
2724   ac_retval=0
2725 else
2726   $as_echo "$as_me: program exited with status $ac_status" >&5
2727        $as_echo "$as_me: failed program was:" >&5
2728 sed 's/^/| /' conftest.$ac_ext >&5
2729 
2730        ac_retval=$ac_status
2731 fi
2732   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734   as_fn_set_status $ac_retval
2735 
2736 } # ac_fn_cxx_try_run
2737 
2738 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739 # ---------------------------------------------------------
2740 # Tests whether HEADER exists and can be compiled using the include files in
2741 # INCLUDES, setting the cache variable VAR accordingly.
2742 ac_fn_cxx_check_header_compile ()
2743 {
2744   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746 $as_echo_n "checking for $2... " >&6; }
2747 if eval \${$3+:} false; then :
2748   $as_echo_n "(cached) " >&6
2749 else
2750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751 /* end confdefs.h.  */
2752 $4
2753 #include <$2>
2754 _ACEOF
2755 if ac_fn_cxx_try_compile "$LINENO"; then :
2756   eval "$3=yes"
2757 else
2758   eval "$3=no"
2759 fi
2760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761 fi
2762 eval ac_res=\$$3
2763                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764 $as_echo "$ac_res" >&6; }
2765   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766 
2767 } # ac_fn_cxx_check_header_compile
2768 
2769 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770 # ----------------------------------------------
2771 # Tries to find the compile-time value of EXPR in a program that includes
2772 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2773 # computed
2774 ac_fn_cxx_compute_int ()
2775 {
2776   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777   if test "$cross_compiling" = yes; then
2778     # Depending upon the size, compute the lo and hi bounds.
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h.  */
2781 $4
2782 int
2783 main ()
2784 {
2785 static int test_array [1 - 2 * !(($2) >= 0)];
2786 test_array [0] = 0;
2787 return test_array [0];
2788 
2789   ;
2790   return 0;
2791 }
2792 _ACEOF
2793 if ac_fn_cxx_try_compile "$LINENO"; then :
2794   ac_lo=0 ac_mid=0
2795   while :; do
2796     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797 /* end confdefs.h.  */
2798 $4
2799 int
2800 main ()
2801 {
2802 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803 test_array [0] = 0;
2804 return test_array [0];
2805 
2806   ;
2807   return 0;
2808 }
2809 _ACEOF
2810 if ac_fn_cxx_try_compile "$LINENO"; then :
2811   ac_hi=$ac_mid; break
2812 else
2813   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814                         if test $ac_lo -le $ac_mid; then
2815                           ac_lo= ac_hi=
2816                           break
2817                         fi
2818                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819 fi
2820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821   done
2822 else
2823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824 /* end confdefs.h.  */
2825 $4
2826 int
2827 main ()
2828 {
2829 static int test_array [1 - 2 * !(($2) < 0)];
2830 test_array [0] = 0;
2831 return test_array [0];
2832 
2833   ;
2834   return 0;
2835 }
2836 _ACEOF
2837 if ac_fn_cxx_try_compile "$LINENO"; then :
2838   ac_hi=-1 ac_mid=-1
2839   while :; do
2840     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841 /* end confdefs.h.  */
2842 $4
2843 int
2844 main ()
2845 {
2846 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847 test_array [0] = 0;
2848 return test_array [0];
2849 
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 if ac_fn_cxx_try_compile "$LINENO"; then :
2855   ac_lo=$ac_mid; break
2856 else
2857   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858                         if test $ac_mid -le $ac_hi; then
2859                           ac_lo= ac_hi=
2860                           break
2861                         fi
2862                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863 fi
2864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865   done
2866 else
2867   ac_lo= ac_hi=
2868 fi
2869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870 fi
2871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872 # Binary search between lo and hi bounds.
2873 while test "x$ac_lo" != "x$ac_hi"; do
2874   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h.  */
2877 $4
2878 int
2879 main ()
2880 {
2881 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882 test_array [0] = 0;
2883 return test_array [0];
2884 
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 if ac_fn_cxx_try_compile "$LINENO"; then :
2890   ac_hi=$ac_mid
2891 else
2892   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893 fi
2894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895 done
2896 case $ac_lo in #((
2897 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898 '') ac_retval=1 ;;
2899 esac
2900   else
2901     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902 /* end confdefs.h.  */
2903 $4
2904 static long int longval () { return $2; }
2905 static unsigned long int ulongval () { return $2; }
2906 #include <stdio.h>
2907 #include <stdlib.h>
2908 int
2909 main ()
2910 {
2911 
2912   FILE *f = fopen ("conftest.val", "w");
2913   if (! f)
2914     return 1;
2915   if (($2) < 0)
2916     {
2917       long int i = longval ();
2918       if (i != ($2))
2919         return 1;
2920       fprintf (f, "%ld", i);
2921     }
2922   else
2923     {
2924       unsigned long int i = ulongval ();
2925       if (i != ($2))
2926         return 1;
2927       fprintf (f, "%lu", i);
2928     }
2929   /* Do not output a trailing newline, as this causes \r\n confusion
2930      on some platforms.  */
2931   return ferror (f) || fclose (f) != 0;
2932 
2933   ;
2934   return 0;
2935 }
2936 _ACEOF
2937 if ac_fn_cxx_try_run "$LINENO"; then :
2938   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939 else
2940   ac_retval=1
2941 fi
2942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943   conftest.$ac_objext conftest.beam conftest.$ac_ext
2944 rm -f conftest.val
2945 
2946   fi
2947   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948   as_fn_set_status $ac_retval
2949 
2950 } # ac_fn_cxx_compute_int
2951 
2952 # ac_fn_cxx_try_link LINENO
2953 # -------------------------
2954 # Try to link conftest.$ac_ext, and return whether this succeeded.
2955 ac_fn_cxx_try_link ()
2956 {
2957   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958   rm -f conftest.$ac_objext conftest$ac_exeext
2959   if { { ac_try="$ac_link"
2960 case "(($ac_try" in
2961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962   *) ac_try_echo=$ac_try;;
2963 esac
2964 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965 $as_echo "$ac_try_echo"; } >&5
2966   (eval "$ac_link") 2>conftest.err
2967   ac_status=$?
2968   if test -s conftest.err; then
2969     grep -v '^ *+' conftest.err >conftest.er1
2970     cat conftest.er1 >&5
2971     mv -f conftest.er1 conftest.err
2972   fi
2973   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974   test $ac_status = 0; } && {
2975          test -z "$ac_cxx_werror_flag" ||
2976          test ! -s conftest.err
2977        } && test -s conftest$ac_exeext && {
2978          test "$cross_compiling" = yes ||
2979          test -x conftest$ac_exeext
2980        }; then :
2981   ac_retval=0
2982 else
2983   $as_echo "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985 
2986         ac_retval=1
2987 fi
2988   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990   # interfere with the next link command; also delete a directory that is
2991   # left behind by Apple's compiler.  We do this before executing the actions.
2992   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994   as_fn_set_status $ac_retval
2995 
2996 } # ac_fn_cxx_try_link
2997 
2998 # ac_fn_cxx_check_func LINENO FUNC VAR
2999 # ------------------------------------
3000 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3001 ac_fn_cxx_check_func ()
3002 {
3003   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005 $as_echo_n "checking for $2... " >&6; }
3006 if eval \${$3+:} false; then :
3007   $as_echo_n "(cached) " >&6
3008 else
3009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010 /* end confdefs.h.  */
3011 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013 #define $2 innocuous_$2
3014 
3015 /* System header to define __stub macros and hopefully few prototypes,
3016     which can conflict with char $2 (); below.
3017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018     <limits.h> exists even on freestanding compilers.  */
3019 
3020 #ifdef __STDC__
3021 # include <limits.h>
3022 #else
3023 # include <assert.h>
3024 #endif
3025 
3026 #undef $2
3027 
3028 /* Override any GCC internal prototype to avoid an error.
3029    Use char because int might match the return type of a GCC
3030    builtin and then its argument prototype would still apply.  */
3031 #ifdef __cplusplus
3032 extern "C"
3033 #endif
3034 char $2 ();
3035 /* The GNU C library defines this for functions which it implements
3036     to always fail with ENOSYS.  Some functions are actually named
3037     something starting with __ and the normal name is an alias.  */
3038 #if defined __stub_$2 || defined __stub___$2
3039 choke me
3040 #endif
3041 
3042 int
3043 main ()
3044 {
3045 return $2 ();
3046   ;
3047   return 0;
3048 }
3049 _ACEOF
3050 if ac_fn_cxx_try_link "$LINENO"; then :
3051   eval "$3=yes"
3052 else
3053   eval "$3=no"
3054 fi
3055 rm -f core conftest.err conftest.$ac_objext \
3056     conftest$ac_exeext conftest.$ac_ext
3057 fi
3058 eval ac_res=\$$3
3059                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060 $as_echo "$ac_res" >&6; }
3061   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062 
3063 } # ac_fn_cxx_check_func
3064 
3065 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066 # -------------------------------------------------------
3067 # Tests whether HEADER exists and can be compiled using the include files in
3068 # INCLUDES, setting the cache variable VAR accordingly.
3069 ac_fn_c_check_header_compile ()
3070 {
3071   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073 $as_echo_n "checking for $2... " >&6; }
3074 if eval \${$3+:} false; then :
3075   $as_echo_n "(cached) " >&6
3076 else
3077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078 /* end confdefs.h.  */
3079 $4
3080 #include <$2>
3081 _ACEOF
3082 if ac_fn_c_try_compile "$LINENO"; then :
3083   eval "$3=yes"
3084 else
3085   eval "$3=no"
3086 fi
3087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088 fi
3089 eval ac_res=\$$3
3090                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091 $as_echo "$ac_res" >&6; }
3092   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093 
3094 } # ac_fn_c_check_header_compile
3095 cat >config.log <<_ACEOF
3096 This file contains any messages produced by compilers while
3097 running configure, to aid debugging if configure makes a mistake.
3098 
3099 It was created by OpenJDK $as_me jdk9, which was
3100 generated by GNU Autoconf 2.69.  Invocation command line was
3101 
3102   $ $0 $@
3103 
3104 _ACEOF
3105 exec 5>>config.log
3106 {
3107 cat <<_ASUNAME
3108 ## --------- ##
3109 ## Platform. ##
3110 ## --------- ##
3111 
3112 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117 
3118 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120 
3121 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128 
3129 _ASUNAME
3130 
3131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132 for as_dir in $PATH
3133 do
3134   IFS=$as_save_IFS
3135   test -z "$as_dir" && as_dir=.
3136     $as_echo "PATH: $as_dir"
3137   done
3138 IFS=$as_save_IFS
3139 
3140 } >&5
3141 
3142 cat >&5 <<_ACEOF
3143 
3144 
3145 ## ----------- ##
3146 ## Core tests. ##
3147 ## ----------- ##
3148 
3149 _ACEOF
3150 
3151 
3152 # Keep a trace of the command line.
3153 # Strip out --no-create and --no-recursion so they do not pile up.
3154 # Strip out --silent because we don't want to record it for future runs.
3155 # Also quote any args containing shell meta-characters.
3156 # Make two passes to allow for proper duplicate-argument suppression.
3157 ac_configure_args=
3158 ac_configure_args0=
3159 ac_configure_args1=
3160 ac_must_keep_next=false
3161 for ac_pass in 1 2
3162 do
3163   for ac_arg
3164   do
3165     case $ac_arg in
3166     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168     | -silent | --silent | --silen | --sile | --sil)
3169       continue ;;
3170     *\'*)
3171       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172     esac
3173     case $ac_pass in
3174     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175     2)
3176       as_fn_append ac_configure_args1 " '$ac_arg'"
3177       if test $ac_must_keep_next = true; then
3178         ac_must_keep_next=false # Got value, back to normal.
3179       else
3180         case $ac_arg in
3181           *=* | --config-cache | -C | -disable-* | --disable-* \
3182           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184           | -with-* | --with-* | -without-* | --without-* | --x)
3185             case "$ac_configure_args0 " in
3186               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187             esac
3188             ;;
3189           -* ) ac_must_keep_next=true ;;
3190         esac
3191       fi
3192       as_fn_append ac_configure_args " '$ac_arg'"
3193       ;;
3194     esac
3195   done
3196 done
3197 { ac_configure_args0=; unset ac_configure_args0;}
3198 { ac_configure_args1=; unset ac_configure_args1;}
3199 
3200 # When interrupted or exit'd, cleanup temporary files, and complete
3201 # config.log.  We remove comments because anyway the quotes in there
3202 # would cause problems or look ugly.
3203 # WARNING: Use '\'' to represent an apostrophe within the trap.
3204 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205 trap 'exit_status=$?
3206   # Save into config.log some information that might help in debugging.
3207   {
3208     echo
3209 
3210     $as_echo "## ---------------- ##
3211 ## Cache variables. ##
3212 ## ---------------- ##"
3213     echo
3214     # The following way of writing the cache mishandles newlines in values,
3215 (
3216   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217     eval ac_val=\$$ac_var
3218     case $ac_val in #(
3219     *${as_nl}*)
3220       case $ac_var in #(
3221       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223       esac
3224       case $ac_var in #(
3225       _ | IFS | as_nl) ;; #(
3226       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227       *) { eval $ac_var=; unset $ac_var;} ;;
3228       esac ;;
3229     esac
3230   done
3231   (set) 2>&1 |
3232     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233     *${as_nl}ac_space=\ *)
3234       sed -n \
3235         "s/'\''/'\''\\\\'\'''\''/g;
3236           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237       ;; #(
3238     *)
3239       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240       ;;
3241     esac |
3242     sort
3243 )
3244     echo
3245 
3246     $as_echo "## ----------------- ##
3247 ## Output variables. ##
3248 ## ----------------- ##"
3249     echo
3250     for ac_var in $ac_subst_vars
3251     do
3252       eval ac_val=\$$ac_var
3253       case $ac_val in
3254       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255       esac
3256       $as_echo "$ac_var='\''$ac_val'\''"
3257     done | sort
3258     echo
3259 
3260     if test -n "$ac_subst_files"; then
3261       $as_echo "## ------------------- ##
3262 ## File substitutions. ##
3263 ## ------------------- ##"
3264       echo
3265       for ac_var in $ac_subst_files
3266       do
3267         eval ac_val=\$$ac_var
3268         case $ac_val in
3269         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270         esac
3271         $as_echo "$ac_var='\''$ac_val'\''"
3272       done | sort
3273       echo
3274     fi
3275 
3276     if test -s confdefs.h; then
3277       $as_echo "## ----------- ##
3278 ## confdefs.h. ##
3279 ## ----------- ##"
3280       echo
3281       cat confdefs.h
3282       echo
3283     fi
3284     test "$ac_signal" != 0 &&
3285       $as_echo "$as_me: caught signal $ac_signal"
3286     $as_echo "$as_me: exit $exit_status"
3287   } >&5
3288   rm -f core *.core core.conftest.* &&
3289     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290     exit $exit_status
3291 ' 0
3292 for ac_signal in 1 2 13 15; do
3293   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294 done
3295 ac_signal=0
3296 
3297 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3298 rm -f -r conftest* confdefs.h
3299 
3300 $as_echo "/* confdefs.h */" > confdefs.h
3301 
3302 # Predefined preprocessor variables.
3303 
3304 cat >>confdefs.h <<_ACEOF
3305 #define PACKAGE_NAME "$PACKAGE_NAME"
3306 _ACEOF
3307 
3308 cat >>confdefs.h <<_ACEOF
3309 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310 _ACEOF
3311 
3312 cat >>confdefs.h <<_ACEOF
3313 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3314 _ACEOF
3315 
3316 cat >>confdefs.h <<_ACEOF
3317 #define PACKAGE_STRING "$PACKAGE_STRING"
3318 _ACEOF
3319 
3320 cat >>confdefs.h <<_ACEOF
3321 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322 _ACEOF
3323 
3324 cat >>confdefs.h <<_ACEOF
3325 #define PACKAGE_URL "$PACKAGE_URL"
3326 _ACEOF
3327 
3328 
3329 # Let the site file select an alternate cache file if it wants to.
3330 # Prefer an explicitly selected file to automatically selected ones.
3331 ac_site_file1=NONE
3332 ac_site_file2=NONE
3333 if test -n "$CONFIG_SITE"; then
3334   # We do not want a PATH search for config.site.
3335   case $CONFIG_SITE in #((
3336     -*)  ac_site_file1=./$CONFIG_SITE;;
3337     */*) ac_site_file1=$CONFIG_SITE;;
3338     *)   ac_site_file1=./$CONFIG_SITE;;
3339   esac
3340 elif test "x$prefix" != xNONE; then
3341   ac_site_file1=$prefix/share/config.site
3342   ac_site_file2=$prefix/etc/config.site
3343 else
3344   ac_site_file1=$ac_default_prefix/share/config.site
3345   ac_site_file2=$ac_default_prefix/etc/config.site
3346 fi
3347 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348 do
3349   test "x$ac_site_file" = xNONE && continue
3350   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353     sed 's/^/| /' "$ac_site_file" >&5
3354     . "$ac_site_file" \
3355       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357 as_fn_error $? "failed to load site script $ac_site_file
3358 See \`config.log' for more details" "$LINENO" 5; }
3359   fi
3360 done
3361 
3362 if test -r "$cache_file"; then
3363   # Some versions of bash will fail to source /dev/null (special files
3364   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367 $as_echo "$as_me: loading cache $cache_file" >&6;}
3368     case $cache_file in
3369       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370       *)                      . "./$cache_file";;
3371     esac
3372   fi
3373 else
3374   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375 $as_echo "$as_me: creating cache $cache_file" >&6;}
3376   >$cache_file
3377 fi
3378 
3379 # Check that the precious variables saved in the cache have kept the same
3380 # value.
3381 ac_cache_corrupted=false
3382 for ac_var in $ac_precious_vars; do
3383   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384   eval ac_new_set=\$ac_env_${ac_var}_set
3385   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386   eval ac_new_val=\$ac_env_${ac_var}_value
3387   case $ac_old_set,$ac_new_set in
3388     set,)
3389       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391       ac_cache_corrupted=: ;;
3392     ,set)
3393       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395       ac_cache_corrupted=: ;;
3396     ,);;
3397     *)
3398       if test "x$ac_old_val" != "x$ac_new_val"; then
3399         # differences in whitespace do not lead to failure.
3400         ac_old_val_w=`echo x $ac_old_val`
3401         ac_new_val_w=`echo x $ac_new_val`
3402         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405           ac_cache_corrupted=:
3406         else
3407           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409           eval $ac_var=\$ac_old_val
3410         fi
3411         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415       fi;;
3416   esac
3417   # Pass precious variables to config.status.
3418   if test "$ac_new_set" = set; then
3419     case $ac_new_val in
3420     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421     *) ac_arg=$ac_var=$ac_new_val ;;
3422     esac
3423     case " $ac_configure_args " in
3424       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426     esac
3427   fi
3428 done
3429 if $ac_cache_corrupted; then
3430   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435 fi
3436 ## -------------------- ##
3437 ## Main body of script. ##
3438 ## -------------------- ##
3439 
3440 ac_ext=c
3441 ac_cpp='$CPP $CPPFLAGS'
3442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445 
3446 
3447 
3448 ac_aux_dir=
3449 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450   if test -f "$ac_dir/install-sh"; then
3451     ac_aux_dir=$ac_dir
3452     ac_install_sh="$ac_aux_dir/install-sh -c"
3453     break
3454   elif test -f "$ac_dir/install.sh"; then
3455     ac_aux_dir=$ac_dir
3456     ac_install_sh="$ac_aux_dir/install.sh -c"
3457     break
3458   elif test -f "$ac_dir/shtool"; then
3459     ac_aux_dir=$ac_dir
3460     ac_install_sh="$ac_aux_dir/shtool install -c"
3461     break
3462   fi
3463 done
3464 if test -z "$ac_aux_dir"; then
3465   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
3466 fi
3467 
3468 # These three variables are undocumented and unsupported,
3469 # and are intended to be withdrawn in a future Autoconf release.
3470 # They can cause serious problems if a builder's source tree is in a directory
3471 # whose full name contains unusual characters.
3472 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475 
3476 
3477 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478 
3479 #
3480 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482 #
3483 # This code is free software; you can redistribute it and/or modify it
3484 # under the terms of the GNU General Public License version 2 only, as
3485 # published by the Free Software Foundation.  Oracle designates this
3486 # particular file as subject to the "Classpath" exception as provided
3487 # by Oracle in the LICENSE file that accompanied this code.
3488 #
3489 # This code is distributed in the hope that it will be useful, but WITHOUT
3490 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492 # version 2 for more details (a copy is included in the LICENSE file that
3493 # accompanied this code).
3494 #
3495 # You should have received a copy of the GNU General Public License version
3496 # 2 along with this work; if not, write to the Free Software Foundation,
3497 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498 #
3499 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500 # or visit www.oracle.com if you need additional information or have any
3501 # questions.
3502 #
3503 
3504 #
3505 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3506 #
3507 # This program is free software; you can redistribute it and/or modify
3508 # it under the terms of the GNU General Public License as published by
3509 # the Free Software Foundation; either version 2 of the License, or
3510 # (at your option) any later version.
3511 #
3512 # This program is distributed in the hope that it will be useful, but
3513 # WITHOUT ANY WARRANTY; without even the implied warranty of
3514 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515 # General Public License for more details.
3516 #
3517 # You should have received a copy of the GNU General Public License
3518 # along with this program; if not, write to the Free Software
3519 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520 #
3521 # As a special exception to the GNU General Public License, if you
3522 # distribute this file as part of a program that contains a
3523 # configuration script generated by Autoconf, you may include it under
3524 # the same distribution terms that you use for the rest of that program.
3525 
3526 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527 # ----------------------------------
3528 # PKG_PROG_PKG_CONFIG
3529 
3530 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531 #
3532 # Check to see whether a particular set of modules exists.  Similar
3533 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534 #
3535 #
3536 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537 # this or PKG_CHECK_MODULES is called, or make sure to call
3538 # PKG_CHECK_EXISTS manually
3539 # --------------------------------------------------------------
3540 
3541 
3542 
3543 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544 # ---------------------------------------------
3545 # _PKG_CONFIG
3546 
3547 # _PKG_SHORT_ERRORS_SUPPORTED
3548 # -----------------------------
3549 # _PKG_SHORT_ERRORS_SUPPORTED
3550 
3551 
3552 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553 # [ACTION-IF-NOT-FOUND])
3554 #
3555 #
3556 # Note that if there is a possibility the first call to
3557 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3558 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559 #
3560 #
3561 # --------------------------------------------------------------
3562 # PKG_CHECK_MODULES
3563 
3564 
3565 # Include these first...
3566 #
3567 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3568 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569 #
3570 # This code is free software; you can redistribute it and/or modify it
3571 # under the terms of the GNU General Public License version 2 only, as
3572 # published by the Free Software Foundation.  Oracle designates this
3573 # particular file as subject to the "Classpath" exception as provided
3574 # by Oracle in the LICENSE file that accompanied this code.
3575 #
3576 # This code is distributed in the hope that it will be useful, but WITHOUT
3577 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579 # version 2 for more details (a copy is included in the LICENSE file that
3580 # accompanied this code).
3581 #
3582 # You should have received a copy of the GNU General Public License version
3583 # 2 along with this work; if not, write to the Free Software Foundation,
3584 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585 #
3586 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587 # or visit www.oracle.com if you need additional information or have any
3588 # questions.
3589 #
3590 
3591 # Create a function/macro that takes a series of named arguments. The call is
3592 # similar to AC_DEFUN, but the setup of the function looks like this:
3593 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594 # ... do something
3595 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596 # ])
3597 # A star (*) in front of a named argument means that it is required and it's
3598 # presence will be verified. To pass e.g. the first value as a normal indexed
3599 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601 # "ARG_FOO".
3602 #
3603 # The generated function can be called like this:
3604 # MYFUNC(FOO: [foo-val],
3605 #     BAR: [
3606 #         $ECHO hello world
3607 #     ])
3608 # Note that the argument value must start on the same line as the argument name.
3609 #
3610 # Argument 1: Name of the function to define
3611 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3612 # Argument 3: Argument array to treat as named, typically $@
3613 # Argument 4: The main function body
3614 
3615 
3616 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617 # If so, then append $1 to $2 \
3618 # Also set JVM_ARG_OK to true/false depending on outcome.
3619 
3620 
3621 # Appends a string to a path variable, only adding the : when needed.
3622 
3623 
3624 # Prepends a string to a path variable, only adding the : when needed.
3625 
3626 
3627 # This will make sure the given variable points to a full and proper
3628 # path. This means:
3629 # 1) There will be no spaces in the path. On unix platforms,
3630 #    spaces in the path will result in an error. On Windows,
3631 #    the path will be rewritten using short-style to be space-free.
3632 # 2) The path will be absolute, and it will be in unix-style (on
3633 #     cygwin).
3634 # $1: The name of the variable to fix
3635 
3636 
3637 # This will make sure the given variable points to a executable
3638 # with a full and proper path. This means:
3639 # 1) There will be no spaces in the path. On unix platforms,
3640 #    spaces in the path will result in an error. On Windows,
3641 #    the path will be rewritten using short-style to be space-free.
3642 # 2) The path will be absolute, and it will be in unix-style (on
3643 #     cygwin).
3644 # Any arguments given to the executable is preserved.
3645 # If the input variable does not have a directory specification, then
3646 # it need to be in the PATH.
3647 # $1: The name of the variable to fix
3648 
3649 
3650 
3651 
3652 # Register a --with argument but mark it as deprecated
3653 # $1: The name of the with argument to deprecate, not including --with-
3654 
3655 
3656 # Register a --enable argument but mark it as deprecated
3657 # $1: The name of the with argument to deprecate, not including --enable-
3658 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659 # $3: Messages to user.
3660 
3661 
3662 
3663 
3664 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665 # $1: variable to check
3666 
3667 
3668 # Check that there are no unprocessed overridden variables left.
3669 # If so, they are an incorrect argument and we will exit with an error.
3670 
3671 
3672 # Setup a tool for the given variable. If correctly specified by the user,
3673 # use that value, otherwise search for the tool using the supplied code snippet.
3674 # $1: variable to set
3675 # $2: code snippet to call to look for the tool
3676 # $3: code snippet to call if variable was used to find tool
3677 
3678 
3679 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680 # $1: variable to set
3681 # $2: executable name (or list of names) to look for
3682 # $3: [path]
3683 
3684 
3685 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686 # $1: variable to set
3687 # $2: executable name (or list of names) to look for
3688 
3689 
3690 # Like BASIC_PATH_PROGS but fails if no tool was found.
3691 # $1: variable to set
3692 # $2: executable name (or list of names) to look for
3693 # $3: [path]
3694 
3695 
3696 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3697 # $1: variable to set
3698 # $2: autoconf macro to call to look for the special tool
3699 
3700 
3701 # Setup the most fundamental tools that relies on not much else to set up,
3702 # but is used by much of the early bootstrap code.
3703 
3704 
3705 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706 
3707 
3708 # Evaluates platform specific overrides for devkit variables.
3709 # $1: Name of variable
3710 
3711 
3712 
3713 
3714 
3715 
3716 #%%% Simple tools %%%
3717 
3718 # Check if we have found a usable version of make
3719 # $1: the path to a potential make binary (or empty)
3720 # $2: the description on how we found this
3721 
3722 
3723 
3724 
3725 # Goes looking for a usable version of GNU make.
3726 
3727 
3728 
3729 
3730 
3731 
3732 
3733 
3734 # Check if build directory is on local disk. If not possible to determine,
3735 # we prefer to claim it's local.
3736 # Argument 1: directory to test
3737 # Argument 2: what to do if it is on local disk
3738 # Argument 3: what to do otherwise (remote disk or failure)
3739 
3740 
3741 # Check that source files have basic read permissions set. This might
3742 # not be the case in cygwin in certain conditions.
3743 
3744 
3745 
3746 
3747 # Check for support for specific options in bash
3748 
3749 
3750 ################################################################################
3751 #
3752 # Default make target
3753 #
3754 
3755 
3756 # Code to run after AC_OUTPUT
3757 
3758 
3759 #
3760 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3761 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3762 #
3763 # This code is free software; you can redistribute it and/or modify it
3764 # under the terms of the GNU General Public License version 2 only, as
3765 # published by the Free Software Foundation.  Oracle designates this
3766 # particular file as subject to the "Classpath" exception as provided
3767 # by Oracle in the LICENSE file that accompanied this code.
3768 #
3769 # This code is distributed in the hope that it will be useful, but WITHOUT
3770 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3771 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3772 # version 2 for more details (a copy is included in the LICENSE file that
3773 # accompanied this code).
3774 #
3775 # You should have received a copy of the GNU General Public License version
3776 # 2 along with this work; if not, write to the Free Software Foundation,
3777 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3778 #
3779 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3780 # or visit www.oracle.com if you need additional information or have any
3781 # questions.
3782 #
3783 
3784 
3785 
3786 
3787 
3788 # Helper function which possibly converts a path using DOS-style short mode.
3789 # If so, the updated path is stored in $new_path.
3790 # $1: The path to check
3791 
3792 
3793 # Helper function which possibly converts a path using DOS-style short mode.
3794 # If so, the updated path is stored in $new_path.
3795 # $1: The path to check
3796 
3797 
3798 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3799 # and could probably be heavily simplified. However, all changes in this
3800 # area tend to need lot of testing in different scenarios, and in lack of
3801 # proper unit testing, cleaning this up has not been deemed worth the effort
3802 # at the moment.
3803 
3804 
3805 
3806 
3807 
3808 
3809 
3810 
3811 
3812 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3813 
3814 
3815 
3816 
3817 # ... then the rest
3818 #
3819 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3820 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3821 #
3822 # This code is free software; you can redistribute it and/or modify it
3823 # under the terms of the GNU General Public License version 2 only, as
3824 # published by the Free Software Foundation.  Oracle designates this
3825 # particular file as subject to the "Classpath" exception as provided
3826 # by Oracle in the LICENSE file that accompanied this code.
3827 #
3828 # This code is distributed in the hope that it will be useful, but WITHOUT
3829 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3830 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3831 # version 2 for more details (a copy is included in the LICENSE file that
3832 # accompanied this code).
3833 #
3834 # You should have received a copy of the GNU General Public License version
3835 # 2 along with this work; if not, write to the Free Software Foundation,
3836 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3837 #
3838 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3839 # or visit www.oracle.com if you need additional information or have any
3840 # questions.
3841 #
3842 
3843 ########################################################################
3844 # This file handles detection of the Boot JDK. The Boot JDK detection
3845 # process has been developed as a response to solve a complex real-world
3846 # problem. Initially, it was simple, but it has grown as platform after
3847 # platform, idiosyncracy after idiosyncracy has been supported.
3848 #
3849 # The basic idea is this:
3850 # 1) You need an acceptable *) JDK to use as a Boot JDK
3851 # 2) There are several ways to locate a JDK, that are mostly platform
3852 #    dependent **)
3853 # 3) You can have multiple JDKs installed
3854 # 4) If possible, configure should try to dig out an acceptable JDK
3855 #    automatically, without having to resort to command-line options
3856 #
3857 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3858 #     javac) and not a JRE, etc.
3859 #
3860 # **) On Windows we typically use a well-known path.
3861 #     On MacOSX we typically use the tool java_home.
3862 #     On Linux we typically find javac in the $PATH, and then follow a
3863 #     chain of symlinks that often ends up in a real JDK.
3864 #
3865 # This leads to the code where we check in different ways to locate a
3866 # JDK, and if one is found, check if it is acceptable. If not, we print
3867 # our reasons for rejecting it (useful when debugging non-working
3868 # configure situations) and continue checking the next one.
3869 ########################################################################
3870 
3871 # Execute the check given as argument, and verify the result
3872 # If the Boot JDK was previously found, do nothing
3873 # $1 A command line (typically autoconf macro) to execute
3874 
3875 
3876 # Test: Is bootjdk explicitly set by command line arguments?
3877 
3878 
3879 # Test: Is $JAVA_HOME set?
3880 
3881 
3882 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3883 
3884 
3885 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3886 # $1: Argument to the java_home binary (optional)
3887 
3888 
3889 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3890 
3891 
3892 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3893 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3894 # $1 = Path to directory containing jdk installations.
3895 # $2 = String to append to the found JDK directory to get the proper JDK home
3896 
3897 
3898 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3899 # environmental variable as base for where to look.
3900 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3901 
3902 
3903 # Test: Is there a JDK installed in default, well-known locations?
3904 
3905 
3906 # Check that a command-line tool in the Boot JDK is correct
3907 # $1 = name of variable to assign
3908 # $2 = name of binary
3909 
3910 
3911 ###############################################################################
3912 #
3913 # We need a Boot JDK to bootstrap the build.
3914 #
3915 
3916 
3917 
3918 
3919 
3920 # BUILD_JDK: the location of the latest JDK that can run
3921 #   on the host system and supports the target class file version
3922 #   generated in this JDK build.  This variable should only be
3923 #   used after the launchers are built.
3924 #
3925 
3926 # Execute the check given as argument, and verify the result.
3927 # If the JDK was previously found, do nothing.
3928 # $1 A command line (typically autoconf macro) to execute
3929 
3930 
3931 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3932 # is different than the host system doing the build (e.g. cross-compilation),
3933 # a special BUILD_JDK is built as part of the build process.  An external
3934 # prebuilt BUILD_JDK can also be supplied.
3935 
3936 
3937 #
3938 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3939 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3940 #
3941 # This code is free software; you can redistribute it and/or modify it
3942 # under the terms of the GNU General Public License version 2 only, as
3943 # published by the Free Software Foundation.  Oracle designates this
3944 # particular file as subject to the "Classpath" exception as provided
3945 # by Oracle in the LICENSE file that accompanied this code.
3946 #
3947 # This code is distributed in the hope that it will be useful, but WITHOUT
3948 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3949 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3950 # version 2 for more details (a copy is included in the LICENSE file that
3951 # accompanied this code).
3952 #
3953 # You should have received a copy of the GNU General Public License version
3954 # 2 along with this work; if not, write to the Free Software Foundation,
3955 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3956 #
3957 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3958 # or visit www.oracle.com if you need additional information or have any
3959 # questions.
3960 #
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 ################################################################################
3979 #
3980 # Runs icecc-create-env once and prints the error if it fails
3981 #
3982 # $1: arguments to icecc-create-env
3983 # $2: log file
3984 #
3985 
3986 
3987 ################################################################################
3988 #
3989 # Optionally enable distributed compilation of native code using icecc/icecream
3990 #
3991 
3992 
3993 
3994 
3995 
3996 
3997 
3998 #
3999 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4000 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4001 #
4002 # This code is free software; you can redistribute it and/or modify it
4003 # under the terms of the GNU General Public License version 2 only, as
4004 # published by the Free Software Foundation.  Oracle designates this
4005 # particular file as subject to the "Classpath" exception as provided
4006 # by Oracle in the LICENSE file that accompanied this code.
4007 #
4008 # This code is distributed in the hope that it will be useful, but WITHOUT
4009 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4010 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4011 # version 2 for more details (a copy is included in the LICENSE file that
4012 # accompanied this code).
4013 #
4014 # You should have received a copy of the GNU General Public License version
4015 # 2 along with this work; if not, write to the Free Software Foundation,
4016 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4017 #
4018 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4019 # or visit www.oracle.com if you need additional information or have any
4020 # questions.
4021 #
4022 
4023 ################################################################################
4024 #
4025 # Setup ABI profile (for arm)
4026 #
4027 
4028 
4029 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4030 # corresponding configure arguments instead
4031 
4032 
4033 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4034 # that configure can use them while detecting compilers.
4035 # TOOLCHAIN_TYPE is available here.
4036 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4037 
4038 
4039 
4040 
4041 
4042 
4043 # Documentation on common flags used for solstudio in HIGHEST.
4044 #
4045 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4046 #          done with care, there are some assumptions below that need to
4047 #          be understood about the use of pointers, and IEEE behavior.
4048 #
4049 # -fns: Use non-standard floating point mode (not IEEE 754)
4050 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4051 # -fsingle: Use single precision floating point with 'float'
4052 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4053 #   (Source with excessing pointer casting and data access with mixed
4054 #    pointer types are not recommended)
4055 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4056 #   (If you expect perfect errno behavior, do not use this)
4057 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4058 # -xrestrict: Pointer parameters to functions do not overlap
4059 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4060 #    If you pass in multiple pointers to the same data, do not use this)
4061 # -xlibmil: Inline some library routines
4062 #   (If you expect perfect errno behavior, do not use this)
4063 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4064 #   (If you expect perfect errno behavior, do not use this)
4065 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4066 
4067     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4068     # Bug?
4069     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4070     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4071     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4072     #fi
4073 
4074 
4075 
4076 
4077 
4078 
4079 ################################################################################
4080 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4081 #      conditionals against.
4082 # $2 - Optional prefix for each variable defined.
4083 
4084 
4085 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086 #                                  IF_FALSE: [RUN-IF-FALSE])
4087 # ------------------------------------------------------------
4088 # Check that the C compiler supports an argument
4089 
4090 
4091 
4092 
4093 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094 #                                    IF_FALSE: [RUN-IF-FALSE])
4095 # ------------------------------------------------------------
4096 # Check that the C++ compiler supports an argument
4097 
4098 
4099 
4100 
4101 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102 #                                IF_FALSE: [RUN-IF-FALSE])
4103 # ------------------------------------------------------------
4104 # Check that the C and C++ compilers support an argument
4105 
4106 
4107 
4108 
4109 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4110 #                                   IF_FALSE: [RUN-IF-FALSE])
4111 # ------------------------------------------------------------
4112 # Check that the linker support an argument
4113 
4114 
4115 
4116 
4117 
4118 
4119 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4120 # Arguments:
4121 # $1 - Optional prefix for each variable defined.
4122 
4123 
4124 #
4125 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4126 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4127 #
4128 # This code is free software; you can redistribute it and/or modify it
4129 # under the terms of the GNU General Public License version 2 only, as
4130 # published by the Free Software Foundation.  Oracle designates this
4131 # particular file as subject to the "Classpath" exception as provided
4132 # by Oracle in the LICENSE file that accompanied this code.
4133 #
4134 # This code is distributed in the hope that it will be useful, but WITHOUT
4135 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4136 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4137 # version 2 for more details (a copy is included in the LICENSE file that
4138 # accompanied this code).
4139 #
4140 # You should have received a copy of the GNU General Public License version
4141 # 2 along with this work; if not, write to the Free Software Foundation,
4142 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4143 #
4144 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4145 # or visit www.oracle.com if you need additional information or have any
4146 # questions.
4147 #
4148 
4149 
4150 
4151 
4152 
4153 cygwin_help() {
4154   case $1 in
4155     unzip)
4156       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4157       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4158       ;;
4159     zip)
4160       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4161       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4162       ;;
4163     make)
4164       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4165       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4166       ;;
4167     freetype)
4168       HELP_MSG="
4169 The freetype library can now be build during the configure process.
4170 Download the freetype sources and unpack them into an arbitrary directory:
4171 
4172 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4173 tar -xzf freetype-2.5.3.tar.gz
4174 
4175 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4176 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4177 builds or into '<freetype_src>/lib32' for 32-bit builds.
4178 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4179 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4180 
4181 Alternatively you can unpack the sources like this to use the default directory:
4182 
4183 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4184       ;;
4185   esac
4186 }
4187 
4188 msys_help() {
4189   PKGHANDLER_COMMAND=""
4190 }
4191 
4192 apt_help() {
4193   case $1 in
4194     reduced)
4195       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4196     devkit)
4197       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4198     openjdk)
4199       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4200     alsa)
4201       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4202     cups)
4203       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4204     freetype)
4205       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4206     ffi)
4207       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4208     x11)
4209       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4210     ccache)
4211       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4212     dtrace)
4213       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4214     elf)
4215       PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4216   esac
4217 }
4218 
4219 yum_help() {
4220   case $1 in
4221     devkit)
4222       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4223     openjdk)
4224       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4225     alsa)
4226       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4227     cups)
4228       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4229     freetype)
4230       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4231     x11)
4232       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4233     ccache)
4234       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4235     elf)
4236       PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4237   esac
4238 }
4239 
4240 port_help() {
4241   PKGHANDLER_COMMAND=""
4242 }
4243 
4244 pkgutil_help() {
4245   PKGHANDLER_COMMAND=""
4246 }
4247 
4248 pkgadd_help() {
4249   PKGHANDLER_COMMAND=""
4250 }
4251 
4252 # This function will check if we're called from the "configure" wrapper while
4253 # printing --help. If so, we will print out additional information that can
4254 # only be extracted within the autoconf script, and then exit. This must be
4255 # called at the very beginning in configure.ac.
4256 
4257 
4258 
4259 
4260 
4261 
4262 #
4263 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4264 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4265 #
4266 # This code is free software; you can redistribute it and/or modify it
4267 # under the terms of the GNU General Public License version 2 only, as
4268 # published by the Free Software Foundation.  Oracle designates this
4269 # particular file as subject to the "Classpath" exception as provided
4270 # by Oracle in the LICENSE file that accompanied this code.
4271 #
4272 # This code is distributed in the hope that it will be useful, but WITHOUT
4273 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4274 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4275 # version 2 for more details (a copy is included in the LICENSE file that
4276 # accompanied this code).
4277 #
4278 # You should have received a copy of the GNU General Public License version
4279 # 2 along with this work; if not, write to the Free Software Foundation,
4280 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4281 #
4282 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4283 # or visit www.oracle.com if you need additional information or have any
4284 # questions.
4285 #
4286 
4287 # All valid JVM features, regardless of platform
4288 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4289 graal fprof vm-structs jni-check services management all-gcs nmt cds \
4290 static-build link-time-opt aot"
4291 
4292 # All valid JVM variants
4293 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4294 
4295 ###############################################################################
4296 # Check if the specified JVM variant should be built. To be used in shell if
4297 # constructs, like this:
4298 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4299 #
4300 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4301 
4302 # Definition kept in one line to allow inlining in if statements.
4303 # Additional [] needed to keep m4 from mangling shell constructs.
4304 
4305 
4306 ###############################################################################
4307 # Check if the specified JVM features are explicitly enabled. To be used in
4308 # shell if constructs, like this:
4309 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4310 #
4311 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4312 
4313 # Definition kept in one line to allow inlining in if statements.
4314 # Additional [] needed to keep m4 from mangling shell constructs.
4315 
4316 
4317 ###############################################################################
4318 # Check which variants of the JVM that we want to build. Available variants are:
4319 #   server: normal interpreter, and a tiered C1/C2 compiler
4320 #   client: normal interpreter, and C1 (no C2 compiler)
4321 #   minimal: reduced form of client with optional features stripped out
4322 #   core: normal interpreter only, no compiler
4323 #   zero: C++ based interpreter only, no compiler
4324 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4325 #   custom: baseline JVM with no default features
4326 #
4327 
4328 
4329 ###############################################################################
4330 # Check if dtrace should be enabled and has all prerequisites present.
4331 #
4332 
4333 
4334 ################################################################################
4335 # Check if AOT should be enabled
4336 #
4337 
4338 
4339 ###############################################################################
4340 # Set up all JVM features for each JVM variant.
4341 #
4342 
4343 
4344 ###############################################################################
4345 # Validate JVM features once all setup is complete, including custom setup.
4346 #
4347 
4348 
4349 ################################################################################
4350 #
4351 # Specify which sources will be used to build the 64-bit ARM port
4352 #
4353 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4354 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4355 #
4356 
4357 
4358 
4359 ################################################################################
4360 # Check if gtest should be built
4361 #
4362 
4363 
4364 #
4365 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4366 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4367 #
4368 # This code is free software; you can redistribute it and/or modify it
4369 # under the terms of the GNU General Public License version 2 only, as
4370 # published by the Free Software Foundation.  Oracle designates this
4371 # particular file as subject to the "Classpath" exception as provided
4372 # by Oracle in the LICENSE file that accompanied this code.
4373 #
4374 # This code is distributed in the hope that it will be useful, but WITHOUT
4375 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4376 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4377 # version 2 for more details (a copy is included in the LICENSE file that
4378 # accompanied this code).
4379 #
4380 # You should have received a copy of the GNU General Public License version
4381 # 2 along with this work; if not, write to the Free Software Foundation,
4382 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4383 #
4384 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4385 # or visit www.oracle.com if you need additional information or have any
4386 # questions.
4387 #
4388 
4389 ###############################################################################
4390 # Check which variant of the JDK that we want to build.
4391 # Currently we have:
4392 #    normal:   standard edition
4393 # but the custom make system may add other variants
4394 #
4395 # Effectively the JDK variant gives a name to a specific set of
4396 # modules to compile into the JDK.
4397 
4398 
4399 ###############################################################################
4400 # Set the debug level
4401 #    release: no debug information, all optimizations, no asserts.
4402 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4403 #    fastdebug: debug information (-g), all optimizations, all asserts
4404 #    slowdebug: debug information (-g), no optimizations, all asserts
4405 
4406 
4407 ###############################################################################
4408 #
4409 # Should we build only OpenJDK even if closed sources are present?
4410 #
4411 
4412 
4413 
4414 
4415 ###############################################################################
4416 #
4417 # Enable or disable the elliptic curve crypto implementation
4418 #
4419 
4420 
4421 
4422 
4423 ################################################################################
4424 #
4425 # Gcov coverage data for hotspot
4426 #
4427 
4428 
4429 ################################################################################
4430 #
4431 # Static build support.  When enabled will generate static
4432 # libraries instead of shared libraries for all JDK libs.
4433 #
4434 
4435 
4436 ################################################################################
4437 #
4438 # jlink options.
4439 # We always keep packaged modules in JDK image.
4440 #
4441 
4442 
4443 ################################################################################
4444 #
4445 # Check if building of the jtreg failure handler should be enabled.
4446 #
4447 
4448 
4449 ################################################################################
4450 #
4451 # Enable or disable generation of the classlist at build time
4452 #
4453 
4454 
4455 #
4456 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4457 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4458 #
4459 # This code is free software; you can redistribute it and/or modify it
4460 # under the terms of the GNU General Public License version 2 only, as
4461 # published by the Free Software Foundation.  Oracle designates this
4462 # particular file as subject to the "Classpath" exception as provided
4463 # by Oracle in the LICENSE file that accompanied this code.
4464 #
4465 # This code is distributed in the hope that it will be useful, but WITHOUT
4466 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4467 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4468 # version 2 for more details (a copy is included in the LICENSE file that
4469 # accompanied this code).
4470 #
4471 # You should have received a copy of the GNU General Public License version
4472 # 2 along with this work; if not, write to the Free Software Foundation,
4473 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4474 #
4475 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4476 # or visit www.oracle.com if you need additional information or have any
4477 # questions.
4478 #
4479 
4480 ###############################################################################
4481 #
4482 # Setup version numbers
4483 #
4484 
4485 # Verify that a given string represents a valid version number, and assign it
4486 # to a variable.
4487 
4488 # Argument 1: the variable to assign to
4489 # Argument 2: the value given by the user
4490 
4491 
4492 
4493 
4494 #
4495 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4496 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4497 #
4498 # This code is free software; you can redistribute it and/or modify it
4499 # under the terms of the GNU General Public License version 2 only, as
4500 # published by the Free Software Foundation.  Oracle designates this
4501 # particular file as subject to the "Classpath" exception as provided
4502 # by Oracle in the LICENSE file that accompanied this code.
4503 #
4504 # This code is distributed in the hope that it will be useful, but WITHOUT
4505 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4506 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4507 # version 2 for more details (a copy is included in the LICENSE file that
4508 # accompanied this code).
4509 #
4510 # You should have received a copy of the GNU General Public License version
4511 # 2 along with this work; if not, write to the Free Software Foundation,
4512 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4513 #
4514 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4515 # or visit www.oracle.com if you need additional information or have any
4516 # questions.
4517 #
4518 
4519 # Major library component reside in separate files.
4520 #
4521 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4522 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4523 #
4524 # This code is free software; you can redistribute it and/or modify it
4525 # under the terms of the GNU General Public License version 2 only, as
4526 # published by the Free Software Foundation.  Oracle designates this
4527 # particular file as subject to the "Classpath" exception as provided
4528 # by Oracle in the LICENSE file that accompanied this code.
4529 #
4530 # This code is distributed in the hope that it will be useful, but WITHOUT
4531 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4532 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4533 # version 2 for more details (a copy is included in the LICENSE file that
4534 # accompanied this code).
4535 #
4536 # You should have received a copy of the GNU General Public License version
4537 # 2 along with this work; if not, write to the Free Software Foundation,
4538 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4539 #
4540 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4541 # or visit www.oracle.com if you need additional information or have any
4542 # questions.
4543 #
4544 
4545 ################################################################################
4546 # Setup alsa (Advanced Linux Sound Architecture)
4547 ################################################################################
4548 
4549 
4550 #
4551 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4552 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4553 #
4554 # This code is free software; you can redistribute it and/or modify it
4555 # under the terms of the GNU General Public License version 2 only, as
4556 # published by the Free Software Foundation.  Oracle designates this
4557 # particular file as subject to the "Classpath" exception as provided
4558 # by Oracle in the LICENSE file that accompanied this code.
4559 #
4560 # This code is distributed in the hope that it will be useful, but WITHOUT
4561 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4562 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4563 # version 2 for more details (a copy is included in the LICENSE file that
4564 # accompanied this code).
4565 #
4566 # You should have received a copy of the GNU General Public License version
4567 # 2 along with this work; if not, write to the Free Software Foundation,
4568 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4569 #
4570 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4571 # or visit www.oracle.com if you need additional information or have any
4572 # questions.
4573 #
4574 
4575 ################################################################################
4576 # Setup bundled libraries.
4577 #
4578 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4579 # OpenJDK repository. Default is to use these libraries as bundled, but they
4580 # might be replaced by en external version by the user.
4581 ################################################################################
4582 
4583 
4584 ################################################################################
4585 # Setup libjpeg
4586 ################################################################################
4587 
4588 
4589 ################################################################################
4590 # Setup giflib
4591 ################################################################################
4592 
4593 
4594 ################################################################################
4595 # Setup libpng
4596 ################################################################################
4597 
4598 
4599 ################################################################################
4600 # Setup zlib
4601 ################################################################################
4602 
4603 
4604 ################################################################################
4605 # Setup lcms (Little CMS)
4606 ################################################################################
4607 
4608 
4609 #
4610 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4611 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4612 #
4613 # This code is free software; you can redistribute it and/or modify it
4614 # under the terms of the GNU General Public License version 2 only, as
4615 # published by the Free Software Foundation.  Oracle designates this
4616 # particular file as subject to the "Classpath" exception as provided
4617 # by Oracle in the LICENSE file that accompanied this code.
4618 #
4619 # This code is distributed in the hope that it will be useful, but WITHOUT
4620 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4621 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4622 # version 2 for more details (a copy is included in the LICENSE file that
4623 # accompanied this code).
4624 #
4625 # You should have received a copy of the GNU General Public License version
4626 # 2 along with this work; if not, write to the Free Software Foundation,
4627 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4628 #
4629 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4630 # or visit www.oracle.com if you need additional information or have any
4631 # questions.
4632 #
4633 
4634 ################################################################################
4635 # Setup cups (Common Unix Printing System)
4636 ################################################################################
4637 
4638 
4639 #
4640 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4641 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4642 #
4643 # This code is free software; you can redistribute it and/or modify it
4644 # under the terms of the GNU General Public License version 2 only, as
4645 # published by the Free Software Foundation.  Oracle designates this
4646 # particular file as subject to the "Classpath" exception as provided
4647 # by Oracle in the LICENSE file that accompanied this code.
4648 #
4649 # This code is distributed in the hope that it will be useful, but WITHOUT
4650 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4651 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4652 # version 2 for more details (a copy is included in the LICENSE file that
4653 # accompanied this code).
4654 #
4655 # You should have received a copy of the GNU General Public License version
4656 # 2 along with this work; if not, write to the Free Software Foundation,
4657 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4658 #
4659 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4660 # or visit www.oracle.com if you need additional information or have any
4661 # questions.
4662 #
4663 
4664 ################################################################################
4665 # Setup libffi (Foreign Function Interface)
4666 ################################################################################
4667 
4668 
4669 #
4670 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4671 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4672 #
4673 # This code is free software; you can redistribute it and/or modify it
4674 # under the terms of the GNU General Public License version 2 only, as
4675 # published by the Free Software Foundation.  Oracle designates this
4676 # particular file as subject to the "Classpath" exception as provided
4677 # by Oracle in the LICENSE file that accompanied this code.
4678 #
4679 # This code is distributed in the hope that it will be useful, but WITHOUT
4680 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4681 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4682 # version 2 for more details (a copy is included in the LICENSE file that
4683 # accompanied this code).
4684 #
4685 # You should have received a copy of the GNU General Public License version
4686 # 2 along with this work; if not, write to the Free Software Foundation,
4687 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4688 #
4689 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4690 # or visit www.oracle.com if you need additional information or have any
4691 # questions.
4692 #
4693 
4694 ################################################################################
4695 # Build the freetype lib from source
4696 ################################################################################
4697 
4698 
4699 ################################################################################
4700 # Check if a potential freeype library match is correct and usable
4701 ################################################################################
4702 
4703 
4704 ################################################################################
4705 # Setup freetype (The FreeType2 font rendering library)
4706 ################################################################################
4707 
4708 
4709 #
4710 # Copyright (c) 2011, 2016, 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 the standard C/C++ runtime libraries.
4736 #
4737 # Most importantly, determine if stdc++ should be linked statically or
4738 # dynamically.
4739 ################################################################################
4740 
4741 
4742 #
4743 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4744 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4745 #
4746 # This code is free software; you can redistribute it and/or modify it
4747 # under the terms of the GNU General Public License version 2 only, as
4748 # published by the Free Software Foundation.  Oracle designates this
4749 # particular file as subject to the "Classpath" exception as provided
4750 # by Oracle in the LICENSE file that accompanied this code.
4751 #
4752 # This code is distributed in the hope that it will be useful, but WITHOUT
4753 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4754 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4755 # version 2 for more details (a copy is included in the LICENSE file that
4756 # accompanied this code).
4757 #
4758 # You should have received a copy of the GNU General Public License version
4759 # 2 along with this work; if not, write to the Free Software Foundation,
4760 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4761 #
4762 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4763 # or visit www.oracle.com if you need additional information or have any
4764 # questions.
4765 #
4766 
4767 ################################################################################
4768 # Setup X11 Windows system
4769 ################################################################################
4770 
4771 
4772 #
4773 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4774 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4775 #
4776 # This code is free software; you can redistribute it and/or modify it
4777 # under the terms of the GNU General Public License version 2 only, as
4778 # published by the Free Software Foundation.  Oracle designates this
4779 # particular file as subject to the "Classpath" exception as provided
4780 # by Oracle in the LICENSE file that accompanied this code.
4781 #
4782 # This code is distributed in the hope that it will be useful, but WITHOUT
4783 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4784 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4785 # version 2 for more details (a copy is included in the LICENSE file that
4786 # accompanied this code).
4787 #
4788 # You should have received a copy of the GNU General Public License version
4789 # 2 along with this work; if not, write to the Free Software Foundation,
4790 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4791 #
4792 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4793 # or visit www.oracle.com if you need additional information or have any
4794 # questions.
4795 #
4796 
4797 ################################################################################
4798 # Setup libelf (ELF library)
4799 ################################################################################
4800 
4801 
4802 
4803 ################################################################################
4804 # Determine which libraries are needed for this configuration
4805 ################################################################################
4806 
4807 
4808 ################################################################################
4809 # Parse library options, and setup needed libraries
4810 ################################################################################
4811 
4812 
4813 ################################################################################
4814 # Setup llvm (Low-Level VM)
4815 ################################################################################
4816 
4817 
4818 ################################################################################
4819 # Setup various libraries, typically small system libraries
4820 ################################################################################
4821 
4822 
4823 ################################################################################
4824 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4825 # redistribute it in the test image.
4826 ################################################################################
4827 
4828 
4829 
4830 #
4831 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4832 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4833 #
4834 # This code is free software; you can redistribute it and/or modify it
4835 # under the terms of the GNU General Public License version 2 only, as
4836 # published by the Free Software Foundation.  Oracle designates this
4837 # particular file as subject to the "Classpath" exception as provided
4838 # by Oracle in the LICENSE file that accompanied this code.
4839 #
4840 # This code is distributed in the hope that it will be useful, but WITHOUT
4841 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4842 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4843 # version 2 for more details (a copy is included in the LICENSE file that
4844 # accompanied this code).
4845 #
4846 # You should have received a copy of the GNU General Public License version
4847 # 2 along with this work; if not, write to the Free Software Foundation,
4848 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4849 #
4850 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4851 # or visit www.oracle.com if you need additional information or have any
4852 # questions.
4853 #
4854 
4855 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4856 # Converts autoconf style CPU name to OpenJDK style, into
4857 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4858 
4859 
4860 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4861 # Converts autoconf style OS name to OpenJDK style, into
4862 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4863 
4864 
4865 # Expects $host_os $host_cpu $build_os and $build_cpu
4866 # and $with_target_bits to have been setup!
4867 #
4868 # Translate the standard triplet(quadruplet) definition
4869 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4870 # OPENJDK_BUILD_OS, etc.
4871 
4872 
4873 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4874 # accordingly. Must be done after setting up build and target system, but before
4875 # doing anything else with these values.
4876 
4877 
4878 # Setup the legacy variables, for controlling the old makefiles.
4879 #
4880 
4881 
4882 # $1 - Either TARGET or BUILD to setup the variables for.
4883 
4884 
4885 
4886 
4887 #%%% Build and target systems %%%
4888 
4889 
4890 
4891 
4892 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4893 # Add -mX to various FLAGS variables.
4894 
4895 
4896 
4897 
4898 
4899 
4900 #
4901 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4902 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4903 #
4904 # This code is free software; you can redistribute it and/or modify it
4905 # under the terms of the GNU General Public License version 2 only, as
4906 # published by the Free Software Foundation.  Oracle designates this
4907 # particular file as subject to the "Classpath" exception as provided
4908 # by Oracle in the LICENSE file that accompanied this code.
4909 #
4910 # This code is distributed in the hope that it will be useful, but WITHOUT
4911 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4912 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4913 # version 2 for more details (a copy is included in the LICENSE file that
4914 # accompanied this code).
4915 #
4916 # You should have received a copy of the GNU General Public License version
4917 # 2 along with this work; if not, write to the Free Software Foundation,
4918 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4919 #
4920 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4921 # or visit www.oracle.com if you need additional information or have any
4922 # questions.
4923 #
4924 
4925 
4926 
4927 
4928 
4929 
4930 
4931 ################################################################################
4932 # Define a mechanism for importing extra prebuilt modules
4933 #
4934 
4935 
4936 
4937 #
4938 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4939 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4940 #
4941 # This code is free software; you can redistribute it and/or modify it
4942 # under the terms of the GNU General Public License version 2 only, as
4943 # published by the Free Software Foundation.  Oracle designates this
4944 # particular file as subject to the "Classpath" exception as provided
4945 # by Oracle in the LICENSE file that accompanied this code.
4946 #
4947 # This code is distributed in the hope that it will be useful, but WITHOUT
4948 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4949 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4950 # version 2 for more details (a copy is included in the LICENSE file that
4951 # accompanied this code).
4952 #
4953 # You should have received a copy of the GNU General Public License version
4954 # 2 along with this work; if not, write to the Free Software Foundation,
4955 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4956 #
4957 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4958 # or visit www.oracle.com if you need additional information or have any
4959 # questions.
4960 #
4961 
4962 ########################################################################
4963 # This file is responsible for detecting, verifying and setting up the
4964 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4965 # proper paths to the binaries, but it will not setup any flags.
4966 #
4967 # The binaries used is determined by the toolchain type, which is the family of
4968 # compilers and related tools that are used.
4969 ########################################################################
4970 
4971 
4972 # All valid toolchains, regardless of platform (used by help.m4)
4973 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4974 
4975 # These toolchains are valid on different platforms
4976 VALID_TOOLCHAINS_linux="gcc clang"
4977 VALID_TOOLCHAINS_solaris="solstudio"
4978 VALID_TOOLCHAINS_macosx="gcc clang"
4979 VALID_TOOLCHAINS_aix="xlc"
4980 VALID_TOOLCHAINS_windows="microsoft"
4981 
4982 # Toolchain descriptions
4983 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4984 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4985 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4986 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4987 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4988 
4989 # Minimum supported versions, empty means unspecified
4990 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4991 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4992 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4993 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4994 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4995 
4996 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4997 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4998 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4999 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5000 
5001 
5002 # Check if the configured compiler (C and C++) is of a specific version or
5003 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5004 #
5005 # Arguments:
5006 #   VERSION:   The version string to check against the found version
5007 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5008 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5009 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5010 
5011 
5012 
5013 
5014 # Setup a number of variables describing how native output files are
5015 # named on this platform/toolchain.
5016 
5017 
5018 # Determine which toolchain type to use, and make sure it is valid for this
5019 # platform. Setup various information about the selected toolchain.
5020 
5021 
5022 # Before we start detecting the toolchain executables, we might need some
5023 # special setup, e.g. additional paths etc.
5024 
5025 
5026 # Restore path, etc
5027 
5028 
5029 # Check if a compiler is of the toolchain type we expect, and save the version
5030 # information from it. If the compiler does not match the expected type,
5031 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5032 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5033 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5034 #
5035 # $1 = compiler to test (CC or CXX)
5036 # $2 = human readable name of compiler (C or C++)
5037 
5038 
5039 # Try to locate the given C or C++ compiler in the path, or otherwise.
5040 #
5041 # $1 = compiler to test (CC or CXX)
5042 # $2 = human readable name of compiler (C or C++)
5043 # $3 = list of compiler names to search for
5044 
5045 
5046 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5047 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5048 # archiver (AR). Verify that the compilers are correct according to the
5049 # toolchain type.
5050 
5051 
5052 # Setup additional tools that is considered a part of the toolchain, but not the
5053 # core part. Many of these are highly platform-specific and do not exist,
5054 # and/or are not needed on all platforms.
5055 
5056 
5057 # Setup the build tools (i.e, the compiler and linker used to build programs
5058 # that should be run on the build platform, not the target platform, as a build
5059 # helper). Since the non-cross-compile case uses the normal, target compilers
5060 # for this, we can only do this after these have been setup.
5061 
5062 
5063 # Do some additional checks on the detected tools.
5064 
5065 
5066 # Setup the JTReg Regression Test Harness.
5067 
5068 
5069 #
5070 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5071 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5072 #
5073 # This code is free software; you can redistribute it and/or modify it
5074 # under the terms of the GNU General Public License version 2 only, as
5075 # published by the Free Software Foundation.  Oracle designates this
5076 # particular file as subject to the "Classpath" exception as provided
5077 # by Oracle in the LICENSE file that accompanied this code.
5078 #
5079 # This code is distributed in the hope that it will be useful, but WITHOUT
5080 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5081 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5082 # version 2 for more details (a copy is included in the LICENSE file that
5083 # accompanied this code).
5084 #
5085 # You should have received a copy of the GNU General Public License version
5086 # 2 along with this work; if not, write to the Free Software Foundation,
5087 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5088 #
5089 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5090 # or visit www.oracle.com if you need additional information or have any
5091 # questions.
5092 #
5093 
5094 ################################################################################
5095 # The order of these defines the priority by which we try to find them.
5096 VALID_VS_VERSIONS="2013 2012 2010"
5097 
5098 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5099 VS_VERSION_INTERNAL_2010=100
5100 VS_MSVCR_2010=msvcr100.dll
5101 # We don't use msvcp on Visual Studio 2010
5102 #VS_MSVCP_2010=msvcp100.dll
5103 VS_ENVVAR_2010="VS100COMNTOOLS"
5104 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5105 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5106 VS_VS_PLATFORM_NAME_2010="v100"
5107 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5108 
5109 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5110 VS_VERSION_INTERNAL_2012=110
5111 VS_MSVCR_2012=msvcr110.dll
5112 VS_MSVCP_2012=msvcp110.dll
5113 VS_ENVVAR_2012="VS110COMNTOOLS"
5114 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5115 VS_SDK_INSTALLDIR_2012=
5116 VS_VS_PLATFORM_NAME_2012="v110"
5117 VS_SDK_PLATFORM_NAME_2012=
5118 
5119 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5120 VS_VERSION_INTERNAL_2013=120
5121 VS_MSVCR_2013=msvcr120.dll
5122 VS_MSVCP_2013=msvcp120.dll
5123 VS_ENVVAR_2013="VS120COMNTOOLS"
5124 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5125 VS_SDK_INSTALLDIR_2013=
5126 VS_VS_PLATFORM_NAME_2013="v120"
5127 VS_SDK_PLATFORM_NAME_2013=
5128 
5129 ################################################################################
5130 
5131 
5132 
5133 ################################################################################
5134 
5135 
5136 
5137 ################################################################################
5138 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5139 # build environment and assigns it to VS_ENV_CMD
5140 
5141 
5142 ################################################################################
5143 
5144 
5145 
5146 ################################################################################
5147 # Check if the VS env variables were setup prior to running configure.
5148 # If not, then find vcvarsall.bat and run it automatically, and integrate
5149 # the set env variables into the spec file.
5150 
5151 
5152 
5153 
5154 
5155 
5156 
5157 
5158 
5159 
5160 
5161 
5162 
5163 
5164 # This line needs to be here, verbatim, after all includes and the dummy hook
5165 # definitions. It is replaced with custom functionality when building
5166 # custom sources.
5167 #CUSTOM_AUTOCONF_INCLUDE
5168 
5169 # Do not change or remove the following line, it is needed for consistency checks:
5170 DATE_WHEN_GENERATED=1484148747
5171 
5172 ###############################################################################
5173 #
5174 # Initialization / Boot-strapping
5175 #
5176 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5177 # thus it jumps back and forth, each time gaining something needed later on.
5178 #
5179 ###############################################################################
5180 
5181 # If we are requested to print additional help, do that and then exit.
5182 # This must be the very first call.
5183 
5184   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5185 
5186     # Print available toolchains
5187     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5188     $PRINTF "Which are valid to use depends on the build platform.\n"
5189     for toolchain in $VALID_TOOLCHAINS_all; do
5190       # Use indirect variable referencing
5191       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5192       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5193       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5194     done
5195     $PRINTF "\n"
5196 
5197     # Print available jvm features
5198     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5199     $PRINTF "Which are valid to use depends on the target platform.\n  "
5200     $PRINTF "%s " $VALID_JVM_FEATURES
5201     $PRINTF "\n"
5202 
5203     # And now exit directly
5204     exit 0
5205   fi
5206 
5207 
5208 # Basic initialization that must happen first of all in the normal process.
5209 
5210   # Save the original command line. This is passed to us by the wrapper configure script.
5211 
5212   # Save the path variable before it gets changed
5213   ORIGINAL_PATH="$PATH"
5214 
5215   DATE_WHEN_CONFIGURED=`LANG=C date`
5216 
5217   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5218 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5219   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5220 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5221 
5222 
5223   # Start with tools that do not need have cross compilation support
5224   # and can be expected to be found in the default PATH. These tools are
5225   # used by configure.
5226 
5227   # First are all the simple required tools.
5228 
5229 
5230 
5231   # Publish this variable in the help.
5232 
5233 
5234   if [ -z "${BASENAME+x}" ]; then
5235     # The variable is not set by user, try to locate tool using the code snippet
5236     for ac_prog in basename
5237 do
5238   # Extract the first word of "$ac_prog", so it can be a program name with args.
5239 set dummy $ac_prog; ac_word=$2
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5241 $as_echo_n "checking for $ac_word... " >&6; }
5242 if ${ac_cv_path_BASENAME+:} false; then :
5243   $as_echo_n "(cached) " >&6
5244 else
5245   case $BASENAME in
5246   [\\/]* | ?:[\\/]*)
5247   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5248   ;;
5249   *)
5250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5251 for as_dir in $PATH
5252 do
5253   IFS=$as_save_IFS
5254   test -z "$as_dir" && as_dir=.
5255     for ac_exec_ext in '' $ac_executable_extensions; do
5256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5257     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5259     break 2
5260   fi
5261 done
5262   done
5263 IFS=$as_save_IFS
5264 
5265   ;;
5266 esac
5267 fi
5268 BASENAME=$ac_cv_path_BASENAME
5269 if test -n "$BASENAME"; then
5270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5271 $as_echo "$BASENAME" >&6; }
5272 else
5273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5274 $as_echo "no" >&6; }
5275 fi
5276 
5277 
5278   test -n "$BASENAME" && break
5279 done
5280 
5281   else
5282     # The variable is set, but is it from the command line or the environment?
5283 
5284     # Try to remove the string !BASENAME! from our list.
5285     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5286     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5287       # If it failed, the variable was not from the command line. Ignore it,
5288       # but warn the user (except for BASH, which is always set by the calling BASH).
5289       if test "xBASENAME" != xBASH; then
5290         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5291 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5292       fi
5293       # Try to locate tool using the code snippet
5294       for ac_prog in basename
5295 do
5296   # Extract the first word of "$ac_prog", so it can be a program name with args.
5297 set dummy $ac_prog; ac_word=$2
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5299 $as_echo_n "checking for $ac_word... " >&6; }
5300 if ${ac_cv_path_BASENAME+:} false; then :
5301   $as_echo_n "(cached) " >&6
5302 else
5303   case $BASENAME in
5304   [\\/]* | ?:[\\/]*)
5305   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5306   ;;
5307   *)
5308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5309 for as_dir in $PATH
5310 do
5311   IFS=$as_save_IFS
5312   test -z "$as_dir" && as_dir=.
5313     for ac_exec_ext in '' $ac_executable_extensions; do
5314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5315     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5317     break 2
5318   fi
5319 done
5320   done
5321 IFS=$as_save_IFS
5322 
5323   ;;
5324 esac
5325 fi
5326 BASENAME=$ac_cv_path_BASENAME
5327 if test -n "$BASENAME"; then
5328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5329 $as_echo "$BASENAME" >&6; }
5330 else
5331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332 $as_echo "no" >&6; }
5333 fi
5334 
5335 
5336   test -n "$BASENAME" && break
5337 done
5338 
5339     else
5340       # If it succeeded, then it was overridden by the user. We will use it
5341       # for the tool.
5342 
5343       # First remove it from the list of overridden variables, so we can test
5344       # for unknown variables in the end.
5345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5346 
5347       # Check if we try to supply an empty value
5348       if test "x$BASENAME" = x; then
5349         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5350 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5352 $as_echo_n "checking for BASENAME... " >&6; }
5353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5354 $as_echo "disabled" >&6; }
5355       else
5356         # Check if the provided tool contains a complete path.
5357         tool_specified="$BASENAME"
5358         tool_basename="${tool_specified##*/}"
5359         if test "x$tool_basename" = "x$tool_specified"; then
5360           # A command without a complete path is provided, search $PATH.
5361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5362 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5363           # Extract the first word of "$tool_basename", so it can be a program name with args.
5364 set dummy $tool_basename; ac_word=$2
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366 $as_echo_n "checking for $ac_word... " >&6; }
5367 if ${ac_cv_path_BASENAME+:} false; then :
5368   $as_echo_n "(cached) " >&6
5369 else
5370   case $BASENAME in
5371   [\\/]* | ?:[\\/]*)
5372   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5373   ;;
5374   *)
5375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376 for as_dir in $PATH
5377 do
5378   IFS=$as_save_IFS
5379   test -z "$as_dir" && as_dir=.
5380     for ac_exec_ext in '' $ac_executable_extensions; do
5381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384     break 2
5385   fi
5386 done
5387   done
5388 IFS=$as_save_IFS
5389 
5390   ;;
5391 esac
5392 fi
5393 BASENAME=$ac_cv_path_BASENAME
5394 if test -n "$BASENAME"; then
5395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5396 $as_echo "$BASENAME" >&6; }
5397 else
5398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399 $as_echo "no" >&6; }
5400 fi
5401 
5402 
5403           if test "x$BASENAME" = x; then
5404             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5405           fi
5406         else
5407           # Otherwise we believe it is a complete path. Use it as it is.
5408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5409 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5410           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5411 $as_echo_n "checking for BASENAME... " >&6; }
5412           if test ! -x "$tool_specified"; then
5413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5414 $as_echo "not found" >&6; }
5415             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5416           fi
5417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5418 $as_echo "$tool_specified" >&6; }
5419         fi
5420       fi
5421     fi
5422 
5423   fi
5424 
5425 
5426 
5427   if test "x$BASENAME" = x; then
5428     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5429   fi
5430 
5431 
5432 
5433 
5434 
5435   # Publish this variable in the help.
5436 
5437 
5438   if [ -z "${BASH+x}" ]; then
5439     # The variable is not set by user, try to locate tool using the code snippet
5440     for ac_prog in bash
5441 do
5442   # Extract the first word of "$ac_prog", so it can be a program name with args.
5443 set dummy $ac_prog; ac_word=$2
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445 $as_echo_n "checking for $ac_word... " >&6; }
5446 if ${ac_cv_path_BASH+:} false; then :
5447   $as_echo_n "(cached) " >&6
5448 else
5449   case $BASH in
5450   [\\/]* | ?:[\\/]*)
5451   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5452   ;;
5453   *)
5454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455 for as_dir in $PATH
5456 do
5457   IFS=$as_save_IFS
5458   test -z "$as_dir" && as_dir=.
5459     for ac_exec_ext in '' $ac_executable_extensions; do
5460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5461     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5463     break 2
5464   fi
5465 done
5466   done
5467 IFS=$as_save_IFS
5468 
5469   ;;
5470 esac
5471 fi
5472 BASH=$ac_cv_path_BASH
5473 if test -n "$BASH"; then
5474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5475 $as_echo "$BASH" >&6; }
5476 else
5477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478 $as_echo "no" >&6; }
5479 fi
5480 
5481 
5482   test -n "$BASH" && break
5483 done
5484 
5485   else
5486     # The variable is set, but is it from the command line or the environment?
5487 
5488     # Try to remove the string !BASH! from our list.
5489     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5490     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5491       # If it failed, the variable was not from the command line. Ignore it,
5492       # but warn the user (except for BASH, which is always set by the calling BASH).
5493       if test "xBASH" != xBASH; then
5494         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5495 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5496       fi
5497       # Try to locate tool using the code snippet
5498       for ac_prog in bash
5499 do
5500   # Extract the first word of "$ac_prog", so it can be a program name with args.
5501 set dummy $ac_prog; ac_word=$2
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5503 $as_echo_n "checking for $ac_word... " >&6; }
5504 if ${ac_cv_path_BASH+:} false; then :
5505   $as_echo_n "(cached) " >&6
5506 else
5507   case $BASH in
5508   [\\/]* | ?:[\\/]*)
5509   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5510   ;;
5511   *)
5512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513 for as_dir in $PATH
5514 do
5515   IFS=$as_save_IFS
5516   test -z "$as_dir" && as_dir=.
5517     for ac_exec_ext in '' $ac_executable_extensions; do
5518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5519     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5521     break 2
5522   fi
5523 done
5524   done
5525 IFS=$as_save_IFS
5526 
5527   ;;
5528 esac
5529 fi
5530 BASH=$ac_cv_path_BASH
5531 if test -n "$BASH"; then
5532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5533 $as_echo "$BASH" >&6; }
5534 else
5535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536 $as_echo "no" >&6; }
5537 fi
5538 
5539 
5540   test -n "$BASH" && break
5541 done
5542 
5543     else
5544       # If it succeeded, then it was overridden by the user. We will use it
5545       # for the tool.
5546 
5547       # First remove it from the list of overridden variables, so we can test
5548       # for unknown variables in the end.
5549       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5550 
5551       # Check if we try to supply an empty value
5552       if test "x$BASH" = x; then
5553         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5554 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5556 $as_echo_n "checking for BASH... " >&6; }
5557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5558 $as_echo "disabled" >&6; }
5559       else
5560         # Check if the provided tool contains a complete path.
5561         tool_specified="$BASH"
5562         tool_basename="${tool_specified##*/}"
5563         if test "x$tool_basename" = "x$tool_specified"; then
5564           # A command without a complete path is provided, search $PATH.
5565           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5566 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5567           # Extract the first word of "$tool_basename", so it can be a program name with args.
5568 set dummy $tool_basename; ac_word=$2
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570 $as_echo_n "checking for $ac_word... " >&6; }
5571 if ${ac_cv_path_BASH+:} false; then :
5572   $as_echo_n "(cached) " >&6
5573 else
5574   case $BASH in
5575   [\\/]* | ?:[\\/]*)
5576   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5577   ;;
5578   *)
5579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580 for as_dir in $PATH
5581 do
5582   IFS=$as_save_IFS
5583   test -z "$as_dir" && as_dir=.
5584     for ac_exec_ext in '' $ac_executable_extensions; do
5585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588     break 2
5589   fi
5590 done
5591   done
5592 IFS=$as_save_IFS
5593 
5594   ;;
5595 esac
5596 fi
5597 BASH=$ac_cv_path_BASH
5598 if test -n "$BASH"; then
5599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5600 $as_echo "$BASH" >&6; }
5601 else
5602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603 $as_echo "no" >&6; }
5604 fi
5605 
5606 
5607           if test "x$BASH" = x; then
5608             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5609           fi
5610         else
5611           # Otherwise we believe it is a complete path. Use it as it is.
5612           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5613 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5614           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5615 $as_echo_n "checking for BASH... " >&6; }
5616           if test ! -x "$tool_specified"; then
5617             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5618 $as_echo "not found" >&6; }
5619             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5620           fi
5621           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5622 $as_echo "$tool_specified" >&6; }
5623         fi
5624       fi
5625     fi
5626 
5627   fi
5628 
5629 
5630 
5631   if test "x$BASH" = x; then
5632     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5633   fi
5634 
5635 
5636 
5637 
5638 
5639   # Publish this variable in the help.
5640 
5641 
5642   if [ -z "${CAT+x}" ]; then
5643     # The variable is not set by user, try to locate tool using the code snippet
5644     for ac_prog in cat
5645 do
5646   # Extract the first word of "$ac_prog", so it can be a program name with args.
5647 set dummy $ac_prog; ac_word=$2
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649 $as_echo_n "checking for $ac_word... " >&6; }
5650 if ${ac_cv_path_CAT+:} false; then :
5651   $as_echo_n "(cached) " >&6
5652 else
5653   case $CAT in
5654   [\\/]* | ?:[\\/]*)
5655   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5656   ;;
5657   *)
5658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659 for as_dir in $PATH
5660 do
5661   IFS=$as_save_IFS
5662   test -z "$as_dir" && as_dir=.
5663     for ac_exec_ext in '' $ac_executable_extensions; do
5664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5665     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667     break 2
5668   fi
5669 done
5670   done
5671 IFS=$as_save_IFS
5672 
5673   ;;
5674 esac
5675 fi
5676 CAT=$ac_cv_path_CAT
5677 if test -n "$CAT"; then
5678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5679 $as_echo "$CAT" >&6; }
5680 else
5681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682 $as_echo "no" >&6; }
5683 fi
5684 
5685 
5686   test -n "$CAT" && break
5687 done
5688 
5689   else
5690     # The variable is set, but is it from the command line or the environment?
5691 
5692     # Try to remove the string !CAT! from our list.
5693     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5694     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5695       # If it failed, the variable was not from the command line. Ignore it,
5696       # but warn the user (except for BASH, which is always set by the calling BASH).
5697       if test "xCAT" != xBASH; then
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5699 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5700       fi
5701       # Try to locate tool using the code snippet
5702       for ac_prog in cat
5703 do
5704   # Extract the first word of "$ac_prog", so it can be a program name with args.
5705 set dummy $ac_prog; ac_word=$2
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707 $as_echo_n "checking for $ac_word... " >&6; }
5708 if ${ac_cv_path_CAT+:} false; then :
5709   $as_echo_n "(cached) " >&6
5710 else
5711   case $CAT in
5712   [\\/]* | ?:[\\/]*)
5713   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5714   ;;
5715   *)
5716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5717 for as_dir in $PATH
5718 do
5719   IFS=$as_save_IFS
5720   test -z "$as_dir" && as_dir=.
5721     for ac_exec_ext in '' $ac_executable_extensions; do
5722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5723     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5725     break 2
5726   fi
5727 done
5728   done
5729 IFS=$as_save_IFS
5730 
5731   ;;
5732 esac
5733 fi
5734 CAT=$ac_cv_path_CAT
5735 if test -n "$CAT"; then
5736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5737 $as_echo "$CAT" >&6; }
5738 else
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740 $as_echo "no" >&6; }
5741 fi
5742 
5743 
5744   test -n "$CAT" && break
5745 done
5746 
5747     else
5748       # If it succeeded, then it was overridden by the user. We will use it
5749       # for the tool.
5750 
5751       # First remove it from the list of overridden variables, so we can test
5752       # for unknown variables in the end.
5753       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5754 
5755       # Check if we try to supply an empty value
5756       if test "x$CAT" = x; then
5757         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5758 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5759         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5760 $as_echo_n "checking for CAT... " >&6; }
5761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5762 $as_echo "disabled" >&6; }
5763       else
5764         # Check if the provided tool contains a complete path.
5765         tool_specified="$CAT"
5766         tool_basename="${tool_specified##*/}"
5767         if test "x$tool_basename" = "x$tool_specified"; then
5768           # A command without a complete path is provided, search $PATH.
5769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5770 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5771           # Extract the first word of "$tool_basename", so it can be a program name with args.
5772 set dummy $tool_basename; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_path_CAT+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   case $CAT in
5779   [\\/]* | ?:[\\/]*)
5780   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5781   ;;
5782   *)
5783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784 for as_dir in $PATH
5785 do
5786   IFS=$as_save_IFS
5787   test -z "$as_dir" && as_dir=.
5788     for ac_exec_ext in '' $ac_executable_extensions; do
5789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792     break 2
5793   fi
5794 done
5795   done
5796 IFS=$as_save_IFS
5797 
5798   ;;
5799 esac
5800 fi
5801 CAT=$ac_cv_path_CAT
5802 if test -n "$CAT"; then
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5804 $as_echo "$CAT" >&6; }
5805 else
5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807 $as_echo "no" >&6; }
5808 fi
5809 
5810 
5811           if test "x$CAT" = x; then
5812             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5813           fi
5814         else
5815           # Otherwise we believe it is a complete path. Use it as it is.
5816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5817 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5818           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5819 $as_echo_n "checking for CAT... " >&6; }
5820           if test ! -x "$tool_specified"; then
5821             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5822 $as_echo "not found" >&6; }
5823             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5824           fi
5825           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5826 $as_echo "$tool_specified" >&6; }
5827         fi
5828       fi
5829     fi
5830 
5831   fi
5832 
5833 
5834 
5835   if test "x$CAT" = x; then
5836     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5837   fi
5838 
5839 
5840 
5841 
5842 
5843   # Publish this variable in the help.
5844 
5845 
5846   if [ -z "${CHMOD+x}" ]; then
5847     # The variable is not set by user, try to locate tool using the code snippet
5848     for ac_prog in chmod
5849 do
5850   # Extract the first word of "$ac_prog", so it can be a program name with args.
5851 set dummy $ac_prog; ac_word=$2
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5853 $as_echo_n "checking for $ac_word... " >&6; }
5854 if ${ac_cv_path_CHMOD+:} false; then :
5855   $as_echo_n "(cached) " >&6
5856 else
5857   case $CHMOD in
5858   [\\/]* | ?:[\\/]*)
5859   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5860   ;;
5861   *)
5862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5863 for as_dir in $PATH
5864 do
5865   IFS=$as_save_IFS
5866   test -z "$as_dir" && as_dir=.
5867     for ac_exec_ext in '' $ac_executable_extensions; do
5868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5869     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5871     break 2
5872   fi
5873 done
5874   done
5875 IFS=$as_save_IFS
5876 
5877   ;;
5878 esac
5879 fi
5880 CHMOD=$ac_cv_path_CHMOD
5881 if test -n "$CHMOD"; then
5882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5883 $as_echo "$CHMOD" >&6; }
5884 else
5885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5886 $as_echo "no" >&6; }
5887 fi
5888 
5889 
5890   test -n "$CHMOD" && break
5891 done
5892 
5893   else
5894     # The variable is set, but is it from the command line or the environment?
5895 
5896     # Try to remove the string !CHMOD! from our list.
5897     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5898     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5899       # If it failed, the variable was not from the command line. Ignore it,
5900       # but warn the user (except for BASH, which is always set by the calling BASH).
5901       if test "xCHMOD" != xBASH; then
5902         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5903 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5904       fi
5905       # Try to locate tool using the code snippet
5906       for ac_prog in chmod
5907 do
5908   # Extract the first word of "$ac_prog", so it can be a program name with args.
5909 set dummy $ac_prog; ac_word=$2
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911 $as_echo_n "checking for $ac_word... " >&6; }
5912 if ${ac_cv_path_CHMOD+:} false; then :
5913   $as_echo_n "(cached) " >&6
5914 else
5915   case $CHMOD in
5916   [\\/]* | ?:[\\/]*)
5917   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5918   ;;
5919   *)
5920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921 for as_dir in $PATH
5922 do
5923   IFS=$as_save_IFS
5924   test -z "$as_dir" && as_dir=.
5925     for ac_exec_ext in '' $ac_executable_extensions; do
5926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5927     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929     break 2
5930   fi
5931 done
5932   done
5933 IFS=$as_save_IFS
5934 
5935   ;;
5936 esac
5937 fi
5938 CHMOD=$ac_cv_path_CHMOD
5939 if test -n "$CHMOD"; then
5940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5941 $as_echo "$CHMOD" >&6; }
5942 else
5943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944 $as_echo "no" >&6; }
5945 fi
5946 
5947 
5948   test -n "$CHMOD" && break
5949 done
5950 
5951     else
5952       # If it succeeded, then it was overridden by the user. We will use it
5953       # for the tool.
5954 
5955       # First remove it from the list of overridden variables, so we can test
5956       # for unknown variables in the end.
5957       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5958 
5959       # Check if we try to supply an empty value
5960       if test "x$CHMOD" = x; then
5961         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5962 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5964 $as_echo_n "checking for CHMOD... " >&6; }
5965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5966 $as_echo "disabled" >&6; }
5967       else
5968         # Check if the provided tool contains a complete path.
5969         tool_specified="$CHMOD"
5970         tool_basename="${tool_specified##*/}"
5971         if test "x$tool_basename" = "x$tool_specified"; then
5972           # A command without a complete path is provided, search $PATH.
5973           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5974 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5975           # Extract the first word of "$tool_basename", so it can be a program name with args.
5976 set dummy $tool_basename; ac_word=$2
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978 $as_echo_n "checking for $ac_word... " >&6; }
5979 if ${ac_cv_path_CHMOD+:} false; then :
5980   $as_echo_n "(cached) " >&6
5981 else
5982   case $CHMOD in
5983   [\\/]* | ?:[\\/]*)
5984   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5985   ;;
5986   *)
5987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988 for as_dir in $PATH
5989 do
5990   IFS=$as_save_IFS
5991   test -z "$as_dir" && as_dir=.
5992     for ac_exec_ext in '' $ac_executable_extensions; do
5993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5994     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5996     break 2
5997   fi
5998 done
5999   done
6000 IFS=$as_save_IFS
6001 
6002   ;;
6003 esac
6004 fi
6005 CHMOD=$ac_cv_path_CHMOD
6006 if test -n "$CHMOD"; then
6007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6008 $as_echo "$CHMOD" >&6; }
6009 else
6010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6011 $as_echo "no" >&6; }
6012 fi
6013 
6014 
6015           if test "x$CHMOD" = x; then
6016             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6017           fi
6018         else
6019           # Otherwise we believe it is a complete path. Use it as it is.
6020           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6021 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6022           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6023 $as_echo_n "checking for CHMOD... " >&6; }
6024           if test ! -x "$tool_specified"; then
6025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6026 $as_echo "not found" >&6; }
6027             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6028           fi
6029           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6030 $as_echo "$tool_specified" >&6; }
6031         fi
6032       fi
6033     fi
6034 
6035   fi
6036 
6037 
6038 
6039   if test "x$CHMOD" = x; then
6040     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6041   fi
6042 
6043 
6044 
6045 
6046 
6047   # Publish this variable in the help.
6048 
6049 
6050   if [ -z "${CMP+x}" ]; then
6051     # The variable is not set by user, try to locate tool using the code snippet
6052     for ac_prog in cmp
6053 do
6054   # Extract the first word of "$ac_prog", so it can be a program name with args.
6055 set dummy $ac_prog; ac_word=$2
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057 $as_echo_n "checking for $ac_word... " >&6; }
6058 if ${ac_cv_path_CMP+:} false; then :
6059   $as_echo_n "(cached) " >&6
6060 else
6061   case $CMP in
6062   [\\/]* | ?:[\\/]*)
6063   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6064   ;;
6065   *)
6066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067 for as_dir in $PATH
6068 do
6069   IFS=$as_save_IFS
6070   test -z "$as_dir" && as_dir=.
6071     for ac_exec_ext in '' $ac_executable_extensions; do
6072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6073     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075     break 2
6076   fi
6077 done
6078   done
6079 IFS=$as_save_IFS
6080 
6081   ;;
6082 esac
6083 fi
6084 CMP=$ac_cv_path_CMP
6085 if test -n "$CMP"; then
6086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6087 $as_echo "$CMP" >&6; }
6088 else
6089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090 $as_echo "no" >&6; }
6091 fi
6092 
6093 
6094   test -n "$CMP" && break
6095 done
6096 
6097   else
6098     # The variable is set, but is it from the command line or the environment?
6099 
6100     # Try to remove the string !CMP! from our list.
6101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6103       # If it failed, the variable was not from the command line. Ignore it,
6104       # but warn the user (except for BASH, which is always set by the calling BASH).
6105       if test "xCMP" != xBASH; then
6106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6107 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6108       fi
6109       # Try to locate tool using the code snippet
6110       for ac_prog in cmp
6111 do
6112   # Extract the first word of "$ac_prog", so it can be a program name with args.
6113 set dummy $ac_prog; ac_word=$2
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6115 $as_echo_n "checking for $ac_word... " >&6; }
6116 if ${ac_cv_path_CMP+:} false; then :
6117   $as_echo_n "(cached) " >&6
6118 else
6119   case $CMP in
6120   [\\/]* | ?:[\\/]*)
6121   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6122   ;;
6123   *)
6124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125 for as_dir in $PATH
6126 do
6127   IFS=$as_save_IFS
6128   test -z "$as_dir" && as_dir=.
6129     for ac_exec_ext in '' $ac_executable_extensions; do
6130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6131     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6133     break 2
6134   fi
6135 done
6136   done
6137 IFS=$as_save_IFS
6138 
6139   ;;
6140 esac
6141 fi
6142 CMP=$ac_cv_path_CMP
6143 if test -n "$CMP"; then
6144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6145 $as_echo "$CMP" >&6; }
6146 else
6147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148 $as_echo "no" >&6; }
6149 fi
6150 
6151 
6152   test -n "$CMP" && break
6153 done
6154 
6155     else
6156       # If it succeeded, then it was overridden by the user. We will use it
6157       # for the tool.
6158 
6159       # First remove it from the list of overridden variables, so we can test
6160       # for unknown variables in the end.
6161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6162 
6163       # Check if we try to supply an empty value
6164       if test "x$CMP" = x; then
6165         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6166 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6167         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6168 $as_echo_n "checking for CMP... " >&6; }
6169         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6170 $as_echo "disabled" >&6; }
6171       else
6172         # Check if the provided tool contains a complete path.
6173         tool_specified="$CMP"
6174         tool_basename="${tool_specified##*/}"
6175         if test "x$tool_basename" = "x$tool_specified"; then
6176           # A command without a complete path is provided, search $PATH.
6177           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6178 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6179           # Extract the first word of "$tool_basename", so it can be a program name with args.
6180 set dummy $tool_basename; ac_word=$2
6181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182 $as_echo_n "checking for $ac_word... " >&6; }
6183 if ${ac_cv_path_CMP+:} false; then :
6184   $as_echo_n "(cached) " >&6
6185 else
6186   case $CMP in
6187   [\\/]* | ?:[\\/]*)
6188   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6189   ;;
6190   *)
6191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192 for as_dir in $PATH
6193 do
6194   IFS=$as_save_IFS
6195   test -z "$as_dir" && as_dir=.
6196     for ac_exec_ext in '' $ac_executable_extensions; do
6197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6198     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6200     break 2
6201   fi
6202 done
6203   done
6204 IFS=$as_save_IFS
6205 
6206   ;;
6207 esac
6208 fi
6209 CMP=$ac_cv_path_CMP
6210 if test -n "$CMP"; then
6211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6212 $as_echo "$CMP" >&6; }
6213 else
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215 $as_echo "no" >&6; }
6216 fi
6217 
6218 
6219           if test "x$CMP" = x; then
6220             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6221           fi
6222         else
6223           # Otherwise we believe it is a complete path. Use it as it is.
6224           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6225 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6226           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6227 $as_echo_n "checking for CMP... " >&6; }
6228           if test ! -x "$tool_specified"; then
6229             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6230 $as_echo "not found" >&6; }
6231             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6232           fi
6233           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6234 $as_echo "$tool_specified" >&6; }
6235         fi
6236       fi
6237     fi
6238 
6239   fi
6240 
6241 
6242 
6243   if test "x$CMP" = x; then
6244     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6245   fi
6246 
6247 
6248 
6249 
6250 
6251   # Publish this variable in the help.
6252 
6253 
6254   if [ -z "${COMM+x}" ]; then
6255     # The variable is not set by user, try to locate tool using the code snippet
6256     for ac_prog in comm
6257 do
6258   # Extract the first word of "$ac_prog", so it can be a program name with args.
6259 set dummy $ac_prog; ac_word=$2
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6261 $as_echo_n "checking for $ac_word... " >&6; }
6262 if ${ac_cv_path_COMM+:} false; then :
6263   $as_echo_n "(cached) " >&6
6264 else
6265   case $COMM in
6266   [\\/]* | ?:[\\/]*)
6267   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6268   ;;
6269   *)
6270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6271 for as_dir in $PATH
6272 do
6273   IFS=$as_save_IFS
6274   test -z "$as_dir" && as_dir=.
6275     for ac_exec_ext in '' $ac_executable_extensions; do
6276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6277     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6279     break 2
6280   fi
6281 done
6282   done
6283 IFS=$as_save_IFS
6284 
6285   ;;
6286 esac
6287 fi
6288 COMM=$ac_cv_path_COMM
6289 if test -n "$COMM"; then
6290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6291 $as_echo "$COMM" >&6; }
6292 else
6293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294 $as_echo "no" >&6; }
6295 fi
6296 
6297 
6298   test -n "$COMM" && break
6299 done
6300 
6301   else
6302     # The variable is set, but is it from the command line or the environment?
6303 
6304     # Try to remove the string !COMM! from our list.
6305     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6306     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6307       # If it failed, the variable was not from the command line. Ignore it,
6308       # but warn the user (except for BASH, which is always set by the calling BASH).
6309       if test "xCOMM" != xBASH; then
6310         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6311 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6312       fi
6313       # Try to locate tool using the code snippet
6314       for ac_prog in comm
6315 do
6316   # Extract the first word of "$ac_prog", so it can be a program name with args.
6317 set dummy $ac_prog; ac_word=$2
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6319 $as_echo_n "checking for $ac_word... " >&6; }
6320 if ${ac_cv_path_COMM+:} false; then :
6321   $as_echo_n "(cached) " >&6
6322 else
6323   case $COMM in
6324   [\\/]* | ?:[\\/]*)
6325   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6326   ;;
6327   *)
6328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6329 for as_dir in $PATH
6330 do
6331   IFS=$as_save_IFS
6332   test -z "$as_dir" && as_dir=.
6333     for ac_exec_ext in '' $ac_executable_extensions; do
6334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6335     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6337     break 2
6338   fi
6339 done
6340   done
6341 IFS=$as_save_IFS
6342 
6343   ;;
6344 esac
6345 fi
6346 COMM=$ac_cv_path_COMM
6347 if test -n "$COMM"; then
6348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6349 $as_echo "$COMM" >&6; }
6350 else
6351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352 $as_echo "no" >&6; }
6353 fi
6354 
6355 
6356   test -n "$COMM" && break
6357 done
6358 
6359     else
6360       # If it succeeded, then it was overridden by the user. We will use it
6361       # for the tool.
6362 
6363       # First remove it from the list of overridden variables, so we can test
6364       # for unknown variables in the end.
6365       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6366 
6367       # Check if we try to supply an empty value
6368       if test "x$COMM" = x; then
6369         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6370 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6372 $as_echo_n "checking for COMM... " >&6; }
6373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6374 $as_echo "disabled" >&6; }
6375       else
6376         # Check if the provided tool contains a complete path.
6377         tool_specified="$COMM"
6378         tool_basename="${tool_specified##*/}"
6379         if test "x$tool_basename" = "x$tool_specified"; then
6380           # A command without a complete path is provided, search $PATH.
6381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6382 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6383           # Extract the first word of "$tool_basename", so it can be a program name with args.
6384 set dummy $tool_basename; ac_word=$2
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386 $as_echo_n "checking for $ac_word... " >&6; }
6387 if ${ac_cv_path_COMM+:} false; then :
6388   $as_echo_n "(cached) " >&6
6389 else
6390   case $COMM in
6391   [\\/]* | ?:[\\/]*)
6392   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6393   ;;
6394   *)
6395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396 for as_dir in $PATH
6397 do
6398   IFS=$as_save_IFS
6399   test -z "$as_dir" && as_dir=.
6400     for ac_exec_ext in '' $ac_executable_extensions; do
6401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6402     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6404     break 2
6405   fi
6406 done
6407   done
6408 IFS=$as_save_IFS
6409 
6410   ;;
6411 esac
6412 fi
6413 COMM=$ac_cv_path_COMM
6414 if test -n "$COMM"; then
6415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6416 $as_echo "$COMM" >&6; }
6417 else
6418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419 $as_echo "no" >&6; }
6420 fi
6421 
6422 
6423           if test "x$COMM" = x; then
6424             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6425           fi
6426         else
6427           # Otherwise we believe it is a complete path. Use it as it is.
6428           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6429 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6430           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6431 $as_echo_n "checking for COMM... " >&6; }
6432           if test ! -x "$tool_specified"; then
6433             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6434 $as_echo "not found" >&6; }
6435             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6436           fi
6437           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6438 $as_echo "$tool_specified" >&6; }
6439         fi
6440       fi
6441     fi
6442 
6443   fi
6444 
6445 
6446 
6447   if test "x$COMM" = x; then
6448     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6449   fi
6450 
6451 
6452 
6453 
6454 
6455   # Publish this variable in the help.
6456 
6457 
6458   if [ -z "${CP+x}" ]; then
6459     # The variable is not set by user, try to locate tool using the code snippet
6460     for ac_prog in cp
6461 do
6462   # Extract the first word of "$ac_prog", so it can be a program name with args.
6463 set dummy $ac_prog; ac_word=$2
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6465 $as_echo_n "checking for $ac_word... " >&6; }
6466 if ${ac_cv_path_CP+:} false; then :
6467   $as_echo_n "(cached) " >&6
6468 else
6469   case $CP in
6470   [\\/]* | ?:[\\/]*)
6471   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6472   ;;
6473   *)
6474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475 for as_dir in $PATH
6476 do
6477   IFS=$as_save_IFS
6478   test -z "$as_dir" && as_dir=.
6479     for ac_exec_ext in '' $ac_executable_extensions; do
6480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6481     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6483     break 2
6484   fi
6485 done
6486   done
6487 IFS=$as_save_IFS
6488 
6489   ;;
6490 esac
6491 fi
6492 CP=$ac_cv_path_CP
6493 if test -n "$CP"; then
6494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6495 $as_echo "$CP" >&6; }
6496 else
6497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 $as_echo "no" >&6; }
6499 fi
6500 
6501 
6502   test -n "$CP" && break
6503 done
6504 
6505   else
6506     # The variable is set, but is it from the command line or the environment?
6507 
6508     # Try to remove the string !CP! from our list.
6509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6511       # If it failed, the variable was not from the command line. Ignore it,
6512       # but warn the user (except for BASH, which is always set by the calling BASH).
6513       if test "xCP" != xBASH; then
6514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6515 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6516       fi
6517       # Try to locate tool using the code snippet
6518       for ac_prog in cp
6519 do
6520   # Extract the first word of "$ac_prog", so it can be a program name with args.
6521 set dummy $ac_prog; ac_word=$2
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523 $as_echo_n "checking for $ac_word... " >&6; }
6524 if ${ac_cv_path_CP+:} false; then :
6525   $as_echo_n "(cached) " >&6
6526 else
6527   case $CP in
6528   [\\/]* | ?:[\\/]*)
6529   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6530   ;;
6531   *)
6532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533 for as_dir in $PATH
6534 do
6535   IFS=$as_save_IFS
6536   test -z "$as_dir" && as_dir=.
6537     for ac_exec_ext in '' $ac_executable_extensions; do
6538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6539     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541     break 2
6542   fi
6543 done
6544   done
6545 IFS=$as_save_IFS
6546 
6547   ;;
6548 esac
6549 fi
6550 CP=$ac_cv_path_CP
6551 if test -n "$CP"; then
6552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6553 $as_echo "$CP" >&6; }
6554 else
6555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556 $as_echo "no" >&6; }
6557 fi
6558 
6559 
6560   test -n "$CP" && break
6561 done
6562 
6563     else
6564       # If it succeeded, then it was overridden by the user. We will use it
6565       # for the tool.
6566 
6567       # First remove it from the list of overridden variables, so we can test
6568       # for unknown variables in the end.
6569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6570 
6571       # Check if we try to supply an empty value
6572       if test "x$CP" = x; then
6573         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6574 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6576 $as_echo_n "checking for CP... " >&6; }
6577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6578 $as_echo "disabled" >&6; }
6579       else
6580         # Check if the provided tool contains a complete path.
6581         tool_specified="$CP"
6582         tool_basename="${tool_specified##*/}"
6583         if test "x$tool_basename" = "x$tool_specified"; then
6584           # A command without a complete path is provided, search $PATH.
6585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6586 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6587           # Extract the first word of "$tool_basename", so it can be a program name with args.
6588 set dummy $tool_basename; ac_word=$2
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590 $as_echo_n "checking for $ac_word... " >&6; }
6591 if ${ac_cv_path_CP+:} false; then :
6592   $as_echo_n "(cached) " >&6
6593 else
6594   case $CP in
6595   [\\/]* | ?:[\\/]*)
6596   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6597   ;;
6598   *)
6599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600 for as_dir in $PATH
6601 do
6602   IFS=$as_save_IFS
6603   test -z "$as_dir" && as_dir=.
6604     for ac_exec_ext in '' $ac_executable_extensions; do
6605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608     break 2
6609   fi
6610 done
6611   done
6612 IFS=$as_save_IFS
6613 
6614   ;;
6615 esac
6616 fi
6617 CP=$ac_cv_path_CP
6618 if test -n "$CP"; then
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6620 $as_echo "$CP" >&6; }
6621 else
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623 $as_echo "no" >&6; }
6624 fi
6625 
6626 
6627           if test "x$CP" = x; then
6628             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6629           fi
6630         else
6631           # Otherwise we believe it is a complete path. Use it as it is.
6632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6633 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6634           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6635 $as_echo_n "checking for CP... " >&6; }
6636           if test ! -x "$tool_specified"; then
6637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6638 $as_echo "not found" >&6; }
6639             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6640           fi
6641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6642 $as_echo "$tool_specified" >&6; }
6643         fi
6644       fi
6645     fi
6646 
6647   fi
6648 
6649 
6650 
6651   if test "x$CP" = x; then
6652     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6653   fi
6654 
6655 
6656 
6657 
6658 
6659   # Publish this variable in the help.
6660 
6661 
6662   if [ -z "${CUT+x}" ]; then
6663     # The variable is not set by user, try to locate tool using the code snippet
6664     for ac_prog in cut
6665 do
6666   # Extract the first word of "$ac_prog", so it can be a program name with args.
6667 set dummy $ac_prog; ac_word=$2
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669 $as_echo_n "checking for $ac_word... " >&6; }
6670 if ${ac_cv_path_CUT+:} false; then :
6671   $as_echo_n "(cached) " >&6
6672 else
6673   case $CUT in
6674   [\\/]* | ?:[\\/]*)
6675   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6676   ;;
6677   *)
6678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679 for as_dir in $PATH
6680 do
6681   IFS=$as_save_IFS
6682   test -z "$as_dir" && as_dir=.
6683     for ac_exec_ext in '' $ac_executable_extensions; do
6684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6685     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687     break 2
6688   fi
6689 done
6690   done
6691 IFS=$as_save_IFS
6692 
6693   ;;
6694 esac
6695 fi
6696 CUT=$ac_cv_path_CUT
6697 if test -n "$CUT"; then
6698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6699 $as_echo "$CUT" >&6; }
6700 else
6701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702 $as_echo "no" >&6; }
6703 fi
6704 
6705 
6706   test -n "$CUT" && break
6707 done
6708 
6709   else
6710     # The variable is set, but is it from the command line or the environment?
6711 
6712     # Try to remove the string !CUT! from our list.
6713     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6714     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6715       # If it failed, the variable was not from the command line. Ignore it,
6716       # but warn the user (except for BASH, which is always set by the calling BASH).
6717       if test "xCUT" != xBASH; then
6718         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6719 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6720       fi
6721       # Try to locate tool using the code snippet
6722       for ac_prog in cut
6723 do
6724   # Extract the first word of "$ac_prog", so it can be a program name with args.
6725 set dummy $ac_prog; ac_word=$2
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6727 $as_echo_n "checking for $ac_word... " >&6; }
6728 if ${ac_cv_path_CUT+:} false; then :
6729   $as_echo_n "(cached) " >&6
6730 else
6731   case $CUT in
6732   [\\/]* | ?:[\\/]*)
6733   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6734   ;;
6735   *)
6736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737 for as_dir in $PATH
6738 do
6739   IFS=$as_save_IFS
6740   test -z "$as_dir" && as_dir=.
6741     for ac_exec_ext in '' $ac_executable_extensions; do
6742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6745     break 2
6746   fi
6747 done
6748   done
6749 IFS=$as_save_IFS
6750 
6751   ;;
6752 esac
6753 fi
6754 CUT=$ac_cv_path_CUT
6755 if test -n "$CUT"; then
6756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6757 $as_echo "$CUT" >&6; }
6758 else
6759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6760 $as_echo "no" >&6; }
6761 fi
6762 
6763 
6764   test -n "$CUT" && break
6765 done
6766 
6767     else
6768       # If it succeeded, then it was overridden by the user. We will use it
6769       # for the tool.
6770 
6771       # First remove it from the list of overridden variables, so we can test
6772       # for unknown variables in the end.
6773       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6774 
6775       # Check if we try to supply an empty value
6776       if test "x$CUT" = x; then
6777         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6778 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6780 $as_echo_n "checking for CUT... " >&6; }
6781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6782 $as_echo "disabled" >&6; }
6783       else
6784         # Check if the provided tool contains a complete path.
6785         tool_specified="$CUT"
6786         tool_basename="${tool_specified##*/}"
6787         if test "x$tool_basename" = "x$tool_specified"; then
6788           # A command without a complete path is provided, search $PATH.
6789           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6790 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6791           # Extract the first word of "$tool_basename", so it can be a program name with args.
6792 set dummy $tool_basename; ac_word=$2
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6794 $as_echo_n "checking for $ac_word... " >&6; }
6795 if ${ac_cv_path_CUT+:} false; then :
6796   $as_echo_n "(cached) " >&6
6797 else
6798   case $CUT in
6799   [\\/]* | ?:[\\/]*)
6800   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6801   ;;
6802   *)
6803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6804 for as_dir in $PATH
6805 do
6806   IFS=$as_save_IFS
6807   test -z "$as_dir" && as_dir=.
6808     for ac_exec_ext in '' $ac_executable_extensions; do
6809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6810     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6812     break 2
6813   fi
6814 done
6815   done
6816 IFS=$as_save_IFS
6817 
6818   ;;
6819 esac
6820 fi
6821 CUT=$ac_cv_path_CUT
6822 if test -n "$CUT"; then
6823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6824 $as_echo "$CUT" >&6; }
6825 else
6826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827 $as_echo "no" >&6; }
6828 fi
6829 
6830 
6831           if test "x$CUT" = x; then
6832             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6833           fi
6834         else
6835           # Otherwise we believe it is a complete path. Use it as it is.
6836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6837 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6839 $as_echo_n "checking for CUT... " >&6; }
6840           if test ! -x "$tool_specified"; then
6841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6842 $as_echo "not found" >&6; }
6843             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6844           fi
6845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6846 $as_echo "$tool_specified" >&6; }
6847         fi
6848       fi
6849     fi
6850 
6851   fi
6852 
6853 
6854 
6855   if test "x$CUT" = x; then
6856     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6857   fi
6858 
6859 
6860 
6861 
6862 
6863   # Publish this variable in the help.
6864 
6865 
6866   if [ -z "${DATE+x}" ]; then
6867     # The variable is not set by user, try to locate tool using the code snippet
6868     for ac_prog in date
6869 do
6870   # Extract the first word of "$ac_prog", so it can be a program name with args.
6871 set dummy $ac_prog; ac_word=$2
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6873 $as_echo_n "checking for $ac_word... " >&6; }
6874 if ${ac_cv_path_DATE+:} false; then :
6875   $as_echo_n "(cached) " >&6
6876 else
6877   case $DATE in
6878   [\\/]* | ?:[\\/]*)
6879   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6880   ;;
6881   *)
6882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6883 for as_dir in $PATH
6884 do
6885   IFS=$as_save_IFS
6886   test -z "$as_dir" && as_dir=.
6887     for ac_exec_ext in '' $ac_executable_extensions; do
6888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6889     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6891     break 2
6892   fi
6893 done
6894   done
6895 IFS=$as_save_IFS
6896 
6897   ;;
6898 esac
6899 fi
6900 DATE=$ac_cv_path_DATE
6901 if test -n "$DATE"; then
6902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6903 $as_echo "$DATE" >&6; }
6904 else
6905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906 $as_echo "no" >&6; }
6907 fi
6908 
6909 
6910   test -n "$DATE" && break
6911 done
6912 
6913   else
6914     # The variable is set, but is it from the command line or the environment?
6915 
6916     # Try to remove the string !DATE! from our list.
6917     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6918     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6919       # If it failed, the variable was not from the command line. Ignore it,
6920       # but warn the user (except for BASH, which is always set by the calling BASH).
6921       if test "xDATE" != xBASH; then
6922         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6923 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6924       fi
6925       # Try to locate tool using the code snippet
6926       for ac_prog in date
6927 do
6928   # Extract the first word of "$ac_prog", so it can be a program name with args.
6929 set dummy $ac_prog; ac_word=$2
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6931 $as_echo_n "checking for $ac_word... " >&6; }
6932 if ${ac_cv_path_DATE+:} false; then :
6933   $as_echo_n "(cached) " >&6
6934 else
6935   case $DATE in
6936   [\\/]* | ?:[\\/]*)
6937   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6938   ;;
6939   *)
6940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6941 for as_dir in $PATH
6942 do
6943   IFS=$as_save_IFS
6944   test -z "$as_dir" && as_dir=.
6945     for ac_exec_ext in '' $ac_executable_extensions; do
6946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6947     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6949     break 2
6950   fi
6951 done
6952   done
6953 IFS=$as_save_IFS
6954 
6955   ;;
6956 esac
6957 fi
6958 DATE=$ac_cv_path_DATE
6959 if test -n "$DATE"; then
6960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6961 $as_echo "$DATE" >&6; }
6962 else
6963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6964 $as_echo "no" >&6; }
6965 fi
6966 
6967 
6968   test -n "$DATE" && break
6969 done
6970 
6971     else
6972       # If it succeeded, then it was overridden by the user. We will use it
6973       # for the tool.
6974 
6975       # First remove it from the list of overridden variables, so we can test
6976       # for unknown variables in the end.
6977       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6978 
6979       # Check if we try to supply an empty value
6980       if test "x$DATE" = x; then
6981         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6982 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6983         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6984 $as_echo_n "checking for DATE... " >&6; }
6985         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6986 $as_echo "disabled" >&6; }
6987       else
6988         # Check if the provided tool contains a complete path.
6989         tool_specified="$DATE"
6990         tool_basename="${tool_specified##*/}"
6991         if test "x$tool_basename" = "x$tool_specified"; then
6992           # A command without a complete path is provided, search $PATH.
6993           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6994 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6995           # Extract the first word of "$tool_basename", so it can be a program name with args.
6996 set dummy $tool_basename; ac_word=$2
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998 $as_echo_n "checking for $ac_word... " >&6; }
6999 if ${ac_cv_path_DATE+:} false; then :
7000   $as_echo_n "(cached) " >&6
7001 else
7002   case $DATE in
7003   [\\/]* | ?:[\\/]*)
7004   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7005   ;;
7006   *)
7007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008 for as_dir in $PATH
7009 do
7010   IFS=$as_save_IFS
7011   test -z "$as_dir" && as_dir=.
7012     for ac_exec_ext in '' $ac_executable_extensions; do
7013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016     break 2
7017   fi
7018 done
7019   done
7020 IFS=$as_save_IFS
7021 
7022   ;;
7023 esac
7024 fi
7025 DATE=$ac_cv_path_DATE
7026 if test -n "$DATE"; then
7027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7028 $as_echo "$DATE" >&6; }
7029 else
7030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031 $as_echo "no" >&6; }
7032 fi
7033 
7034 
7035           if test "x$DATE" = x; then
7036             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7037           fi
7038         else
7039           # Otherwise we believe it is a complete path. Use it as it is.
7040           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7041 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7042           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7043 $as_echo_n "checking for DATE... " >&6; }
7044           if test ! -x "$tool_specified"; then
7045             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7046 $as_echo "not found" >&6; }
7047             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7048           fi
7049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7050 $as_echo "$tool_specified" >&6; }
7051         fi
7052       fi
7053     fi
7054 
7055   fi
7056 
7057 
7058 
7059   if test "x$DATE" = x; then
7060     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7061   fi
7062 
7063 
7064 
7065 
7066 
7067   # Publish this variable in the help.
7068 
7069 
7070   if [ -z "${DIFF+x}" ]; then
7071     # The variable is not set by user, try to locate tool using the code snippet
7072     for ac_prog in gdiff diff
7073 do
7074   # Extract the first word of "$ac_prog", so it can be a program name with args.
7075 set dummy $ac_prog; ac_word=$2
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7077 $as_echo_n "checking for $ac_word... " >&6; }
7078 if ${ac_cv_path_DIFF+:} false; then :
7079   $as_echo_n "(cached) " >&6
7080 else
7081   case $DIFF in
7082   [\\/]* | ?:[\\/]*)
7083   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7084   ;;
7085   *)
7086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087 for as_dir in $PATH
7088 do
7089   IFS=$as_save_IFS
7090   test -z "$as_dir" && as_dir=.
7091     for ac_exec_ext in '' $ac_executable_extensions; do
7092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7093     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7095     break 2
7096   fi
7097 done
7098   done
7099 IFS=$as_save_IFS
7100 
7101   ;;
7102 esac
7103 fi
7104 DIFF=$ac_cv_path_DIFF
7105 if test -n "$DIFF"; then
7106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7107 $as_echo "$DIFF" >&6; }
7108 else
7109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110 $as_echo "no" >&6; }
7111 fi
7112 
7113 
7114   test -n "$DIFF" && break
7115 done
7116 
7117   else
7118     # The variable is set, but is it from the command line or the environment?
7119 
7120     # Try to remove the string !DIFF! from our list.
7121     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7122     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7123       # If it failed, the variable was not from the command line. Ignore it,
7124       # but warn the user (except for BASH, which is always set by the calling BASH).
7125       if test "xDIFF" != xBASH; then
7126         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7127 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7128       fi
7129       # Try to locate tool using the code snippet
7130       for ac_prog in gdiff diff
7131 do
7132   # Extract the first word of "$ac_prog", so it can be a program name with args.
7133 set dummy $ac_prog; ac_word=$2
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135 $as_echo_n "checking for $ac_word... " >&6; }
7136 if ${ac_cv_path_DIFF+:} false; then :
7137   $as_echo_n "(cached) " >&6
7138 else
7139   case $DIFF in
7140   [\\/]* | ?:[\\/]*)
7141   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7142   ;;
7143   *)
7144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7145 for as_dir in $PATH
7146 do
7147   IFS=$as_save_IFS
7148   test -z "$as_dir" && as_dir=.
7149     for ac_exec_ext in '' $ac_executable_extensions; do
7150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7151     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7153     break 2
7154   fi
7155 done
7156   done
7157 IFS=$as_save_IFS
7158 
7159   ;;
7160 esac
7161 fi
7162 DIFF=$ac_cv_path_DIFF
7163 if test -n "$DIFF"; then
7164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7165 $as_echo "$DIFF" >&6; }
7166 else
7167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168 $as_echo "no" >&6; }
7169 fi
7170 
7171 
7172   test -n "$DIFF" && break
7173 done
7174 
7175     else
7176       # If it succeeded, then it was overridden by the user. We will use it
7177       # for the tool.
7178 
7179       # First remove it from the list of overridden variables, so we can test
7180       # for unknown variables in the end.
7181       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7182 
7183       # Check if we try to supply an empty value
7184       if test "x$DIFF" = x; then
7185         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7186 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7188 $as_echo_n "checking for DIFF... " >&6; }
7189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7190 $as_echo "disabled" >&6; }
7191       else
7192         # Check if the provided tool contains a complete path.
7193         tool_specified="$DIFF"
7194         tool_basename="${tool_specified##*/}"
7195         if test "x$tool_basename" = "x$tool_specified"; then
7196           # A command without a complete path is provided, search $PATH.
7197           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7198 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7199           # Extract the first word of "$tool_basename", so it can be a program name with args.
7200 set dummy $tool_basename; ac_word=$2
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202 $as_echo_n "checking for $ac_word... " >&6; }
7203 if ${ac_cv_path_DIFF+:} false; then :
7204   $as_echo_n "(cached) " >&6
7205 else
7206   case $DIFF in
7207   [\\/]* | ?:[\\/]*)
7208   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7209   ;;
7210   *)
7211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212 for as_dir in $PATH
7213 do
7214   IFS=$as_save_IFS
7215   test -z "$as_dir" && as_dir=.
7216     for ac_exec_ext in '' $ac_executable_extensions; do
7217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220     break 2
7221   fi
7222 done
7223   done
7224 IFS=$as_save_IFS
7225 
7226   ;;
7227 esac
7228 fi
7229 DIFF=$ac_cv_path_DIFF
7230 if test -n "$DIFF"; then
7231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7232 $as_echo "$DIFF" >&6; }
7233 else
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235 $as_echo "no" >&6; }
7236 fi
7237 
7238 
7239           if test "x$DIFF" = x; then
7240             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7241           fi
7242         else
7243           # Otherwise we believe it is a complete path. Use it as it is.
7244           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7245 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7246           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7247 $as_echo_n "checking for DIFF... " >&6; }
7248           if test ! -x "$tool_specified"; then
7249             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7250 $as_echo "not found" >&6; }
7251             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7252           fi
7253           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7254 $as_echo "$tool_specified" >&6; }
7255         fi
7256       fi
7257     fi
7258 
7259   fi
7260 
7261 
7262 
7263   if test "x$DIFF" = x; then
7264     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7265   fi
7266 
7267 
7268 
7269 
7270 
7271   # Publish this variable in the help.
7272 
7273 
7274   if [ -z "${DIRNAME+x}" ]; then
7275     # The variable is not set by user, try to locate tool using the code snippet
7276     for ac_prog in dirname
7277 do
7278   # Extract the first word of "$ac_prog", so it can be a program name with args.
7279 set dummy $ac_prog; ac_word=$2
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7281 $as_echo_n "checking for $ac_word... " >&6; }
7282 if ${ac_cv_path_DIRNAME+:} false; then :
7283   $as_echo_n "(cached) " >&6
7284 else
7285   case $DIRNAME in
7286   [\\/]* | ?:[\\/]*)
7287   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7288   ;;
7289   *)
7290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7291 for as_dir in $PATH
7292 do
7293   IFS=$as_save_IFS
7294   test -z "$as_dir" && as_dir=.
7295     for ac_exec_ext in '' $ac_executable_extensions; do
7296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7297     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7299     break 2
7300   fi
7301 done
7302   done
7303 IFS=$as_save_IFS
7304 
7305   ;;
7306 esac
7307 fi
7308 DIRNAME=$ac_cv_path_DIRNAME
7309 if test -n "$DIRNAME"; then
7310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7311 $as_echo "$DIRNAME" >&6; }
7312 else
7313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7314 $as_echo "no" >&6; }
7315 fi
7316 
7317 
7318   test -n "$DIRNAME" && break
7319 done
7320 
7321   else
7322     # The variable is set, but is it from the command line or the environment?
7323 
7324     # Try to remove the string !DIRNAME! from our list.
7325     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7326     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7327       # If it failed, the variable was not from the command line. Ignore it,
7328       # but warn the user (except for BASH, which is always set by the calling BASH).
7329       if test "xDIRNAME" != xBASH; then
7330         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7331 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7332       fi
7333       # Try to locate tool using the code snippet
7334       for ac_prog in dirname
7335 do
7336   # Extract the first word of "$ac_prog", so it can be a program name with args.
7337 set dummy $ac_prog; ac_word=$2
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7339 $as_echo_n "checking for $ac_word... " >&6; }
7340 if ${ac_cv_path_DIRNAME+:} false; then :
7341   $as_echo_n "(cached) " >&6
7342 else
7343   case $DIRNAME in
7344   [\\/]* | ?:[\\/]*)
7345   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7346   ;;
7347   *)
7348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7349 for as_dir in $PATH
7350 do
7351   IFS=$as_save_IFS
7352   test -z "$as_dir" && as_dir=.
7353     for ac_exec_ext in '' $ac_executable_extensions; do
7354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7355     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7357     break 2
7358   fi
7359 done
7360   done
7361 IFS=$as_save_IFS
7362 
7363   ;;
7364 esac
7365 fi
7366 DIRNAME=$ac_cv_path_DIRNAME
7367 if test -n "$DIRNAME"; then
7368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7369 $as_echo "$DIRNAME" >&6; }
7370 else
7371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7372 $as_echo "no" >&6; }
7373 fi
7374 
7375 
7376   test -n "$DIRNAME" && break
7377 done
7378 
7379     else
7380       # If it succeeded, then it was overridden by the user. We will use it
7381       # for the tool.
7382 
7383       # First remove it from the list of overridden variables, so we can test
7384       # for unknown variables in the end.
7385       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7386 
7387       # Check if we try to supply an empty value
7388       if test "x$DIRNAME" = x; then
7389         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7390 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7391         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7392 $as_echo_n "checking for DIRNAME... " >&6; }
7393         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7394 $as_echo "disabled" >&6; }
7395       else
7396         # Check if the provided tool contains a complete path.
7397         tool_specified="$DIRNAME"
7398         tool_basename="${tool_specified##*/}"
7399         if test "x$tool_basename" = "x$tool_specified"; then
7400           # A command without a complete path is provided, search $PATH.
7401           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7402 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7403           # Extract the first word of "$tool_basename", so it can be a program name with args.
7404 set dummy $tool_basename; ac_word=$2
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7406 $as_echo_n "checking for $ac_word... " >&6; }
7407 if ${ac_cv_path_DIRNAME+:} false; then :
7408   $as_echo_n "(cached) " >&6
7409 else
7410   case $DIRNAME in
7411   [\\/]* | ?:[\\/]*)
7412   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7413   ;;
7414   *)
7415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416 for as_dir in $PATH
7417 do
7418   IFS=$as_save_IFS
7419   test -z "$as_dir" && as_dir=.
7420     for ac_exec_ext in '' $ac_executable_extensions; do
7421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7424     break 2
7425   fi
7426 done
7427   done
7428 IFS=$as_save_IFS
7429 
7430   ;;
7431 esac
7432 fi
7433 DIRNAME=$ac_cv_path_DIRNAME
7434 if test -n "$DIRNAME"; then
7435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7436 $as_echo "$DIRNAME" >&6; }
7437 else
7438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7439 $as_echo "no" >&6; }
7440 fi
7441 
7442 
7443           if test "x$DIRNAME" = x; then
7444             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7445           fi
7446         else
7447           # Otherwise we believe it is a complete path. Use it as it is.
7448           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7449 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7450           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7451 $as_echo_n "checking for DIRNAME... " >&6; }
7452           if test ! -x "$tool_specified"; then
7453             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7454 $as_echo "not found" >&6; }
7455             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7456           fi
7457           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7458 $as_echo "$tool_specified" >&6; }
7459         fi
7460       fi
7461     fi
7462 
7463   fi
7464 
7465 
7466 
7467   if test "x$DIRNAME" = x; then
7468     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7469   fi
7470 
7471 
7472 
7473 
7474 
7475   # Publish this variable in the help.
7476 
7477 
7478   if [ -z "${ECHO+x}" ]; then
7479     # The variable is not set by user, try to locate tool using the code snippet
7480     for ac_prog in echo
7481 do
7482   # Extract the first word of "$ac_prog", so it can be a program name with args.
7483 set dummy $ac_prog; ac_word=$2
7484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485 $as_echo_n "checking for $ac_word... " >&6; }
7486 if ${ac_cv_path_ECHO+:} false; then :
7487   $as_echo_n "(cached) " >&6
7488 else
7489   case $ECHO in
7490   [\\/]* | ?:[\\/]*)
7491   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7492   ;;
7493   *)
7494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7495 for as_dir in $PATH
7496 do
7497   IFS=$as_save_IFS
7498   test -z "$as_dir" && as_dir=.
7499     for ac_exec_ext in '' $ac_executable_extensions; do
7500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7501     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7503     break 2
7504   fi
7505 done
7506   done
7507 IFS=$as_save_IFS
7508 
7509   ;;
7510 esac
7511 fi
7512 ECHO=$ac_cv_path_ECHO
7513 if test -n "$ECHO"; then
7514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7515 $as_echo "$ECHO" >&6; }
7516 else
7517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518 $as_echo "no" >&6; }
7519 fi
7520 
7521 
7522   test -n "$ECHO" && break
7523 done
7524 
7525   else
7526     # The variable is set, but is it from the command line or the environment?
7527 
7528     # Try to remove the string !ECHO! from our list.
7529     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7530     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7531       # If it failed, the variable was not from the command line. Ignore it,
7532       # but warn the user (except for BASH, which is always set by the calling BASH).
7533       if test "xECHO" != xBASH; then
7534         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7535 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7536       fi
7537       # Try to locate tool using the code snippet
7538       for ac_prog in echo
7539 do
7540   # Extract the first word of "$ac_prog", so it can be a program name with args.
7541 set dummy $ac_prog; ac_word=$2
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543 $as_echo_n "checking for $ac_word... " >&6; }
7544 if ${ac_cv_path_ECHO+:} false; then :
7545   $as_echo_n "(cached) " >&6
7546 else
7547   case $ECHO in
7548   [\\/]* | ?:[\\/]*)
7549   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7550   ;;
7551   *)
7552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7553 for as_dir in $PATH
7554 do
7555   IFS=$as_save_IFS
7556   test -z "$as_dir" && as_dir=.
7557     for ac_exec_ext in '' $ac_executable_extensions; do
7558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7559     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7561     break 2
7562   fi
7563 done
7564   done
7565 IFS=$as_save_IFS
7566 
7567   ;;
7568 esac
7569 fi
7570 ECHO=$ac_cv_path_ECHO
7571 if test -n "$ECHO"; then
7572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7573 $as_echo "$ECHO" >&6; }
7574 else
7575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7576 $as_echo "no" >&6; }
7577 fi
7578 
7579 
7580   test -n "$ECHO" && break
7581 done
7582 
7583     else
7584       # If it succeeded, then it was overridden by the user. We will use it
7585       # for the tool.
7586 
7587       # First remove it from the list of overridden variables, so we can test
7588       # for unknown variables in the end.
7589       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7590 
7591       # Check if we try to supply an empty value
7592       if test "x$ECHO" = x; then
7593         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7594 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7595         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7596 $as_echo_n "checking for ECHO... " >&6; }
7597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7598 $as_echo "disabled" >&6; }
7599       else
7600         # Check if the provided tool contains a complete path.
7601         tool_specified="$ECHO"
7602         tool_basename="${tool_specified##*/}"
7603         if test "x$tool_basename" = "x$tool_specified"; then
7604           # A command without a complete path is provided, search $PATH.
7605           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7606 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7607           # Extract the first word of "$tool_basename", so it can be a program name with args.
7608 set dummy $tool_basename; ac_word=$2
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610 $as_echo_n "checking for $ac_word... " >&6; }
7611 if ${ac_cv_path_ECHO+:} false; then :
7612   $as_echo_n "(cached) " >&6
7613 else
7614   case $ECHO in
7615   [\\/]* | ?:[\\/]*)
7616   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7617   ;;
7618   *)
7619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7620 for as_dir in $PATH
7621 do
7622   IFS=$as_save_IFS
7623   test -z "$as_dir" && as_dir=.
7624     for ac_exec_ext in '' $ac_executable_extensions; do
7625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7626     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7628     break 2
7629   fi
7630 done
7631   done
7632 IFS=$as_save_IFS
7633 
7634   ;;
7635 esac
7636 fi
7637 ECHO=$ac_cv_path_ECHO
7638 if test -n "$ECHO"; then
7639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7640 $as_echo "$ECHO" >&6; }
7641 else
7642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643 $as_echo "no" >&6; }
7644 fi
7645 
7646 
7647           if test "x$ECHO" = x; then
7648             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7649           fi
7650         else
7651           # Otherwise we believe it is a complete path. Use it as it is.
7652           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7653 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7654           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7655 $as_echo_n "checking for ECHO... " >&6; }
7656           if test ! -x "$tool_specified"; then
7657             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7658 $as_echo "not found" >&6; }
7659             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7660           fi
7661           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7662 $as_echo "$tool_specified" >&6; }
7663         fi
7664       fi
7665     fi
7666 
7667   fi
7668 
7669 
7670 
7671   if test "x$ECHO" = x; then
7672     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7673   fi
7674 
7675 
7676 
7677 
7678 
7679   # Publish this variable in the help.
7680 
7681 
7682   if [ -z "${EXPR+x}" ]; then
7683     # The variable is not set by user, try to locate tool using the code snippet
7684     for ac_prog in expr
7685 do
7686   # Extract the first word of "$ac_prog", so it can be a program name with args.
7687 set dummy $ac_prog; ac_word=$2
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7689 $as_echo_n "checking for $ac_word... " >&6; }
7690 if ${ac_cv_path_EXPR+:} false; then :
7691   $as_echo_n "(cached) " >&6
7692 else
7693   case $EXPR in
7694   [\\/]* | ?:[\\/]*)
7695   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7696   ;;
7697   *)
7698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7699 for as_dir in $PATH
7700 do
7701   IFS=$as_save_IFS
7702   test -z "$as_dir" && as_dir=.
7703     for ac_exec_ext in '' $ac_executable_extensions; do
7704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7705     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7707     break 2
7708   fi
7709 done
7710   done
7711 IFS=$as_save_IFS
7712 
7713   ;;
7714 esac
7715 fi
7716 EXPR=$ac_cv_path_EXPR
7717 if test -n "$EXPR"; then
7718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7719 $as_echo "$EXPR" >&6; }
7720 else
7721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7722 $as_echo "no" >&6; }
7723 fi
7724 
7725 
7726   test -n "$EXPR" && break
7727 done
7728 
7729   else
7730     # The variable is set, but is it from the command line or the environment?
7731 
7732     # Try to remove the string !EXPR! from our list.
7733     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7734     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7735       # If it failed, the variable was not from the command line. Ignore it,
7736       # but warn the user (except for BASH, which is always set by the calling BASH).
7737       if test "xEXPR" != xBASH; then
7738         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7739 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7740       fi
7741       # Try to locate tool using the code snippet
7742       for ac_prog in expr
7743 do
7744   # Extract the first word of "$ac_prog", so it can be a program name with args.
7745 set dummy $ac_prog; ac_word=$2
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7747 $as_echo_n "checking for $ac_word... " >&6; }
7748 if ${ac_cv_path_EXPR+:} false; then :
7749   $as_echo_n "(cached) " >&6
7750 else
7751   case $EXPR in
7752   [\\/]* | ?:[\\/]*)
7753   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7754   ;;
7755   *)
7756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7757 for as_dir in $PATH
7758 do
7759   IFS=$as_save_IFS
7760   test -z "$as_dir" && as_dir=.
7761     for ac_exec_ext in '' $ac_executable_extensions; do
7762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7763     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7765     break 2
7766   fi
7767 done
7768   done
7769 IFS=$as_save_IFS
7770 
7771   ;;
7772 esac
7773 fi
7774 EXPR=$ac_cv_path_EXPR
7775 if test -n "$EXPR"; then
7776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7777 $as_echo "$EXPR" >&6; }
7778 else
7779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7781 fi
7782 
7783 
7784   test -n "$EXPR" && break
7785 done
7786 
7787     else
7788       # If it succeeded, then it was overridden by the user. We will use it
7789       # for the tool.
7790 
7791       # First remove it from the list of overridden variables, so we can test
7792       # for unknown variables in the end.
7793       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7794 
7795       # Check if we try to supply an empty value
7796       if test "x$EXPR" = x; then
7797         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7798 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7799         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7800 $as_echo_n "checking for EXPR... " >&6; }
7801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7802 $as_echo "disabled" >&6; }
7803       else
7804         # Check if the provided tool contains a complete path.
7805         tool_specified="$EXPR"
7806         tool_basename="${tool_specified##*/}"
7807         if test "x$tool_basename" = "x$tool_specified"; then
7808           # A command without a complete path is provided, search $PATH.
7809           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7810 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7811           # Extract the first word of "$tool_basename", so it can be a program name with args.
7812 set dummy $tool_basename; ac_word=$2
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814 $as_echo_n "checking for $ac_word... " >&6; }
7815 if ${ac_cv_path_EXPR+:} false; then :
7816   $as_echo_n "(cached) " >&6
7817 else
7818   case $EXPR in
7819   [\\/]* | ?:[\\/]*)
7820   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7821   ;;
7822   *)
7823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824 for as_dir in $PATH
7825 do
7826   IFS=$as_save_IFS
7827   test -z "$as_dir" && as_dir=.
7828     for ac_exec_ext in '' $ac_executable_extensions; do
7829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7832     break 2
7833   fi
7834 done
7835   done
7836 IFS=$as_save_IFS
7837 
7838   ;;
7839 esac
7840 fi
7841 EXPR=$ac_cv_path_EXPR
7842 if test -n "$EXPR"; then
7843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7844 $as_echo "$EXPR" >&6; }
7845 else
7846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847 $as_echo "no" >&6; }
7848 fi
7849 
7850 
7851           if test "x$EXPR" = x; then
7852             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7853           fi
7854         else
7855           # Otherwise we believe it is a complete path. Use it as it is.
7856           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7857 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7858           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7859 $as_echo_n "checking for EXPR... " >&6; }
7860           if test ! -x "$tool_specified"; then
7861             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7862 $as_echo "not found" >&6; }
7863             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7864           fi
7865           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7866 $as_echo "$tool_specified" >&6; }
7867         fi
7868       fi
7869     fi
7870 
7871   fi
7872 
7873 
7874 
7875   if test "x$EXPR" = x; then
7876     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7877   fi
7878 
7879 
7880 
7881 
7882 
7883   # Publish this variable in the help.
7884 
7885 
7886   if [ -z "${FILE+x}" ]; then
7887     # The variable is not set by user, try to locate tool using the code snippet
7888     for ac_prog in file
7889 do
7890   # Extract the first word of "$ac_prog", so it can be a program name with args.
7891 set dummy $ac_prog; ac_word=$2
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7893 $as_echo_n "checking for $ac_word... " >&6; }
7894 if ${ac_cv_path_FILE+:} false; then :
7895   $as_echo_n "(cached) " >&6
7896 else
7897   case $FILE in
7898   [\\/]* | ?:[\\/]*)
7899   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7900   ;;
7901   *)
7902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7903 for as_dir in $PATH
7904 do
7905   IFS=$as_save_IFS
7906   test -z "$as_dir" && as_dir=.
7907     for ac_exec_ext in '' $ac_executable_extensions; do
7908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7909     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7911     break 2
7912   fi
7913 done
7914   done
7915 IFS=$as_save_IFS
7916 
7917   ;;
7918 esac
7919 fi
7920 FILE=$ac_cv_path_FILE
7921 if test -n "$FILE"; then
7922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7923 $as_echo "$FILE" >&6; }
7924 else
7925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7926 $as_echo "no" >&6; }
7927 fi
7928 
7929 
7930   test -n "$FILE" && break
7931 done
7932 
7933   else
7934     # The variable is set, but is it from the command line or the environment?
7935 
7936     # Try to remove the string !FILE! from our list.
7937     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7938     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7939       # If it failed, the variable was not from the command line. Ignore it,
7940       # but warn the user (except for BASH, which is always set by the calling BASH).
7941       if test "xFILE" != xBASH; then
7942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7943 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7944       fi
7945       # Try to locate tool using the code snippet
7946       for ac_prog in file
7947 do
7948   # Extract the first word of "$ac_prog", so it can be a program name with args.
7949 set dummy $ac_prog; ac_word=$2
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7951 $as_echo_n "checking for $ac_word... " >&6; }
7952 if ${ac_cv_path_FILE+:} false; then :
7953   $as_echo_n "(cached) " >&6
7954 else
7955   case $FILE in
7956   [\\/]* | ?:[\\/]*)
7957   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7958   ;;
7959   *)
7960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7961 for as_dir in $PATH
7962 do
7963   IFS=$as_save_IFS
7964   test -z "$as_dir" && as_dir=.
7965     for ac_exec_ext in '' $ac_executable_extensions; do
7966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7967     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7969     break 2
7970   fi
7971 done
7972   done
7973 IFS=$as_save_IFS
7974 
7975   ;;
7976 esac
7977 fi
7978 FILE=$ac_cv_path_FILE
7979 if test -n "$FILE"; then
7980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7981 $as_echo "$FILE" >&6; }
7982 else
7983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7984 $as_echo "no" >&6; }
7985 fi
7986 
7987 
7988   test -n "$FILE" && break
7989 done
7990 
7991     else
7992       # If it succeeded, then it was overridden by the user. We will use it
7993       # for the tool.
7994 
7995       # First remove it from the list of overridden variables, so we can test
7996       # for unknown variables in the end.
7997       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7998 
7999       # Check if we try to supply an empty value
8000       if test "x$FILE" = x; then
8001         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8002 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8003         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8004 $as_echo_n "checking for FILE... " >&6; }
8005         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8006 $as_echo "disabled" >&6; }
8007       else
8008         # Check if the provided tool contains a complete path.
8009         tool_specified="$FILE"
8010         tool_basename="${tool_specified##*/}"
8011         if test "x$tool_basename" = "x$tool_specified"; then
8012           # A command without a complete path is provided, search $PATH.
8013           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8014 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8015           # Extract the first word of "$tool_basename", so it can be a program name with args.
8016 set dummy $tool_basename; ac_word=$2
8017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018 $as_echo_n "checking for $ac_word... " >&6; }
8019 if ${ac_cv_path_FILE+:} false; then :
8020   $as_echo_n "(cached) " >&6
8021 else
8022   case $FILE in
8023   [\\/]* | ?:[\\/]*)
8024   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8025   ;;
8026   *)
8027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028 for as_dir in $PATH
8029 do
8030   IFS=$as_save_IFS
8031   test -z "$as_dir" && as_dir=.
8032     for ac_exec_ext in '' $ac_executable_extensions; do
8033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8034     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036     break 2
8037   fi
8038 done
8039   done
8040 IFS=$as_save_IFS
8041 
8042   ;;
8043 esac
8044 fi
8045 FILE=$ac_cv_path_FILE
8046 if test -n "$FILE"; then
8047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8048 $as_echo "$FILE" >&6; }
8049 else
8050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8051 $as_echo "no" >&6; }
8052 fi
8053 
8054 
8055           if test "x$FILE" = x; then
8056             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8057           fi
8058         else
8059           # Otherwise we believe it is a complete path. Use it as it is.
8060           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8061 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8062           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8063 $as_echo_n "checking for FILE... " >&6; }
8064           if test ! -x "$tool_specified"; then
8065             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8066 $as_echo "not found" >&6; }
8067             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8068           fi
8069           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8070 $as_echo "$tool_specified" >&6; }
8071         fi
8072       fi
8073     fi
8074 
8075   fi
8076 
8077 
8078 
8079   if test "x$FILE" = x; then
8080     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8081   fi
8082 
8083 
8084 
8085 
8086 
8087   # Publish this variable in the help.
8088 
8089 
8090   if [ -z "${FIND+x}" ]; then
8091     # The variable is not set by user, try to locate tool using the code snippet
8092     for ac_prog in find
8093 do
8094   # Extract the first word of "$ac_prog", so it can be a program name with args.
8095 set dummy $ac_prog; ac_word=$2
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097 $as_echo_n "checking for $ac_word... " >&6; }
8098 if ${ac_cv_path_FIND+:} false; then :
8099   $as_echo_n "(cached) " >&6
8100 else
8101   case $FIND in
8102   [\\/]* | ?:[\\/]*)
8103   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8104   ;;
8105   *)
8106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107 for as_dir in $PATH
8108 do
8109   IFS=$as_save_IFS
8110   test -z "$as_dir" && as_dir=.
8111     for ac_exec_ext in '' $ac_executable_extensions; do
8112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115     break 2
8116   fi
8117 done
8118   done
8119 IFS=$as_save_IFS
8120 
8121   ;;
8122 esac
8123 fi
8124 FIND=$ac_cv_path_FIND
8125 if test -n "$FIND"; then
8126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8127 $as_echo "$FIND" >&6; }
8128 else
8129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130 $as_echo "no" >&6; }
8131 fi
8132 
8133 
8134   test -n "$FIND" && break
8135 done
8136 
8137   else
8138     # The variable is set, but is it from the command line or the environment?
8139 
8140     # Try to remove the string !FIND! from our list.
8141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8143       # If it failed, the variable was not from the command line. Ignore it,
8144       # but warn the user (except for BASH, which is always set by the calling BASH).
8145       if test "xFIND" != xBASH; then
8146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8147 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8148       fi
8149       # Try to locate tool using the code snippet
8150       for ac_prog in find
8151 do
8152   # Extract the first word of "$ac_prog", so it can be a program name with args.
8153 set dummy $ac_prog; ac_word=$2
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155 $as_echo_n "checking for $ac_word... " >&6; }
8156 if ${ac_cv_path_FIND+:} false; then :
8157   $as_echo_n "(cached) " >&6
8158 else
8159   case $FIND in
8160   [\\/]* | ?:[\\/]*)
8161   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8162   ;;
8163   *)
8164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165 for as_dir in $PATH
8166 do
8167   IFS=$as_save_IFS
8168   test -z "$as_dir" && as_dir=.
8169     for ac_exec_ext in '' $ac_executable_extensions; do
8170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173     break 2
8174   fi
8175 done
8176   done
8177 IFS=$as_save_IFS
8178 
8179   ;;
8180 esac
8181 fi
8182 FIND=$ac_cv_path_FIND
8183 if test -n "$FIND"; then
8184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8185 $as_echo "$FIND" >&6; }
8186 else
8187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188 $as_echo "no" >&6; }
8189 fi
8190 
8191 
8192   test -n "$FIND" && break
8193 done
8194 
8195     else
8196       # If it succeeded, then it was overridden by the user. We will use it
8197       # for the tool.
8198 
8199       # First remove it from the list of overridden variables, so we can test
8200       # for unknown variables in the end.
8201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8202 
8203       # Check if we try to supply an empty value
8204       if test "x$FIND" = x; then
8205         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8206 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8207         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8208 $as_echo_n "checking for FIND... " >&6; }
8209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8210 $as_echo "disabled" >&6; }
8211       else
8212         # Check if the provided tool contains a complete path.
8213         tool_specified="$FIND"
8214         tool_basename="${tool_specified##*/}"
8215         if test "x$tool_basename" = "x$tool_specified"; then
8216           # A command without a complete path is provided, search $PATH.
8217           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8218 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8219           # Extract the first word of "$tool_basename", so it can be a program name with args.
8220 set dummy $tool_basename; ac_word=$2
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8222 $as_echo_n "checking for $ac_word... " >&6; }
8223 if ${ac_cv_path_FIND+:} false; then :
8224   $as_echo_n "(cached) " >&6
8225 else
8226   case $FIND in
8227   [\\/]* | ?:[\\/]*)
8228   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8229   ;;
8230   *)
8231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8232 for as_dir in $PATH
8233 do
8234   IFS=$as_save_IFS
8235   test -z "$as_dir" && as_dir=.
8236     for ac_exec_ext in '' $ac_executable_extensions; do
8237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8238     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8240     break 2
8241   fi
8242 done
8243   done
8244 IFS=$as_save_IFS
8245 
8246   ;;
8247 esac
8248 fi
8249 FIND=$ac_cv_path_FIND
8250 if test -n "$FIND"; then
8251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8252 $as_echo "$FIND" >&6; }
8253 else
8254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8255 $as_echo "no" >&6; }
8256 fi
8257 
8258 
8259           if test "x$FIND" = x; then
8260             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8261           fi
8262         else
8263           # Otherwise we believe it is a complete path. Use it as it is.
8264           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8265 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8266           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8267 $as_echo_n "checking for FIND... " >&6; }
8268           if test ! -x "$tool_specified"; then
8269             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8270 $as_echo "not found" >&6; }
8271             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8272           fi
8273           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8274 $as_echo "$tool_specified" >&6; }
8275         fi
8276       fi
8277     fi
8278 
8279   fi
8280 
8281 
8282 
8283   if test "x$FIND" = x; then
8284     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8285   fi
8286 
8287 
8288 
8289 
8290 
8291   # Publish this variable in the help.
8292 
8293 
8294   if [ -z "${HEAD+x}" ]; then
8295     # The variable is not set by user, try to locate tool using the code snippet
8296     for ac_prog in head
8297 do
8298   # Extract the first word of "$ac_prog", so it can be a program name with args.
8299 set dummy $ac_prog; ac_word=$2
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8301 $as_echo_n "checking for $ac_word... " >&6; }
8302 if ${ac_cv_path_HEAD+:} false; then :
8303   $as_echo_n "(cached) " >&6
8304 else
8305   case $HEAD in
8306   [\\/]* | ?:[\\/]*)
8307   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8308   ;;
8309   *)
8310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311 for as_dir in $PATH
8312 do
8313   IFS=$as_save_IFS
8314   test -z "$as_dir" && as_dir=.
8315     for ac_exec_ext in '' $ac_executable_extensions; do
8316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8317     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8319     break 2
8320   fi
8321 done
8322   done
8323 IFS=$as_save_IFS
8324 
8325   ;;
8326 esac
8327 fi
8328 HEAD=$ac_cv_path_HEAD
8329 if test -n "$HEAD"; then
8330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8331 $as_echo "$HEAD" >&6; }
8332 else
8333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8334 $as_echo "no" >&6; }
8335 fi
8336 
8337 
8338   test -n "$HEAD" && break
8339 done
8340 
8341   else
8342     # The variable is set, but is it from the command line or the environment?
8343 
8344     # Try to remove the string !HEAD! from our list.
8345     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8346     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8347       # If it failed, the variable was not from the command line. Ignore it,
8348       # but warn the user (except for BASH, which is always set by the calling BASH).
8349       if test "xHEAD" != xBASH; then
8350         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8351 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8352       fi
8353       # Try to locate tool using the code snippet
8354       for ac_prog in head
8355 do
8356   # Extract the first word of "$ac_prog", so it can be a program name with args.
8357 set dummy $ac_prog; ac_word=$2
8358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8359 $as_echo_n "checking for $ac_word... " >&6; }
8360 if ${ac_cv_path_HEAD+:} false; then :
8361   $as_echo_n "(cached) " >&6
8362 else
8363   case $HEAD in
8364   [\\/]* | ?:[\\/]*)
8365   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8366   ;;
8367   *)
8368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8369 for as_dir in $PATH
8370 do
8371   IFS=$as_save_IFS
8372   test -z "$as_dir" && as_dir=.
8373     for ac_exec_ext in '' $ac_executable_extensions; do
8374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8375     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8377     break 2
8378   fi
8379 done
8380   done
8381 IFS=$as_save_IFS
8382 
8383   ;;
8384 esac
8385 fi
8386 HEAD=$ac_cv_path_HEAD
8387 if test -n "$HEAD"; then
8388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8389 $as_echo "$HEAD" >&6; }
8390 else
8391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8392 $as_echo "no" >&6; }
8393 fi
8394 
8395 
8396   test -n "$HEAD" && break
8397 done
8398 
8399     else
8400       # If it succeeded, then it was overridden by the user. We will use it
8401       # for the tool.
8402 
8403       # First remove it from the list of overridden variables, so we can test
8404       # for unknown variables in the end.
8405       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8406 
8407       # Check if we try to supply an empty value
8408       if test "x$HEAD" = x; then
8409         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8410 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8412 $as_echo_n "checking for HEAD... " >&6; }
8413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8414 $as_echo "disabled" >&6; }
8415       else
8416         # Check if the provided tool contains a complete path.
8417         tool_specified="$HEAD"
8418         tool_basename="${tool_specified##*/}"
8419         if test "x$tool_basename" = "x$tool_specified"; then
8420           # A command without a complete path is provided, search $PATH.
8421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8422 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8423           # Extract the first word of "$tool_basename", so it can be a program name with args.
8424 set dummy $tool_basename; ac_word=$2
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8426 $as_echo_n "checking for $ac_word... " >&6; }
8427 if ${ac_cv_path_HEAD+:} false; then :
8428   $as_echo_n "(cached) " >&6
8429 else
8430   case $HEAD in
8431   [\\/]* | ?:[\\/]*)
8432   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8433   ;;
8434   *)
8435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8436 for as_dir in $PATH
8437 do
8438   IFS=$as_save_IFS
8439   test -z "$as_dir" && as_dir=.
8440     for ac_exec_ext in '' $ac_executable_extensions; do
8441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8442     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8444     break 2
8445   fi
8446 done
8447   done
8448 IFS=$as_save_IFS
8449 
8450   ;;
8451 esac
8452 fi
8453 HEAD=$ac_cv_path_HEAD
8454 if test -n "$HEAD"; then
8455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8456 $as_echo "$HEAD" >&6; }
8457 else
8458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459 $as_echo "no" >&6; }
8460 fi
8461 
8462 
8463           if test "x$HEAD" = x; then
8464             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8465           fi
8466         else
8467           # Otherwise we believe it is a complete path. Use it as it is.
8468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8469 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8470           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8471 $as_echo_n "checking for HEAD... " >&6; }
8472           if test ! -x "$tool_specified"; then
8473             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8474 $as_echo "not found" >&6; }
8475             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8476           fi
8477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8478 $as_echo "$tool_specified" >&6; }
8479         fi
8480       fi
8481     fi
8482 
8483   fi
8484 
8485 
8486 
8487   if test "x$HEAD" = x; then
8488     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8489   fi
8490 
8491 
8492 
8493 
8494 
8495   # Publish this variable in the help.
8496 
8497 
8498   if [ -z "${GUNZIP+x}" ]; then
8499     # The variable is not set by user, try to locate tool using the code snippet
8500     for ac_prog in gunzip
8501 do
8502   # Extract the first word of "$ac_prog", so it can be a program name with args.
8503 set dummy $ac_prog; ac_word=$2
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505 $as_echo_n "checking for $ac_word... " >&6; }
8506 if ${ac_cv_path_GUNZIP+:} false; then :
8507   $as_echo_n "(cached) " >&6
8508 else
8509   case $GUNZIP in
8510   [\\/]* | ?:[\\/]*)
8511   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8512   ;;
8513   *)
8514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8515 for as_dir in $PATH
8516 do
8517   IFS=$as_save_IFS
8518   test -z "$as_dir" && as_dir=.
8519     for ac_exec_ext in '' $ac_executable_extensions; do
8520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8521     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8523     break 2
8524   fi
8525 done
8526   done
8527 IFS=$as_save_IFS
8528 
8529   ;;
8530 esac
8531 fi
8532 GUNZIP=$ac_cv_path_GUNZIP
8533 if test -n "$GUNZIP"; then
8534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8535 $as_echo "$GUNZIP" >&6; }
8536 else
8537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8538 $as_echo "no" >&6; }
8539 fi
8540 
8541 
8542   test -n "$GUNZIP" && break
8543 done
8544 
8545   else
8546     # The variable is set, but is it from the command line or the environment?
8547 
8548     # Try to remove the string !GUNZIP! from our list.
8549     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8550     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8551       # If it failed, the variable was not from the command line. Ignore it,
8552       # but warn the user (except for BASH, which is always set by the calling BASH).
8553       if test "xGUNZIP" != xBASH; then
8554         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8555 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8556       fi
8557       # Try to locate tool using the code snippet
8558       for ac_prog in gunzip
8559 do
8560   # Extract the first word of "$ac_prog", so it can be a program name with args.
8561 set dummy $ac_prog; ac_word=$2
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8563 $as_echo_n "checking for $ac_word... " >&6; }
8564 if ${ac_cv_path_GUNZIP+:} false; then :
8565   $as_echo_n "(cached) " >&6
8566 else
8567   case $GUNZIP in
8568   [\\/]* | ?:[\\/]*)
8569   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8570   ;;
8571   *)
8572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8573 for as_dir in $PATH
8574 do
8575   IFS=$as_save_IFS
8576   test -z "$as_dir" && as_dir=.
8577     for ac_exec_ext in '' $ac_executable_extensions; do
8578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8579     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8581     break 2
8582   fi
8583 done
8584   done
8585 IFS=$as_save_IFS
8586 
8587   ;;
8588 esac
8589 fi
8590 GUNZIP=$ac_cv_path_GUNZIP
8591 if test -n "$GUNZIP"; then
8592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8593 $as_echo "$GUNZIP" >&6; }
8594 else
8595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596 $as_echo "no" >&6; }
8597 fi
8598 
8599 
8600   test -n "$GUNZIP" && break
8601 done
8602 
8603     else
8604       # If it succeeded, then it was overridden by the user. We will use it
8605       # for the tool.
8606 
8607       # First remove it from the list of overridden variables, so we can test
8608       # for unknown variables in the end.
8609       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8610 
8611       # Check if we try to supply an empty value
8612       if test "x$GUNZIP" = x; then
8613         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8614 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8616 $as_echo_n "checking for GUNZIP... " >&6; }
8617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8618 $as_echo "disabled" >&6; }
8619       else
8620         # Check if the provided tool contains a complete path.
8621         tool_specified="$GUNZIP"
8622         tool_basename="${tool_specified##*/}"
8623         if test "x$tool_basename" = "x$tool_specified"; then
8624           # A command without a complete path is provided, search $PATH.
8625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8626 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8627           # Extract the first word of "$tool_basename", so it can be a program name with args.
8628 set dummy $tool_basename; ac_word=$2
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630 $as_echo_n "checking for $ac_word... " >&6; }
8631 if ${ac_cv_path_GUNZIP+:} false; then :
8632   $as_echo_n "(cached) " >&6
8633 else
8634   case $GUNZIP in
8635   [\\/]* | ?:[\\/]*)
8636   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8637   ;;
8638   *)
8639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640 for as_dir in $PATH
8641 do
8642   IFS=$as_save_IFS
8643   test -z "$as_dir" && as_dir=.
8644     for ac_exec_ext in '' $ac_executable_extensions; do
8645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8646     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648     break 2
8649   fi
8650 done
8651   done
8652 IFS=$as_save_IFS
8653 
8654   ;;
8655 esac
8656 fi
8657 GUNZIP=$ac_cv_path_GUNZIP
8658 if test -n "$GUNZIP"; then
8659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8660 $as_echo "$GUNZIP" >&6; }
8661 else
8662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8663 $as_echo "no" >&6; }
8664 fi
8665 
8666 
8667           if test "x$GUNZIP" = x; then
8668             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8669           fi
8670         else
8671           # Otherwise we believe it is a complete path. Use it as it is.
8672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8673 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8674           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8675 $as_echo_n "checking for GUNZIP... " >&6; }
8676           if test ! -x "$tool_specified"; then
8677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8678 $as_echo "not found" >&6; }
8679             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8680           fi
8681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8682 $as_echo "$tool_specified" >&6; }
8683         fi
8684       fi
8685     fi
8686 
8687   fi
8688 
8689 
8690 
8691   if test "x$GUNZIP" = x; then
8692     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8693   fi
8694 
8695 
8696 
8697 
8698 
8699   # Publish this variable in the help.
8700 
8701 
8702   if [ -z "${GZIP+x}" ]; then
8703     # The variable is not set by user, try to locate tool using the code snippet
8704     for ac_prog in pigz gzip
8705 do
8706   # Extract the first word of "$ac_prog", so it can be a program name with args.
8707 set dummy $ac_prog; ac_word=$2
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8709 $as_echo_n "checking for $ac_word... " >&6; }
8710 if ${ac_cv_path_GZIP+:} false; then :
8711   $as_echo_n "(cached) " >&6
8712 else
8713   case $GZIP in
8714   [\\/]* | ?:[\\/]*)
8715   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8716   ;;
8717   *)
8718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8719 for as_dir in $PATH
8720 do
8721   IFS=$as_save_IFS
8722   test -z "$as_dir" && as_dir=.
8723     for ac_exec_ext in '' $ac_executable_extensions; do
8724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8725     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8727     break 2
8728   fi
8729 done
8730   done
8731 IFS=$as_save_IFS
8732 
8733   ;;
8734 esac
8735 fi
8736 GZIP=$ac_cv_path_GZIP
8737 if test -n "$GZIP"; then
8738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8739 $as_echo "$GZIP" >&6; }
8740 else
8741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742 $as_echo "no" >&6; }
8743 fi
8744 
8745 
8746   test -n "$GZIP" && break
8747 done
8748 
8749   else
8750     # The variable is set, but is it from the command line or the environment?
8751 
8752     # Try to remove the string !GZIP! from our list.
8753     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8754     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8755       # If it failed, the variable was not from the command line. Ignore it,
8756       # but warn the user (except for BASH, which is always set by the calling BASH).
8757       if test "xGZIP" != xBASH; then
8758         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8759 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8760       fi
8761       # Try to locate tool using the code snippet
8762       for ac_prog in pigz gzip
8763 do
8764   # Extract the first word of "$ac_prog", so it can be a program name with args.
8765 set dummy $ac_prog; ac_word=$2
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8767 $as_echo_n "checking for $ac_word... " >&6; }
8768 if ${ac_cv_path_GZIP+:} false; then :
8769   $as_echo_n "(cached) " >&6
8770 else
8771   case $GZIP in
8772   [\\/]* | ?:[\\/]*)
8773   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8774   ;;
8775   *)
8776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8777 for as_dir in $PATH
8778 do
8779   IFS=$as_save_IFS
8780   test -z "$as_dir" && as_dir=.
8781     for ac_exec_ext in '' $ac_executable_extensions; do
8782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8783     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8785     break 2
8786   fi
8787 done
8788   done
8789 IFS=$as_save_IFS
8790 
8791   ;;
8792 esac
8793 fi
8794 GZIP=$ac_cv_path_GZIP
8795 if test -n "$GZIP"; then
8796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8797 $as_echo "$GZIP" >&6; }
8798 else
8799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800 $as_echo "no" >&6; }
8801 fi
8802 
8803 
8804   test -n "$GZIP" && break
8805 done
8806 
8807     else
8808       # If it succeeded, then it was overridden by the user. We will use it
8809       # for the tool.
8810 
8811       # First remove it from the list of overridden variables, so we can test
8812       # for unknown variables in the end.
8813       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8814 
8815       # Check if we try to supply an empty value
8816       if test "x$GZIP" = x; then
8817         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8818 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8819         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8820 $as_echo_n "checking for GZIP... " >&6; }
8821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8822 $as_echo "disabled" >&6; }
8823       else
8824         # Check if the provided tool contains a complete path.
8825         tool_specified="$GZIP"
8826         tool_basename="${tool_specified##*/}"
8827         if test "x$tool_basename" = "x$tool_specified"; then
8828           # A command without a complete path is provided, search $PATH.
8829           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8830 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8831           # Extract the first word of "$tool_basename", so it can be a program name with args.
8832 set dummy $tool_basename; ac_word=$2
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834 $as_echo_n "checking for $ac_word... " >&6; }
8835 if ${ac_cv_path_GZIP+:} false; then :
8836   $as_echo_n "(cached) " >&6
8837 else
8838   case $GZIP in
8839   [\\/]* | ?:[\\/]*)
8840   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8841   ;;
8842   *)
8843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8844 for as_dir in $PATH
8845 do
8846   IFS=$as_save_IFS
8847   test -z "$as_dir" && as_dir=.
8848     for ac_exec_ext in '' $ac_executable_extensions; do
8849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8850     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8852     break 2
8853   fi
8854 done
8855   done
8856 IFS=$as_save_IFS
8857 
8858   ;;
8859 esac
8860 fi
8861 GZIP=$ac_cv_path_GZIP
8862 if test -n "$GZIP"; then
8863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8864 $as_echo "$GZIP" >&6; }
8865 else
8866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867 $as_echo "no" >&6; }
8868 fi
8869 
8870 
8871           if test "x$GZIP" = x; then
8872             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8873           fi
8874         else
8875           # Otherwise we believe it is a complete path. Use it as it is.
8876           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8877 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8878           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8879 $as_echo_n "checking for GZIP... " >&6; }
8880           if test ! -x "$tool_specified"; then
8881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8882 $as_echo "not found" >&6; }
8883             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8884           fi
8885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8886 $as_echo "$tool_specified" >&6; }
8887         fi
8888       fi
8889     fi
8890 
8891   fi
8892 
8893 
8894 
8895   if test "x$GZIP" = x; then
8896     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8897   fi
8898 
8899 
8900 
8901 
8902 
8903   # Publish this variable in the help.
8904 
8905 
8906   if [ -z "${LN+x}" ]; then
8907     # The variable is not set by user, try to locate tool using the code snippet
8908     for ac_prog in ln
8909 do
8910   # Extract the first word of "$ac_prog", so it can be a program name with args.
8911 set dummy $ac_prog; ac_word=$2
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8913 $as_echo_n "checking for $ac_word... " >&6; }
8914 if ${ac_cv_path_LN+:} false; then :
8915   $as_echo_n "(cached) " >&6
8916 else
8917   case $LN in
8918   [\\/]* | ?:[\\/]*)
8919   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8920   ;;
8921   *)
8922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8923 for as_dir in $PATH
8924 do
8925   IFS=$as_save_IFS
8926   test -z "$as_dir" && as_dir=.
8927     for ac_exec_ext in '' $ac_executable_extensions; do
8928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8929     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8931     break 2
8932   fi
8933 done
8934   done
8935 IFS=$as_save_IFS
8936 
8937   ;;
8938 esac
8939 fi
8940 LN=$ac_cv_path_LN
8941 if test -n "$LN"; then
8942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8943 $as_echo "$LN" >&6; }
8944 else
8945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946 $as_echo "no" >&6; }
8947 fi
8948 
8949 
8950   test -n "$LN" && break
8951 done
8952 
8953   else
8954     # The variable is set, but is it from the command line or the environment?
8955 
8956     # Try to remove the string !LN! from our list.
8957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8959       # If it failed, the variable was not from the command line. Ignore it,
8960       # but warn the user (except for BASH, which is always set by the calling BASH).
8961       if test "xLN" != xBASH; then
8962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8963 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8964       fi
8965       # Try to locate tool using the code snippet
8966       for ac_prog in ln
8967 do
8968   # Extract the first word of "$ac_prog", so it can be a program name with args.
8969 set dummy $ac_prog; ac_word=$2
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8971 $as_echo_n "checking for $ac_word... " >&6; }
8972 if ${ac_cv_path_LN+:} false; then :
8973   $as_echo_n "(cached) " >&6
8974 else
8975   case $LN in
8976   [\\/]* | ?:[\\/]*)
8977   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8978   ;;
8979   *)
8980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8981 for as_dir in $PATH
8982 do
8983   IFS=$as_save_IFS
8984   test -z "$as_dir" && as_dir=.
8985     for ac_exec_ext in '' $ac_executable_extensions; do
8986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8987     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8989     break 2
8990   fi
8991 done
8992   done
8993 IFS=$as_save_IFS
8994 
8995   ;;
8996 esac
8997 fi
8998 LN=$ac_cv_path_LN
8999 if test -n "$LN"; then
9000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9001 $as_echo "$LN" >&6; }
9002 else
9003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9004 $as_echo "no" >&6; }
9005 fi
9006 
9007 
9008   test -n "$LN" && break
9009 done
9010 
9011     else
9012       # If it succeeded, then it was overridden by the user. We will use it
9013       # for the tool.
9014 
9015       # First remove it from the list of overridden variables, so we can test
9016       # for unknown variables in the end.
9017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9018 
9019       # Check if we try to supply an empty value
9020       if test "x$LN" = x; then
9021         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9022 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9024 $as_echo_n "checking for LN... " >&6; }
9025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9026 $as_echo "disabled" >&6; }
9027       else
9028         # Check if the provided tool contains a complete path.
9029         tool_specified="$LN"
9030         tool_basename="${tool_specified##*/}"
9031         if test "x$tool_basename" = "x$tool_specified"; then
9032           # A command without a complete path is provided, search $PATH.
9033           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9034 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9035           # Extract the first word of "$tool_basename", so it can be a program name with args.
9036 set dummy $tool_basename; ac_word=$2
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038 $as_echo_n "checking for $ac_word... " >&6; }
9039 if ${ac_cv_path_LN+:} false; then :
9040   $as_echo_n "(cached) " >&6
9041 else
9042   case $LN in
9043   [\\/]* | ?:[\\/]*)
9044   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9045   ;;
9046   *)
9047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9048 for as_dir in $PATH
9049 do
9050   IFS=$as_save_IFS
9051   test -z "$as_dir" && as_dir=.
9052     for ac_exec_ext in '' $ac_executable_extensions; do
9053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9054     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9056     break 2
9057   fi
9058 done
9059   done
9060 IFS=$as_save_IFS
9061 
9062   ;;
9063 esac
9064 fi
9065 LN=$ac_cv_path_LN
9066 if test -n "$LN"; then
9067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9068 $as_echo "$LN" >&6; }
9069 else
9070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071 $as_echo "no" >&6; }
9072 fi
9073 
9074 
9075           if test "x$LN" = x; then
9076             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9077           fi
9078         else
9079           # Otherwise we believe it is a complete path. Use it as it is.
9080           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9081 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9082           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9083 $as_echo_n "checking for LN... " >&6; }
9084           if test ! -x "$tool_specified"; then
9085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9086 $as_echo "not found" >&6; }
9087             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9088           fi
9089           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9090 $as_echo "$tool_specified" >&6; }
9091         fi
9092       fi
9093     fi
9094 
9095   fi
9096 
9097 
9098 
9099   if test "x$LN" = x; then
9100     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9101   fi
9102 
9103 
9104 
9105 
9106 
9107   # Publish this variable in the help.
9108 
9109 
9110   if [ -z "${LS+x}" ]; then
9111     # The variable is not set by user, try to locate tool using the code snippet
9112     for ac_prog in ls
9113 do
9114   # Extract the first word of "$ac_prog", so it can be a program name with args.
9115 set dummy $ac_prog; ac_word=$2
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9117 $as_echo_n "checking for $ac_word... " >&6; }
9118 if ${ac_cv_path_LS+:} false; then :
9119   $as_echo_n "(cached) " >&6
9120 else
9121   case $LS in
9122   [\\/]* | ?:[\\/]*)
9123   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9124   ;;
9125   *)
9126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9127 for as_dir in $PATH
9128 do
9129   IFS=$as_save_IFS
9130   test -z "$as_dir" && as_dir=.
9131     for ac_exec_ext in '' $ac_executable_extensions; do
9132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9133     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9135     break 2
9136   fi
9137 done
9138   done
9139 IFS=$as_save_IFS
9140 
9141   ;;
9142 esac
9143 fi
9144 LS=$ac_cv_path_LS
9145 if test -n "$LS"; then
9146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9147 $as_echo "$LS" >&6; }
9148 else
9149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150 $as_echo "no" >&6; }
9151 fi
9152 
9153 
9154   test -n "$LS" && break
9155 done
9156 
9157   else
9158     # The variable is set, but is it from the command line or the environment?
9159 
9160     # Try to remove the string !LS! from our list.
9161     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9162     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9163       # If it failed, the variable was not from the command line. Ignore it,
9164       # but warn the user (except for BASH, which is always set by the calling BASH).
9165       if test "xLS" != xBASH; then
9166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9167 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9168       fi
9169       # Try to locate tool using the code snippet
9170       for ac_prog in ls
9171 do
9172   # Extract the first word of "$ac_prog", so it can be a program name with args.
9173 set dummy $ac_prog; ac_word=$2
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9175 $as_echo_n "checking for $ac_word... " >&6; }
9176 if ${ac_cv_path_LS+:} false; then :
9177   $as_echo_n "(cached) " >&6
9178 else
9179   case $LS in
9180   [\\/]* | ?:[\\/]*)
9181   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9182   ;;
9183   *)
9184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9185 for as_dir in $PATH
9186 do
9187   IFS=$as_save_IFS
9188   test -z "$as_dir" && as_dir=.
9189     for ac_exec_ext in '' $ac_executable_extensions; do
9190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9191     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9193     break 2
9194   fi
9195 done
9196   done
9197 IFS=$as_save_IFS
9198 
9199   ;;
9200 esac
9201 fi
9202 LS=$ac_cv_path_LS
9203 if test -n "$LS"; then
9204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9205 $as_echo "$LS" >&6; }
9206 else
9207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9208 $as_echo "no" >&6; }
9209 fi
9210 
9211 
9212   test -n "$LS" && break
9213 done
9214 
9215     else
9216       # If it succeeded, then it was overridden by the user. We will use it
9217       # for the tool.
9218 
9219       # First remove it from the list of overridden variables, so we can test
9220       # for unknown variables in the end.
9221       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9222 
9223       # Check if we try to supply an empty value
9224       if test "x$LS" = x; then
9225         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9226 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9227         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9228 $as_echo_n "checking for LS... " >&6; }
9229         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9230 $as_echo "disabled" >&6; }
9231       else
9232         # Check if the provided tool contains a complete path.
9233         tool_specified="$LS"
9234         tool_basename="${tool_specified##*/}"
9235         if test "x$tool_basename" = "x$tool_specified"; then
9236           # A command without a complete path is provided, search $PATH.
9237           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9238 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9239           # Extract the first word of "$tool_basename", so it can be a program name with args.
9240 set dummy $tool_basename; ac_word=$2
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9242 $as_echo_n "checking for $ac_word... " >&6; }
9243 if ${ac_cv_path_LS+:} false; then :
9244   $as_echo_n "(cached) " >&6
9245 else
9246   case $LS in
9247   [\\/]* | ?:[\\/]*)
9248   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9249   ;;
9250   *)
9251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9252 for as_dir in $PATH
9253 do
9254   IFS=$as_save_IFS
9255   test -z "$as_dir" && as_dir=.
9256     for ac_exec_ext in '' $ac_executable_extensions; do
9257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9258     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9260     break 2
9261   fi
9262 done
9263   done
9264 IFS=$as_save_IFS
9265 
9266   ;;
9267 esac
9268 fi
9269 LS=$ac_cv_path_LS
9270 if test -n "$LS"; then
9271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9272 $as_echo "$LS" >&6; }
9273 else
9274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275 $as_echo "no" >&6; }
9276 fi
9277 
9278 
9279           if test "x$LS" = x; then
9280             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9281           fi
9282         else
9283           # Otherwise we believe it is a complete path. Use it as it is.
9284           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9285 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9286           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9287 $as_echo_n "checking for LS... " >&6; }
9288           if test ! -x "$tool_specified"; then
9289             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9290 $as_echo "not found" >&6; }
9291             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9292           fi
9293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9294 $as_echo "$tool_specified" >&6; }
9295         fi
9296       fi
9297     fi
9298 
9299   fi
9300 
9301 
9302 
9303   if test "x$LS" = x; then
9304     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9305   fi
9306 
9307 
9308 
9309 
9310 
9311   # Publish this variable in the help.
9312 
9313 
9314   if [ -z "${MKDIR+x}" ]; then
9315     # The variable is not set by user, try to locate tool using the code snippet
9316     for ac_prog in mkdir
9317 do
9318   # Extract the first word of "$ac_prog", so it can be a program name with args.
9319 set dummy $ac_prog; ac_word=$2
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9321 $as_echo_n "checking for $ac_word... " >&6; }
9322 if ${ac_cv_path_MKDIR+:} false; then :
9323   $as_echo_n "(cached) " >&6
9324 else
9325   case $MKDIR in
9326   [\\/]* | ?:[\\/]*)
9327   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9328   ;;
9329   *)
9330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9331 for as_dir in $PATH
9332 do
9333   IFS=$as_save_IFS
9334   test -z "$as_dir" && as_dir=.
9335     for ac_exec_ext in '' $ac_executable_extensions; do
9336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9337     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9339     break 2
9340   fi
9341 done
9342   done
9343 IFS=$as_save_IFS
9344 
9345   ;;
9346 esac
9347 fi
9348 MKDIR=$ac_cv_path_MKDIR
9349 if test -n "$MKDIR"; then
9350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9351 $as_echo "$MKDIR" >&6; }
9352 else
9353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9354 $as_echo "no" >&6; }
9355 fi
9356 
9357 
9358   test -n "$MKDIR" && break
9359 done
9360 
9361   else
9362     # The variable is set, but is it from the command line or the environment?
9363 
9364     # Try to remove the string !MKDIR! from our list.
9365     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9366     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9367       # If it failed, the variable was not from the command line. Ignore it,
9368       # but warn the user (except for BASH, which is always set by the calling BASH).
9369       if test "xMKDIR" != xBASH; then
9370         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9371 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9372       fi
9373       # Try to locate tool using the code snippet
9374       for ac_prog in mkdir
9375 do
9376   # Extract the first word of "$ac_prog", so it can be a program name with args.
9377 set dummy $ac_prog; ac_word=$2
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9379 $as_echo_n "checking for $ac_word... " >&6; }
9380 if ${ac_cv_path_MKDIR+:} false; then :
9381   $as_echo_n "(cached) " >&6
9382 else
9383   case $MKDIR in
9384   [\\/]* | ?:[\\/]*)
9385   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9386   ;;
9387   *)
9388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9389 for as_dir in $PATH
9390 do
9391   IFS=$as_save_IFS
9392   test -z "$as_dir" && as_dir=.
9393     for ac_exec_ext in '' $ac_executable_extensions; do
9394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9395     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9397     break 2
9398   fi
9399 done
9400   done
9401 IFS=$as_save_IFS
9402 
9403   ;;
9404 esac
9405 fi
9406 MKDIR=$ac_cv_path_MKDIR
9407 if test -n "$MKDIR"; then
9408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9409 $as_echo "$MKDIR" >&6; }
9410 else
9411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9412 $as_echo "no" >&6; }
9413 fi
9414 
9415 
9416   test -n "$MKDIR" && break
9417 done
9418 
9419     else
9420       # If it succeeded, then it was overridden by the user. We will use it
9421       # for the tool.
9422 
9423       # First remove it from the list of overridden variables, so we can test
9424       # for unknown variables in the end.
9425       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9426 
9427       # Check if we try to supply an empty value
9428       if test "x$MKDIR" = x; then
9429         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9430 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9432 $as_echo_n "checking for MKDIR... " >&6; }
9433         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9434 $as_echo "disabled" >&6; }
9435       else
9436         # Check if the provided tool contains a complete path.
9437         tool_specified="$MKDIR"
9438         tool_basename="${tool_specified##*/}"
9439         if test "x$tool_basename" = "x$tool_specified"; then
9440           # A command without a complete path is provided, search $PATH.
9441           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9442 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9443           # Extract the first word of "$tool_basename", so it can be a program name with args.
9444 set dummy $tool_basename; ac_word=$2
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446 $as_echo_n "checking for $ac_word... " >&6; }
9447 if ${ac_cv_path_MKDIR+:} false; then :
9448   $as_echo_n "(cached) " >&6
9449 else
9450   case $MKDIR in
9451   [\\/]* | ?:[\\/]*)
9452   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9453   ;;
9454   *)
9455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456 for as_dir in $PATH
9457 do
9458   IFS=$as_save_IFS
9459   test -z "$as_dir" && as_dir=.
9460     for ac_exec_ext in '' $ac_executable_extensions; do
9461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464     break 2
9465   fi
9466 done
9467   done
9468 IFS=$as_save_IFS
9469 
9470   ;;
9471 esac
9472 fi
9473 MKDIR=$ac_cv_path_MKDIR
9474 if test -n "$MKDIR"; then
9475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9476 $as_echo "$MKDIR" >&6; }
9477 else
9478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479 $as_echo "no" >&6; }
9480 fi
9481 
9482 
9483           if test "x$MKDIR" = x; then
9484             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9485           fi
9486         else
9487           # Otherwise we believe it is a complete path. Use it as it is.
9488           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9489 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9490           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9491 $as_echo_n "checking for MKDIR... " >&6; }
9492           if test ! -x "$tool_specified"; then
9493             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9494 $as_echo "not found" >&6; }
9495             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9496           fi
9497           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9498 $as_echo "$tool_specified" >&6; }
9499         fi
9500       fi
9501     fi
9502 
9503   fi
9504 
9505 
9506 
9507   if test "x$MKDIR" = x; then
9508     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9509   fi
9510 
9511 
9512 
9513 
9514 
9515   # Publish this variable in the help.
9516 
9517 
9518   if [ -z "${MKTEMP+x}" ]; then
9519     # The variable is not set by user, try to locate tool using the code snippet
9520     for ac_prog in mktemp
9521 do
9522   # Extract the first word of "$ac_prog", so it can be a program name with args.
9523 set dummy $ac_prog; ac_word=$2
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9525 $as_echo_n "checking for $ac_word... " >&6; }
9526 if ${ac_cv_path_MKTEMP+:} false; then :
9527   $as_echo_n "(cached) " >&6
9528 else
9529   case $MKTEMP in
9530   [\\/]* | ?:[\\/]*)
9531   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9532   ;;
9533   *)
9534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9535 for as_dir in $PATH
9536 do
9537   IFS=$as_save_IFS
9538   test -z "$as_dir" && as_dir=.
9539     for ac_exec_ext in '' $ac_executable_extensions; do
9540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9541     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9543     break 2
9544   fi
9545 done
9546   done
9547 IFS=$as_save_IFS
9548 
9549   ;;
9550 esac
9551 fi
9552 MKTEMP=$ac_cv_path_MKTEMP
9553 if test -n "$MKTEMP"; then
9554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9555 $as_echo "$MKTEMP" >&6; }
9556 else
9557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558 $as_echo "no" >&6; }
9559 fi
9560 
9561 
9562   test -n "$MKTEMP" && break
9563 done
9564 
9565   else
9566     # The variable is set, but is it from the command line or the environment?
9567 
9568     # Try to remove the string !MKTEMP! from our list.
9569     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9570     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9571       # If it failed, the variable was not from the command line. Ignore it,
9572       # but warn the user (except for BASH, which is always set by the calling BASH).
9573       if test "xMKTEMP" != xBASH; then
9574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9575 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9576       fi
9577       # Try to locate tool using the code snippet
9578       for ac_prog in mktemp
9579 do
9580   # Extract the first word of "$ac_prog", so it can be a program name with args.
9581 set dummy $ac_prog; ac_word=$2
9582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583 $as_echo_n "checking for $ac_word... " >&6; }
9584 if ${ac_cv_path_MKTEMP+:} false; then :
9585   $as_echo_n "(cached) " >&6
9586 else
9587   case $MKTEMP in
9588   [\\/]* | ?:[\\/]*)
9589   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9590   ;;
9591   *)
9592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593 for as_dir in $PATH
9594 do
9595   IFS=$as_save_IFS
9596   test -z "$as_dir" && as_dir=.
9597     for ac_exec_ext in '' $ac_executable_extensions; do
9598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601     break 2
9602   fi
9603 done
9604   done
9605 IFS=$as_save_IFS
9606 
9607   ;;
9608 esac
9609 fi
9610 MKTEMP=$ac_cv_path_MKTEMP
9611 if test -n "$MKTEMP"; then
9612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9613 $as_echo "$MKTEMP" >&6; }
9614 else
9615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9616 $as_echo "no" >&6; }
9617 fi
9618 
9619 
9620   test -n "$MKTEMP" && break
9621 done
9622 
9623     else
9624       # If it succeeded, then it was overridden by the user. We will use it
9625       # for the tool.
9626 
9627       # First remove it from the list of overridden variables, so we can test
9628       # for unknown variables in the end.
9629       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9630 
9631       # Check if we try to supply an empty value
9632       if test "x$MKTEMP" = x; then
9633         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9634 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9635         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9636 $as_echo_n "checking for MKTEMP... " >&6; }
9637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9638 $as_echo "disabled" >&6; }
9639       else
9640         # Check if the provided tool contains a complete path.
9641         tool_specified="$MKTEMP"
9642         tool_basename="${tool_specified##*/}"
9643         if test "x$tool_basename" = "x$tool_specified"; then
9644           # A command without a complete path is provided, search $PATH.
9645           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9646 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9647           # Extract the first word of "$tool_basename", so it can be a program name with args.
9648 set dummy $tool_basename; ac_word=$2
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650 $as_echo_n "checking for $ac_word... " >&6; }
9651 if ${ac_cv_path_MKTEMP+:} false; then :
9652   $as_echo_n "(cached) " >&6
9653 else
9654   case $MKTEMP in
9655   [\\/]* | ?:[\\/]*)
9656   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9657   ;;
9658   *)
9659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660 for as_dir in $PATH
9661 do
9662   IFS=$as_save_IFS
9663   test -z "$as_dir" && as_dir=.
9664     for ac_exec_ext in '' $ac_executable_extensions; do
9665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668     break 2
9669   fi
9670 done
9671   done
9672 IFS=$as_save_IFS
9673 
9674   ;;
9675 esac
9676 fi
9677 MKTEMP=$ac_cv_path_MKTEMP
9678 if test -n "$MKTEMP"; then
9679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9680 $as_echo "$MKTEMP" >&6; }
9681 else
9682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683 $as_echo "no" >&6; }
9684 fi
9685 
9686 
9687           if test "x$MKTEMP" = x; then
9688             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9689           fi
9690         else
9691           # Otherwise we believe it is a complete path. Use it as it is.
9692           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9693 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9694           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9695 $as_echo_n "checking for MKTEMP... " >&6; }
9696           if test ! -x "$tool_specified"; then
9697             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9698 $as_echo "not found" >&6; }
9699             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9700           fi
9701           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9702 $as_echo "$tool_specified" >&6; }
9703         fi
9704       fi
9705     fi
9706 
9707   fi
9708 
9709 
9710 
9711   if test "x$MKTEMP" = x; then
9712     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9713   fi
9714 
9715 
9716 
9717 
9718 
9719   # Publish this variable in the help.
9720 
9721 
9722   if [ -z "${MV+x}" ]; then
9723     # The variable is not set by user, try to locate tool using the code snippet
9724     for ac_prog in mv
9725 do
9726   # Extract the first word of "$ac_prog", so it can be a program name with args.
9727 set dummy $ac_prog; ac_word=$2
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729 $as_echo_n "checking for $ac_word... " >&6; }
9730 if ${ac_cv_path_MV+:} false; then :
9731   $as_echo_n "(cached) " >&6
9732 else
9733   case $MV in
9734   [\\/]* | ?:[\\/]*)
9735   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9736   ;;
9737   *)
9738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739 for as_dir in $PATH
9740 do
9741   IFS=$as_save_IFS
9742   test -z "$as_dir" && as_dir=.
9743     for ac_exec_ext in '' $ac_executable_extensions; do
9744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747     break 2
9748   fi
9749 done
9750   done
9751 IFS=$as_save_IFS
9752 
9753   ;;
9754 esac
9755 fi
9756 MV=$ac_cv_path_MV
9757 if test -n "$MV"; then
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9759 $as_echo "$MV" >&6; }
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9763 fi
9764 
9765 
9766   test -n "$MV" && break
9767 done
9768 
9769   else
9770     # The variable is set, but is it from the command line or the environment?
9771 
9772     # Try to remove the string !MV! from our list.
9773     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9774     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9775       # If it failed, the variable was not from the command line. Ignore it,
9776       # but warn the user (except for BASH, which is always set by the calling BASH).
9777       if test "xMV" != xBASH; then
9778         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9779 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9780       fi
9781       # Try to locate tool using the code snippet
9782       for ac_prog in mv
9783 do
9784   # Extract the first word of "$ac_prog", so it can be a program name with args.
9785 set dummy $ac_prog; ac_word=$2
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787 $as_echo_n "checking for $ac_word... " >&6; }
9788 if ${ac_cv_path_MV+:} false; then :
9789   $as_echo_n "(cached) " >&6
9790 else
9791   case $MV in
9792   [\\/]* | ?:[\\/]*)
9793   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9794   ;;
9795   *)
9796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797 for as_dir in $PATH
9798 do
9799   IFS=$as_save_IFS
9800   test -z "$as_dir" && as_dir=.
9801     for ac_exec_ext in '' $ac_executable_extensions; do
9802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805     break 2
9806   fi
9807 done
9808   done
9809 IFS=$as_save_IFS
9810 
9811   ;;
9812 esac
9813 fi
9814 MV=$ac_cv_path_MV
9815 if test -n "$MV"; then
9816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9817 $as_echo "$MV" >&6; }
9818 else
9819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820 $as_echo "no" >&6; }
9821 fi
9822 
9823 
9824   test -n "$MV" && break
9825 done
9826 
9827     else
9828       # If it succeeded, then it was overridden by the user. We will use it
9829       # for the tool.
9830 
9831       # First remove it from the list of overridden variables, so we can test
9832       # for unknown variables in the end.
9833       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9834 
9835       # Check if we try to supply an empty value
9836       if test "x$MV" = x; then
9837         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9838 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9839         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9840 $as_echo_n "checking for MV... " >&6; }
9841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9842 $as_echo "disabled" >&6; }
9843       else
9844         # Check if the provided tool contains a complete path.
9845         tool_specified="$MV"
9846         tool_basename="${tool_specified##*/}"
9847         if test "x$tool_basename" = "x$tool_specified"; then
9848           # A command without a complete path is provided, search $PATH.
9849           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9850 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9851           # Extract the first word of "$tool_basename", so it can be a program name with args.
9852 set dummy $tool_basename; ac_word=$2
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9854 $as_echo_n "checking for $ac_word... " >&6; }
9855 if ${ac_cv_path_MV+:} false; then :
9856   $as_echo_n "(cached) " >&6
9857 else
9858   case $MV in
9859   [\\/]* | ?:[\\/]*)
9860   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9861   ;;
9862   *)
9863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864 for as_dir in $PATH
9865 do
9866   IFS=$as_save_IFS
9867   test -z "$as_dir" && as_dir=.
9868     for ac_exec_ext in '' $ac_executable_extensions; do
9869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9870     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9872     break 2
9873   fi
9874 done
9875   done
9876 IFS=$as_save_IFS
9877 
9878   ;;
9879 esac
9880 fi
9881 MV=$ac_cv_path_MV
9882 if test -n "$MV"; then
9883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9884 $as_echo "$MV" >&6; }
9885 else
9886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887 $as_echo "no" >&6; }
9888 fi
9889 
9890 
9891           if test "x$MV" = x; then
9892             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9893           fi
9894         else
9895           # Otherwise we believe it is a complete path. Use it as it is.
9896           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9897 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9898           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9899 $as_echo_n "checking for MV... " >&6; }
9900           if test ! -x "$tool_specified"; then
9901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9902 $as_echo "not found" >&6; }
9903             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9904           fi
9905           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9906 $as_echo "$tool_specified" >&6; }
9907         fi
9908       fi
9909     fi
9910 
9911   fi
9912 
9913 
9914 
9915   if test "x$MV" = x; then
9916     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9917   fi
9918 
9919 
9920 
9921 
9922 
9923   # Publish this variable in the help.
9924 
9925 
9926   if [ -z "${NAWK+x}" ]; then
9927     # The variable is not set by user, try to locate tool using the code snippet
9928     for ac_prog in nawk gawk awk
9929 do
9930   # Extract the first word of "$ac_prog", so it can be a program name with args.
9931 set dummy $ac_prog; ac_word=$2
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933 $as_echo_n "checking for $ac_word... " >&6; }
9934 if ${ac_cv_path_NAWK+:} false; then :
9935   $as_echo_n "(cached) " >&6
9936 else
9937   case $NAWK in
9938   [\\/]* | ?:[\\/]*)
9939   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9940   ;;
9941   *)
9942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943 for as_dir in $PATH
9944 do
9945   IFS=$as_save_IFS
9946   test -z "$as_dir" && as_dir=.
9947     for ac_exec_ext in '' $ac_executable_extensions; do
9948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951     break 2
9952   fi
9953 done
9954   done
9955 IFS=$as_save_IFS
9956 
9957   ;;
9958 esac
9959 fi
9960 NAWK=$ac_cv_path_NAWK
9961 if test -n "$NAWK"; then
9962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9963 $as_echo "$NAWK" >&6; }
9964 else
9965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966 $as_echo "no" >&6; }
9967 fi
9968 
9969 
9970   test -n "$NAWK" && break
9971 done
9972 
9973   else
9974     # The variable is set, but is it from the command line or the environment?
9975 
9976     # Try to remove the string !NAWK! from our list.
9977     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9978     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9979       # If it failed, the variable was not from the command line. Ignore it,
9980       # but warn the user (except for BASH, which is always set by the calling BASH).
9981       if test "xNAWK" != xBASH; then
9982         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9983 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9984       fi
9985       # Try to locate tool using the code snippet
9986       for ac_prog in nawk gawk awk
9987 do
9988   # Extract the first word of "$ac_prog", so it can be a program name with args.
9989 set dummy $ac_prog; ac_word=$2
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991 $as_echo_n "checking for $ac_word... " >&6; }
9992 if ${ac_cv_path_NAWK+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995   case $NAWK in
9996   [\\/]* | ?:[\\/]*)
9997   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9998   ;;
9999   *)
10000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001 for as_dir in $PATH
10002 do
10003   IFS=$as_save_IFS
10004   test -z "$as_dir" && as_dir=.
10005     for ac_exec_ext in '' $ac_executable_extensions; do
10006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10007     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009     break 2
10010   fi
10011 done
10012   done
10013 IFS=$as_save_IFS
10014 
10015   ;;
10016 esac
10017 fi
10018 NAWK=$ac_cv_path_NAWK
10019 if test -n "$NAWK"; then
10020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10021 $as_echo "$NAWK" >&6; }
10022 else
10023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024 $as_echo "no" >&6; }
10025 fi
10026 
10027 
10028   test -n "$NAWK" && break
10029 done
10030 
10031     else
10032       # If it succeeded, then it was overridden by the user. We will use it
10033       # for the tool.
10034 
10035       # First remove it from the list of overridden variables, so we can test
10036       # for unknown variables in the end.
10037       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10038 
10039       # Check if we try to supply an empty value
10040       if test "x$NAWK" = x; then
10041         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10042 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10044 $as_echo_n "checking for NAWK... " >&6; }
10045         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10046 $as_echo "disabled" >&6; }
10047       else
10048         # Check if the provided tool contains a complete path.
10049         tool_specified="$NAWK"
10050         tool_basename="${tool_specified##*/}"
10051         if test "x$tool_basename" = "x$tool_specified"; then
10052           # A command without a complete path is provided, search $PATH.
10053           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10054 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10055           # Extract the first word of "$tool_basename", so it can be a program name with args.
10056 set dummy $tool_basename; ac_word=$2
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058 $as_echo_n "checking for $ac_word... " >&6; }
10059 if ${ac_cv_path_NAWK+:} false; then :
10060   $as_echo_n "(cached) " >&6
10061 else
10062   case $NAWK in
10063   [\\/]* | ?:[\\/]*)
10064   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10065   ;;
10066   *)
10067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068 for as_dir in $PATH
10069 do
10070   IFS=$as_save_IFS
10071   test -z "$as_dir" && as_dir=.
10072     for ac_exec_ext in '' $ac_executable_extensions; do
10073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076     break 2
10077   fi
10078 done
10079   done
10080 IFS=$as_save_IFS
10081 
10082   ;;
10083 esac
10084 fi
10085 NAWK=$ac_cv_path_NAWK
10086 if test -n "$NAWK"; then
10087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10088 $as_echo "$NAWK" >&6; }
10089 else
10090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091 $as_echo "no" >&6; }
10092 fi
10093 
10094 
10095           if test "x$NAWK" = x; then
10096             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10097           fi
10098         else
10099           # Otherwise we believe it is a complete path. Use it as it is.
10100           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10101 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10102           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10103 $as_echo_n "checking for NAWK... " >&6; }
10104           if test ! -x "$tool_specified"; then
10105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10106 $as_echo "not found" >&6; }
10107             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10108           fi
10109           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10110 $as_echo "$tool_specified" >&6; }
10111         fi
10112       fi
10113     fi
10114 
10115   fi
10116 
10117 
10118 
10119   if test "x$NAWK" = x; then
10120     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10121   fi
10122 
10123 
10124 
10125 
10126 
10127   # Publish this variable in the help.
10128 
10129 
10130   if [ -z "${PRINTF+x}" ]; then
10131     # The variable is not set by user, try to locate tool using the code snippet
10132     for ac_prog in printf
10133 do
10134   # Extract the first word of "$ac_prog", so it can be a program name with args.
10135 set dummy $ac_prog; ac_word=$2
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10137 $as_echo_n "checking for $ac_word... " >&6; }
10138 if ${ac_cv_path_PRINTF+:} false; then :
10139   $as_echo_n "(cached) " >&6
10140 else
10141   case $PRINTF in
10142   [\\/]* | ?:[\\/]*)
10143   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10144   ;;
10145   *)
10146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10147 for as_dir in $PATH
10148 do
10149   IFS=$as_save_IFS
10150   test -z "$as_dir" && as_dir=.
10151     for ac_exec_ext in '' $ac_executable_extensions; do
10152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10153     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10155     break 2
10156   fi
10157 done
10158   done
10159 IFS=$as_save_IFS
10160 
10161   ;;
10162 esac
10163 fi
10164 PRINTF=$ac_cv_path_PRINTF
10165 if test -n "$PRINTF"; then
10166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10167 $as_echo "$PRINTF" >&6; }
10168 else
10169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10170 $as_echo "no" >&6; }
10171 fi
10172 
10173 
10174   test -n "$PRINTF" && break
10175 done
10176 
10177   else
10178     # The variable is set, but is it from the command line or the environment?
10179 
10180     # Try to remove the string !PRINTF! from our list.
10181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10183       # If it failed, the variable was not from the command line. Ignore it,
10184       # but warn the user (except for BASH, which is always set by the calling BASH).
10185       if test "xPRINTF" != xBASH; then
10186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10187 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10188       fi
10189       # Try to locate tool using the code snippet
10190       for ac_prog in printf
10191 do
10192   # Extract the first word of "$ac_prog", so it can be a program name with args.
10193 set dummy $ac_prog; ac_word=$2
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10195 $as_echo_n "checking for $ac_word... " >&6; }
10196 if ${ac_cv_path_PRINTF+:} false; then :
10197   $as_echo_n "(cached) " >&6
10198 else
10199   case $PRINTF in
10200   [\\/]* | ?:[\\/]*)
10201   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10202   ;;
10203   *)
10204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10205 for as_dir in $PATH
10206 do
10207   IFS=$as_save_IFS
10208   test -z "$as_dir" && as_dir=.
10209     for ac_exec_ext in '' $ac_executable_extensions; do
10210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10211     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10213     break 2
10214   fi
10215 done
10216   done
10217 IFS=$as_save_IFS
10218 
10219   ;;
10220 esac
10221 fi
10222 PRINTF=$ac_cv_path_PRINTF
10223 if test -n "$PRINTF"; then
10224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10225 $as_echo "$PRINTF" >&6; }
10226 else
10227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228 $as_echo "no" >&6; }
10229 fi
10230 
10231 
10232   test -n "$PRINTF" && break
10233 done
10234 
10235     else
10236       # If it succeeded, then it was overridden by the user. We will use it
10237       # for the tool.
10238 
10239       # First remove it from the list of overridden variables, so we can test
10240       # for unknown variables in the end.
10241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10242 
10243       # Check if we try to supply an empty value
10244       if test "x$PRINTF" = x; then
10245         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10246 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10248 $as_echo_n "checking for PRINTF... " >&6; }
10249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10250 $as_echo "disabled" >&6; }
10251       else
10252         # Check if the provided tool contains a complete path.
10253         tool_specified="$PRINTF"
10254         tool_basename="${tool_specified##*/}"
10255         if test "x$tool_basename" = "x$tool_specified"; then
10256           # A command without a complete path is provided, search $PATH.
10257           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10258 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10259           # Extract the first word of "$tool_basename", so it can be a program name with args.
10260 set dummy $tool_basename; ac_word=$2
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10262 $as_echo_n "checking for $ac_word... " >&6; }
10263 if ${ac_cv_path_PRINTF+:} false; then :
10264   $as_echo_n "(cached) " >&6
10265 else
10266   case $PRINTF in
10267   [\\/]* | ?:[\\/]*)
10268   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10269   ;;
10270   *)
10271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10272 for as_dir in $PATH
10273 do
10274   IFS=$as_save_IFS
10275   test -z "$as_dir" && as_dir=.
10276     for ac_exec_ext in '' $ac_executable_extensions; do
10277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10278     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10280     break 2
10281   fi
10282 done
10283   done
10284 IFS=$as_save_IFS
10285 
10286   ;;
10287 esac
10288 fi
10289 PRINTF=$ac_cv_path_PRINTF
10290 if test -n "$PRINTF"; then
10291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10292 $as_echo "$PRINTF" >&6; }
10293 else
10294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295 $as_echo "no" >&6; }
10296 fi
10297 
10298 
10299           if test "x$PRINTF" = x; then
10300             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10301           fi
10302         else
10303           # Otherwise we believe it is a complete path. Use it as it is.
10304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10305 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10306           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10307 $as_echo_n "checking for PRINTF... " >&6; }
10308           if test ! -x "$tool_specified"; then
10309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10310 $as_echo "not found" >&6; }
10311             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10312           fi
10313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10314 $as_echo "$tool_specified" >&6; }
10315         fi
10316       fi
10317     fi
10318 
10319   fi
10320 
10321 
10322 
10323   if test "x$PRINTF" = x; then
10324     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10325   fi
10326 
10327 
10328 
10329 
10330 
10331   # Publish this variable in the help.
10332 
10333 
10334   if [ -z "${RM+x}" ]; then
10335     # The variable is not set by user, try to locate tool using the code snippet
10336     for ac_prog in rm
10337 do
10338   # Extract the first word of "$ac_prog", so it can be a program name with args.
10339 set dummy $ac_prog; ac_word=$2
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10341 $as_echo_n "checking for $ac_word... " >&6; }
10342 if ${ac_cv_path_RM+:} false; then :
10343   $as_echo_n "(cached) " >&6
10344 else
10345   case $RM in
10346   [\\/]* | ?:[\\/]*)
10347   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10348   ;;
10349   *)
10350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10351 for as_dir in $PATH
10352 do
10353   IFS=$as_save_IFS
10354   test -z "$as_dir" && as_dir=.
10355     for ac_exec_ext in '' $ac_executable_extensions; do
10356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10357     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10359     break 2
10360   fi
10361 done
10362   done
10363 IFS=$as_save_IFS
10364 
10365   ;;
10366 esac
10367 fi
10368 RM=$ac_cv_path_RM
10369 if test -n "$RM"; then
10370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10371 $as_echo "$RM" >&6; }
10372 else
10373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10374 $as_echo "no" >&6; }
10375 fi
10376 
10377 
10378   test -n "$RM" && break
10379 done
10380 
10381   else
10382     # The variable is set, but is it from the command line or the environment?
10383 
10384     # Try to remove the string !RM! from our list.
10385     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10386     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10387       # If it failed, the variable was not from the command line. Ignore it,
10388       # but warn the user (except for BASH, which is always set by the calling BASH).
10389       if test "xRM" != xBASH; then
10390         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10391 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10392       fi
10393       # Try to locate tool using the code snippet
10394       for ac_prog in rm
10395 do
10396   # Extract the first word of "$ac_prog", so it can be a program name with args.
10397 set dummy $ac_prog; ac_word=$2
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399 $as_echo_n "checking for $ac_word... " >&6; }
10400 if ${ac_cv_path_RM+:} false; then :
10401   $as_echo_n "(cached) " >&6
10402 else
10403   case $RM in
10404   [\\/]* | ?:[\\/]*)
10405   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10406   ;;
10407   *)
10408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10409 for as_dir in $PATH
10410 do
10411   IFS=$as_save_IFS
10412   test -z "$as_dir" && as_dir=.
10413     for ac_exec_ext in '' $ac_executable_extensions; do
10414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10415     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10417     break 2
10418   fi
10419 done
10420   done
10421 IFS=$as_save_IFS
10422 
10423   ;;
10424 esac
10425 fi
10426 RM=$ac_cv_path_RM
10427 if test -n "$RM"; then
10428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10429 $as_echo "$RM" >&6; }
10430 else
10431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432 $as_echo "no" >&6; }
10433 fi
10434 
10435 
10436   test -n "$RM" && break
10437 done
10438 
10439     else
10440       # If it succeeded, then it was overridden by the user. We will use it
10441       # for the tool.
10442 
10443       # First remove it from the list of overridden variables, so we can test
10444       # for unknown variables in the end.
10445       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10446 
10447       # Check if we try to supply an empty value
10448       if test "x$RM" = x; then
10449         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10450 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10452 $as_echo_n "checking for RM... " >&6; }
10453         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10454 $as_echo "disabled" >&6; }
10455       else
10456         # Check if the provided tool contains a complete path.
10457         tool_specified="$RM"
10458         tool_basename="${tool_specified##*/}"
10459         if test "x$tool_basename" = "x$tool_specified"; then
10460           # A command without a complete path is provided, search $PATH.
10461           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10462 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10463           # Extract the first word of "$tool_basename", so it can be a program name with args.
10464 set dummy $tool_basename; ac_word=$2
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10466 $as_echo_n "checking for $ac_word... " >&6; }
10467 if ${ac_cv_path_RM+:} false; then :
10468   $as_echo_n "(cached) " >&6
10469 else
10470   case $RM in
10471   [\\/]* | ?:[\\/]*)
10472   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10473   ;;
10474   *)
10475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476 for as_dir in $PATH
10477 do
10478   IFS=$as_save_IFS
10479   test -z "$as_dir" && as_dir=.
10480     for ac_exec_ext in '' $ac_executable_extensions; do
10481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10482     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10484     break 2
10485   fi
10486 done
10487   done
10488 IFS=$as_save_IFS
10489 
10490   ;;
10491 esac
10492 fi
10493 RM=$ac_cv_path_RM
10494 if test -n "$RM"; then
10495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10496 $as_echo "$RM" >&6; }
10497 else
10498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499 $as_echo "no" >&6; }
10500 fi
10501 
10502 
10503           if test "x$RM" = x; then
10504             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10505           fi
10506         else
10507           # Otherwise we believe it is a complete path. Use it as it is.
10508           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10509 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10510           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10511 $as_echo_n "checking for RM... " >&6; }
10512           if test ! -x "$tool_specified"; then
10513             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10514 $as_echo "not found" >&6; }
10515             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10516           fi
10517           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10518 $as_echo "$tool_specified" >&6; }
10519         fi
10520       fi
10521     fi
10522 
10523   fi
10524 
10525 
10526 
10527   if test "x$RM" = x; then
10528     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10529   fi
10530 
10531 
10532 
10533 
10534 
10535   # Publish this variable in the help.
10536 
10537 
10538   if [ -z "${RMDIR+x}" ]; then
10539     # The variable is not set by user, try to locate tool using the code snippet
10540     for ac_prog in rmdir
10541 do
10542   # Extract the first word of "$ac_prog", so it can be a program name with args.
10543 set dummy $ac_prog; ac_word=$2
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545 $as_echo_n "checking for $ac_word... " >&6; }
10546 if ${ac_cv_path_RMDIR+:} false; then :
10547   $as_echo_n "(cached) " >&6
10548 else
10549   case $RMDIR in
10550   [\\/]* | ?:[\\/]*)
10551   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10552   ;;
10553   *)
10554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555 for as_dir in $PATH
10556 do
10557   IFS=$as_save_IFS
10558   test -z "$as_dir" && as_dir=.
10559     for ac_exec_ext in '' $ac_executable_extensions; do
10560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563     break 2
10564   fi
10565 done
10566   done
10567 IFS=$as_save_IFS
10568 
10569   ;;
10570 esac
10571 fi
10572 RMDIR=$ac_cv_path_RMDIR
10573 if test -n "$RMDIR"; then
10574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10575 $as_echo "$RMDIR" >&6; }
10576 else
10577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578 $as_echo "no" >&6; }
10579 fi
10580 
10581 
10582   test -n "$RMDIR" && break
10583 done
10584 
10585   else
10586     # The variable is set, but is it from the command line or the environment?
10587 
10588     # Try to remove the string !RMDIR! from our list.
10589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10591       # If it failed, the variable was not from the command line. Ignore it,
10592       # but warn the user (except for BASH, which is always set by the calling BASH).
10593       if test "xRMDIR" != xBASH; then
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10595 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10596       fi
10597       # Try to locate tool using the code snippet
10598       for ac_prog in rmdir
10599 do
10600   # Extract the first word of "$ac_prog", so it can be a program name with args.
10601 set dummy $ac_prog; ac_word=$2
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603 $as_echo_n "checking for $ac_word... " >&6; }
10604 if ${ac_cv_path_RMDIR+:} false; then :
10605   $as_echo_n "(cached) " >&6
10606 else
10607   case $RMDIR in
10608   [\\/]* | ?:[\\/]*)
10609   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10610   ;;
10611   *)
10612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613 for as_dir in $PATH
10614 do
10615   IFS=$as_save_IFS
10616   test -z "$as_dir" && as_dir=.
10617     for ac_exec_ext in '' $ac_executable_extensions; do
10618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10619     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621     break 2
10622   fi
10623 done
10624   done
10625 IFS=$as_save_IFS
10626 
10627   ;;
10628 esac
10629 fi
10630 RMDIR=$ac_cv_path_RMDIR
10631 if test -n "$RMDIR"; then
10632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10633 $as_echo "$RMDIR" >&6; }
10634 else
10635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636 $as_echo "no" >&6; }
10637 fi
10638 
10639 
10640   test -n "$RMDIR" && break
10641 done
10642 
10643     else
10644       # If it succeeded, then it was overridden by the user. We will use it
10645       # for the tool.
10646 
10647       # First remove it from the list of overridden variables, so we can test
10648       # for unknown variables in the end.
10649       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10650 
10651       # Check if we try to supply an empty value
10652       if test "x$RMDIR" = x; then
10653         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10654 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10656 $as_echo_n "checking for RMDIR... " >&6; }
10657         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10658 $as_echo "disabled" >&6; }
10659       else
10660         # Check if the provided tool contains a complete path.
10661         tool_specified="$RMDIR"
10662         tool_basename="${tool_specified##*/}"
10663         if test "x$tool_basename" = "x$tool_specified"; then
10664           # A command without a complete path is provided, search $PATH.
10665           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10666 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10667           # Extract the first word of "$tool_basename", so it can be a program name with args.
10668 set dummy $tool_basename; ac_word=$2
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10670 $as_echo_n "checking for $ac_word... " >&6; }
10671 if ${ac_cv_path_RMDIR+:} false; then :
10672   $as_echo_n "(cached) " >&6
10673 else
10674   case $RMDIR in
10675   [\\/]* | ?:[\\/]*)
10676   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10677   ;;
10678   *)
10679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10680 for as_dir in $PATH
10681 do
10682   IFS=$as_save_IFS
10683   test -z "$as_dir" && as_dir=.
10684     for ac_exec_ext in '' $ac_executable_extensions; do
10685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10686     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688     break 2
10689   fi
10690 done
10691   done
10692 IFS=$as_save_IFS
10693 
10694   ;;
10695 esac
10696 fi
10697 RMDIR=$ac_cv_path_RMDIR
10698 if test -n "$RMDIR"; then
10699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10700 $as_echo "$RMDIR" >&6; }
10701 else
10702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703 $as_echo "no" >&6; }
10704 fi
10705 
10706 
10707           if test "x$RMDIR" = x; then
10708             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10709           fi
10710         else
10711           # Otherwise we believe it is a complete path. Use it as it is.
10712           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10713 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10714           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10715 $as_echo_n "checking for RMDIR... " >&6; }
10716           if test ! -x "$tool_specified"; then
10717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10718 $as_echo "not found" >&6; }
10719             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10720           fi
10721           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10722 $as_echo "$tool_specified" >&6; }
10723         fi
10724       fi
10725     fi
10726 
10727   fi
10728 
10729 
10730 
10731   if test "x$RMDIR" = x; then
10732     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10733   fi
10734 
10735 
10736 
10737 
10738 
10739   # Publish this variable in the help.
10740 
10741 
10742   if [ -z "${SH+x}" ]; then
10743     # The variable is not set by user, try to locate tool using the code snippet
10744     for ac_prog in sh
10745 do
10746   # Extract the first word of "$ac_prog", so it can be a program name with args.
10747 set dummy $ac_prog; ac_word=$2
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10749 $as_echo_n "checking for $ac_word... " >&6; }
10750 if ${ac_cv_path_SH+:} false; then :
10751   $as_echo_n "(cached) " >&6
10752 else
10753   case $SH in
10754   [\\/]* | ?:[\\/]*)
10755   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10756   ;;
10757   *)
10758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10759 for as_dir in $PATH
10760 do
10761   IFS=$as_save_IFS
10762   test -z "$as_dir" && as_dir=.
10763     for ac_exec_ext in '' $ac_executable_extensions; do
10764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10765     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10767     break 2
10768   fi
10769 done
10770   done
10771 IFS=$as_save_IFS
10772 
10773   ;;
10774 esac
10775 fi
10776 SH=$ac_cv_path_SH
10777 if test -n "$SH"; then
10778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10779 $as_echo "$SH" >&6; }
10780 else
10781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782 $as_echo "no" >&6; }
10783 fi
10784 
10785 
10786   test -n "$SH" && break
10787 done
10788 
10789   else
10790     # The variable is set, but is it from the command line or the environment?
10791 
10792     # Try to remove the string !SH! from our list.
10793     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10794     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10795       # If it failed, the variable was not from the command line. Ignore it,
10796       # but warn the user (except for BASH, which is always set by the calling BASH).
10797       if test "xSH" != xBASH; then
10798         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10799 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10800       fi
10801       # Try to locate tool using the code snippet
10802       for ac_prog in sh
10803 do
10804   # Extract the first word of "$ac_prog", so it can be a program name with args.
10805 set dummy $ac_prog; ac_word=$2
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10807 $as_echo_n "checking for $ac_word... " >&6; }
10808 if ${ac_cv_path_SH+:} false; then :
10809   $as_echo_n "(cached) " >&6
10810 else
10811   case $SH in
10812   [\\/]* | ?:[\\/]*)
10813   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10814   ;;
10815   *)
10816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10817 for as_dir in $PATH
10818 do
10819   IFS=$as_save_IFS
10820   test -z "$as_dir" && as_dir=.
10821     for ac_exec_ext in '' $ac_executable_extensions; do
10822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10823     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10825     break 2
10826   fi
10827 done
10828   done
10829 IFS=$as_save_IFS
10830 
10831   ;;
10832 esac
10833 fi
10834 SH=$ac_cv_path_SH
10835 if test -n "$SH"; then
10836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10837 $as_echo "$SH" >&6; }
10838 else
10839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840 $as_echo "no" >&6; }
10841 fi
10842 
10843 
10844   test -n "$SH" && break
10845 done
10846 
10847     else
10848       # If it succeeded, then it was overridden by the user. We will use it
10849       # for the tool.
10850 
10851       # First remove it from the list of overridden variables, so we can test
10852       # for unknown variables in the end.
10853       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10854 
10855       # Check if we try to supply an empty value
10856       if test "x$SH" = x; then
10857         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10858 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10859         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10860 $as_echo_n "checking for SH... " >&6; }
10861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10862 $as_echo "disabled" >&6; }
10863       else
10864         # Check if the provided tool contains a complete path.
10865         tool_specified="$SH"
10866         tool_basename="${tool_specified##*/}"
10867         if test "x$tool_basename" = "x$tool_specified"; then
10868           # A command without a complete path is provided, search $PATH.
10869           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10870 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10871           # Extract the first word of "$tool_basename", so it can be a program name with args.
10872 set dummy $tool_basename; ac_word=$2
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874 $as_echo_n "checking for $ac_word... " >&6; }
10875 if ${ac_cv_path_SH+:} false; then :
10876   $as_echo_n "(cached) " >&6
10877 else
10878   case $SH in
10879   [\\/]* | ?:[\\/]*)
10880   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10881   ;;
10882   *)
10883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884 for as_dir in $PATH
10885 do
10886   IFS=$as_save_IFS
10887   test -z "$as_dir" && as_dir=.
10888     for ac_exec_ext in '' $ac_executable_extensions; do
10889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892     break 2
10893   fi
10894 done
10895   done
10896 IFS=$as_save_IFS
10897 
10898   ;;
10899 esac
10900 fi
10901 SH=$ac_cv_path_SH
10902 if test -n "$SH"; then
10903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10904 $as_echo "$SH" >&6; }
10905 else
10906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907 $as_echo "no" >&6; }
10908 fi
10909 
10910 
10911           if test "x$SH" = x; then
10912             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10913           fi
10914         else
10915           # Otherwise we believe it is a complete path. Use it as it is.
10916           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10917 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10918           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10919 $as_echo_n "checking for SH... " >&6; }
10920           if test ! -x "$tool_specified"; then
10921             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10922 $as_echo "not found" >&6; }
10923             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10924           fi
10925           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10926 $as_echo "$tool_specified" >&6; }
10927         fi
10928       fi
10929     fi
10930 
10931   fi
10932 
10933 
10934 
10935   if test "x$SH" = x; then
10936     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10937   fi
10938 
10939 
10940 
10941 
10942 
10943   # Publish this variable in the help.
10944 
10945 
10946   if [ -z "${SORT+x}" ]; then
10947     # The variable is not set by user, try to locate tool using the code snippet
10948     for ac_prog in sort
10949 do
10950   # Extract the first word of "$ac_prog", so it can be a program name with args.
10951 set dummy $ac_prog; ac_word=$2
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10953 $as_echo_n "checking for $ac_word... " >&6; }
10954 if ${ac_cv_path_SORT+:} false; then :
10955   $as_echo_n "(cached) " >&6
10956 else
10957   case $SORT in
10958   [\\/]* | ?:[\\/]*)
10959   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10960   ;;
10961   *)
10962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10963 for as_dir in $PATH
10964 do
10965   IFS=$as_save_IFS
10966   test -z "$as_dir" && as_dir=.
10967     for ac_exec_ext in '' $ac_executable_extensions; do
10968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10969     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10971     break 2
10972   fi
10973 done
10974   done
10975 IFS=$as_save_IFS
10976 
10977   ;;
10978 esac
10979 fi
10980 SORT=$ac_cv_path_SORT
10981 if test -n "$SORT"; then
10982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10983 $as_echo "$SORT" >&6; }
10984 else
10985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986 $as_echo "no" >&6; }
10987 fi
10988 
10989 
10990   test -n "$SORT" && break
10991 done
10992 
10993   else
10994     # The variable is set, but is it from the command line or the environment?
10995 
10996     # Try to remove the string !SORT! from our list.
10997     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10998     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10999       # If it failed, the variable was not from the command line. Ignore it,
11000       # but warn the user (except for BASH, which is always set by the calling BASH).
11001       if test "xSORT" != xBASH; then
11002         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11003 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11004       fi
11005       # Try to locate tool using the code snippet
11006       for ac_prog in sort
11007 do
11008   # Extract the first word of "$ac_prog", so it can be a program name with args.
11009 set dummy $ac_prog; ac_word=$2
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11011 $as_echo_n "checking for $ac_word... " >&6; }
11012 if ${ac_cv_path_SORT+:} false; then :
11013   $as_echo_n "(cached) " >&6
11014 else
11015   case $SORT in
11016   [\\/]* | ?:[\\/]*)
11017   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11018   ;;
11019   *)
11020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11021 for as_dir in $PATH
11022 do
11023   IFS=$as_save_IFS
11024   test -z "$as_dir" && as_dir=.
11025     for ac_exec_ext in '' $ac_executable_extensions; do
11026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11027     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11029     break 2
11030   fi
11031 done
11032   done
11033 IFS=$as_save_IFS
11034 
11035   ;;
11036 esac
11037 fi
11038 SORT=$ac_cv_path_SORT
11039 if test -n "$SORT"; then
11040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11041 $as_echo "$SORT" >&6; }
11042 else
11043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11044 $as_echo "no" >&6; }
11045 fi
11046 
11047 
11048   test -n "$SORT" && break
11049 done
11050 
11051     else
11052       # If it succeeded, then it was overridden by the user. We will use it
11053       # for the tool.
11054 
11055       # First remove it from the list of overridden variables, so we can test
11056       # for unknown variables in the end.
11057       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11058 
11059       # Check if we try to supply an empty value
11060       if test "x$SORT" = x; then
11061         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11062 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11064 $as_echo_n "checking for SORT... " >&6; }
11065         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11066 $as_echo "disabled" >&6; }
11067       else
11068         # Check if the provided tool contains a complete path.
11069         tool_specified="$SORT"
11070         tool_basename="${tool_specified##*/}"
11071         if test "x$tool_basename" = "x$tool_specified"; then
11072           # A command without a complete path is provided, search $PATH.
11073           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11074 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11075           # Extract the first word of "$tool_basename", so it can be a program name with args.
11076 set dummy $tool_basename; ac_word=$2
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11078 $as_echo_n "checking for $ac_word... " >&6; }
11079 if ${ac_cv_path_SORT+:} false; then :
11080   $as_echo_n "(cached) " >&6
11081 else
11082   case $SORT in
11083   [\\/]* | ?:[\\/]*)
11084   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11085   ;;
11086   *)
11087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11088 for as_dir in $PATH
11089 do
11090   IFS=$as_save_IFS
11091   test -z "$as_dir" && as_dir=.
11092     for ac_exec_ext in '' $ac_executable_extensions; do
11093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11094     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11096     break 2
11097   fi
11098 done
11099   done
11100 IFS=$as_save_IFS
11101 
11102   ;;
11103 esac
11104 fi
11105 SORT=$ac_cv_path_SORT
11106 if test -n "$SORT"; then
11107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11108 $as_echo "$SORT" >&6; }
11109 else
11110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11111 $as_echo "no" >&6; }
11112 fi
11113 
11114 
11115           if test "x$SORT" = x; then
11116             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11117           fi
11118         else
11119           # Otherwise we believe it is a complete path. Use it as it is.
11120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11121 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11122           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11123 $as_echo_n "checking for SORT... " >&6; }
11124           if test ! -x "$tool_specified"; then
11125             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11126 $as_echo "not found" >&6; }
11127             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11128           fi
11129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11130 $as_echo "$tool_specified" >&6; }
11131         fi
11132       fi
11133     fi
11134 
11135   fi
11136 
11137 
11138 
11139   if test "x$SORT" = x; then
11140     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11141   fi
11142 
11143 
11144 
11145 
11146 
11147   # Publish this variable in the help.
11148 
11149 
11150   if [ -z "${TAIL+x}" ]; then
11151     # The variable is not set by user, try to locate tool using the code snippet
11152     for ac_prog in tail
11153 do
11154   # Extract the first word of "$ac_prog", so it can be a program name with args.
11155 set dummy $ac_prog; ac_word=$2
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11157 $as_echo_n "checking for $ac_word... " >&6; }
11158 if ${ac_cv_path_TAIL+:} false; then :
11159   $as_echo_n "(cached) " >&6
11160 else
11161   case $TAIL in
11162   [\\/]* | ?:[\\/]*)
11163   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11164   ;;
11165   *)
11166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11167 for as_dir in $PATH
11168 do
11169   IFS=$as_save_IFS
11170   test -z "$as_dir" && as_dir=.
11171     for ac_exec_ext in '' $ac_executable_extensions; do
11172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11173     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11175     break 2
11176   fi
11177 done
11178   done
11179 IFS=$as_save_IFS
11180 
11181   ;;
11182 esac
11183 fi
11184 TAIL=$ac_cv_path_TAIL
11185 if test -n "$TAIL"; then
11186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11187 $as_echo "$TAIL" >&6; }
11188 else
11189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190 $as_echo "no" >&6; }
11191 fi
11192 
11193 
11194   test -n "$TAIL" && break
11195 done
11196 
11197   else
11198     # The variable is set, but is it from the command line or the environment?
11199 
11200     # Try to remove the string !TAIL! from our list.
11201     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11202     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11203       # If it failed, the variable was not from the command line. Ignore it,
11204       # but warn the user (except for BASH, which is always set by the calling BASH).
11205       if test "xTAIL" != xBASH; then
11206         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11207 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11208       fi
11209       # Try to locate tool using the code snippet
11210       for ac_prog in tail
11211 do
11212   # Extract the first word of "$ac_prog", so it can be a program name with args.
11213 set dummy $ac_prog; ac_word=$2
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11215 $as_echo_n "checking for $ac_word... " >&6; }
11216 if ${ac_cv_path_TAIL+:} false; then :
11217   $as_echo_n "(cached) " >&6
11218 else
11219   case $TAIL in
11220   [\\/]* | ?:[\\/]*)
11221   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11222   ;;
11223   *)
11224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11225 for as_dir in $PATH
11226 do
11227   IFS=$as_save_IFS
11228   test -z "$as_dir" && as_dir=.
11229     for ac_exec_ext in '' $ac_executable_extensions; do
11230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11231     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11233     break 2
11234   fi
11235 done
11236   done
11237 IFS=$as_save_IFS
11238 
11239   ;;
11240 esac
11241 fi
11242 TAIL=$ac_cv_path_TAIL
11243 if test -n "$TAIL"; then
11244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11245 $as_echo "$TAIL" >&6; }
11246 else
11247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248 $as_echo "no" >&6; }
11249 fi
11250 
11251 
11252   test -n "$TAIL" && break
11253 done
11254 
11255     else
11256       # If it succeeded, then it was overridden by the user. We will use it
11257       # for the tool.
11258 
11259       # First remove it from the list of overridden variables, so we can test
11260       # for unknown variables in the end.
11261       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11262 
11263       # Check if we try to supply an empty value
11264       if test "x$TAIL" = x; then
11265         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11266 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11268 $as_echo_n "checking for TAIL... " >&6; }
11269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11270 $as_echo "disabled" >&6; }
11271       else
11272         # Check if the provided tool contains a complete path.
11273         tool_specified="$TAIL"
11274         tool_basename="${tool_specified##*/}"
11275         if test "x$tool_basename" = "x$tool_specified"; then
11276           # A command without a complete path is provided, search $PATH.
11277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11278 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11279           # Extract the first word of "$tool_basename", so it can be a program name with args.
11280 set dummy $tool_basename; ac_word=$2
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11282 $as_echo_n "checking for $ac_word... " >&6; }
11283 if ${ac_cv_path_TAIL+:} false; then :
11284   $as_echo_n "(cached) " >&6
11285 else
11286   case $TAIL in
11287   [\\/]* | ?:[\\/]*)
11288   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11289   ;;
11290   *)
11291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11292 for as_dir in $PATH
11293 do
11294   IFS=$as_save_IFS
11295   test -z "$as_dir" && as_dir=.
11296     for ac_exec_ext in '' $ac_executable_extensions; do
11297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11298     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11300     break 2
11301   fi
11302 done
11303   done
11304 IFS=$as_save_IFS
11305 
11306   ;;
11307 esac
11308 fi
11309 TAIL=$ac_cv_path_TAIL
11310 if test -n "$TAIL"; then
11311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11312 $as_echo "$TAIL" >&6; }
11313 else
11314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315 $as_echo "no" >&6; }
11316 fi
11317 
11318 
11319           if test "x$TAIL" = x; then
11320             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11321           fi
11322         else
11323           # Otherwise we believe it is a complete path. Use it as it is.
11324           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11325 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11326           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11327 $as_echo_n "checking for TAIL... " >&6; }
11328           if test ! -x "$tool_specified"; then
11329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11330 $as_echo "not found" >&6; }
11331             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11332           fi
11333           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11334 $as_echo "$tool_specified" >&6; }
11335         fi
11336       fi
11337     fi
11338 
11339   fi
11340 
11341 
11342 
11343   if test "x$TAIL" = x; then
11344     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11345   fi
11346 
11347 
11348 
11349 
11350 
11351   # Publish this variable in the help.
11352 
11353 
11354   if [ -z "${TAR+x}" ]; then
11355     # The variable is not set by user, try to locate tool using the code snippet
11356     for ac_prog in gtar tar
11357 do
11358   # Extract the first word of "$ac_prog", so it can be a program name with args.
11359 set dummy $ac_prog; ac_word=$2
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361 $as_echo_n "checking for $ac_word... " >&6; }
11362 if ${ac_cv_path_TAR+:} false; then :
11363   $as_echo_n "(cached) " >&6
11364 else
11365   case $TAR in
11366   [\\/]* | ?:[\\/]*)
11367   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11368   ;;
11369   *)
11370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11371 for as_dir in $PATH
11372 do
11373   IFS=$as_save_IFS
11374   test -z "$as_dir" && as_dir=.
11375     for ac_exec_ext in '' $ac_executable_extensions; do
11376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11377     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11379     break 2
11380   fi
11381 done
11382   done
11383 IFS=$as_save_IFS
11384 
11385   ;;
11386 esac
11387 fi
11388 TAR=$ac_cv_path_TAR
11389 if test -n "$TAR"; then
11390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11391 $as_echo "$TAR" >&6; }
11392 else
11393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394 $as_echo "no" >&6; }
11395 fi
11396 
11397 
11398   test -n "$TAR" && break
11399 done
11400 
11401   else
11402     # The variable is set, but is it from the command line or the environment?
11403 
11404     # Try to remove the string !TAR! from our list.
11405     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11406     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11407       # If it failed, the variable was not from the command line. Ignore it,
11408       # but warn the user (except for BASH, which is always set by the calling BASH).
11409       if test "xTAR" != xBASH; then
11410         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11411 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11412       fi
11413       # Try to locate tool using the code snippet
11414       for ac_prog in gtar tar
11415 do
11416   # Extract the first word of "$ac_prog", so it can be a program name with args.
11417 set dummy $ac_prog; ac_word=$2
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11419 $as_echo_n "checking for $ac_word... " >&6; }
11420 if ${ac_cv_path_TAR+:} false; then :
11421   $as_echo_n "(cached) " >&6
11422 else
11423   case $TAR in
11424   [\\/]* | ?:[\\/]*)
11425   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11426   ;;
11427   *)
11428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11429 for as_dir in $PATH
11430 do
11431   IFS=$as_save_IFS
11432   test -z "$as_dir" && as_dir=.
11433     for ac_exec_ext in '' $ac_executable_extensions; do
11434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11435     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11437     break 2
11438   fi
11439 done
11440   done
11441 IFS=$as_save_IFS
11442 
11443   ;;
11444 esac
11445 fi
11446 TAR=$ac_cv_path_TAR
11447 if test -n "$TAR"; then
11448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11449 $as_echo "$TAR" >&6; }
11450 else
11451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452 $as_echo "no" >&6; }
11453 fi
11454 
11455 
11456   test -n "$TAR" && break
11457 done
11458 
11459     else
11460       # If it succeeded, then it was overridden by the user. We will use it
11461       # for the tool.
11462 
11463       # First remove it from the list of overridden variables, so we can test
11464       # for unknown variables in the end.
11465       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11466 
11467       # Check if we try to supply an empty value
11468       if test "x$TAR" = x; then
11469         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11470 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11472 $as_echo_n "checking for TAR... " >&6; }
11473         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11474 $as_echo "disabled" >&6; }
11475       else
11476         # Check if the provided tool contains a complete path.
11477         tool_specified="$TAR"
11478         tool_basename="${tool_specified##*/}"
11479         if test "x$tool_basename" = "x$tool_specified"; then
11480           # A command without a complete path is provided, search $PATH.
11481           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11482 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11483           # Extract the first word of "$tool_basename", so it can be a program name with args.
11484 set dummy $tool_basename; ac_word=$2
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11486 $as_echo_n "checking for $ac_word... " >&6; }
11487 if ${ac_cv_path_TAR+:} false; then :
11488   $as_echo_n "(cached) " >&6
11489 else
11490   case $TAR in
11491   [\\/]* | ?:[\\/]*)
11492   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11493   ;;
11494   *)
11495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11496 for as_dir in $PATH
11497 do
11498   IFS=$as_save_IFS
11499   test -z "$as_dir" && as_dir=.
11500     for ac_exec_ext in '' $ac_executable_extensions; do
11501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11502     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11504     break 2
11505   fi
11506 done
11507   done
11508 IFS=$as_save_IFS
11509 
11510   ;;
11511 esac
11512 fi
11513 TAR=$ac_cv_path_TAR
11514 if test -n "$TAR"; then
11515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11516 $as_echo "$TAR" >&6; }
11517 else
11518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11519 $as_echo "no" >&6; }
11520 fi
11521 
11522 
11523           if test "x$TAR" = x; then
11524             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11525           fi
11526         else
11527           # Otherwise we believe it is a complete path. Use it as it is.
11528           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11529 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11530           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11531 $as_echo_n "checking for TAR... " >&6; }
11532           if test ! -x "$tool_specified"; then
11533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11534 $as_echo "not found" >&6; }
11535             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11536           fi
11537           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11538 $as_echo "$tool_specified" >&6; }
11539         fi
11540       fi
11541     fi
11542 
11543   fi
11544 
11545 
11546 
11547   if test "x$TAR" = x; then
11548     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11549   fi
11550 
11551 
11552 
11553 
11554 
11555   # Publish this variable in the help.
11556 
11557 
11558   if [ -z "${TEE+x}" ]; then
11559     # The variable is not set by user, try to locate tool using the code snippet
11560     for ac_prog in tee
11561 do
11562   # Extract the first word of "$ac_prog", so it can be a program name with args.
11563 set dummy $ac_prog; ac_word=$2
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11565 $as_echo_n "checking for $ac_word... " >&6; }
11566 if ${ac_cv_path_TEE+:} false; then :
11567   $as_echo_n "(cached) " >&6
11568 else
11569   case $TEE in
11570   [\\/]* | ?:[\\/]*)
11571   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11572   ;;
11573   *)
11574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11575 for as_dir in $PATH
11576 do
11577   IFS=$as_save_IFS
11578   test -z "$as_dir" && as_dir=.
11579     for ac_exec_ext in '' $ac_executable_extensions; do
11580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11581     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11583     break 2
11584   fi
11585 done
11586   done
11587 IFS=$as_save_IFS
11588 
11589   ;;
11590 esac
11591 fi
11592 TEE=$ac_cv_path_TEE
11593 if test -n "$TEE"; then
11594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11595 $as_echo "$TEE" >&6; }
11596 else
11597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598 $as_echo "no" >&6; }
11599 fi
11600 
11601 
11602   test -n "$TEE" && break
11603 done
11604 
11605   else
11606     # The variable is set, but is it from the command line or the environment?
11607 
11608     # Try to remove the string !TEE! from our list.
11609     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11610     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11611       # If it failed, the variable was not from the command line. Ignore it,
11612       # but warn the user (except for BASH, which is always set by the calling BASH).
11613       if test "xTEE" != xBASH; then
11614         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11615 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11616       fi
11617       # Try to locate tool using the code snippet
11618       for ac_prog in tee
11619 do
11620   # Extract the first word of "$ac_prog", so it can be a program name with args.
11621 set dummy $ac_prog; ac_word=$2
11622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11623 $as_echo_n "checking for $ac_word... " >&6; }
11624 if ${ac_cv_path_TEE+:} false; then :
11625   $as_echo_n "(cached) " >&6
11626 else
11627   case $TEE in
11628   [\\/]* | ?:[\\/]*)
11629   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11630   ;;
11631   *)
11632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11633 for as_dir in $PATH
11634 do
11635   IFS=$as_save_IFS
11636   test -z "$as_dir" && as_dir=.
11637     for ac_exec_ext in '' $ac_executable_extensions; do
11638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11639     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11641     break 2
11642   fi
11643 done
11644   done
11645 IFS=$as_save_IFS
11646 
11647   ;;
11648 esac
11649 fi
11650 TEE=$ac_cv_path_TEE
11651 if test -n "$TEE"; then
11652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11653 $as_echo "$TEE" >&6; }
11654 else
11655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11656 $as_echo "no" >&6; }
11657 fi
11658 
11659 
11660   test -n "$TEE" && break
11661 done
11662 
11663     else
11664       # If it succeeded, then it was overridden by the user. We will use it
11665       # for the tool.
11666 
11667       # First remove it from the list of overridden variables, so we can test
11668       # for unknown variables in the end.
11669       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11670 
11671       # Check if we try to supply an empty value
11672       if test "x$TEE" = x; then
11673         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11674 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11676 $as_echo_n "checking for TEE... " >&6; }
11677         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11678 $as_echo "disabled" >&6; }
11679       else
11680         # Check if the provided tool contains a complete path.
11681         tool_specified="$TEE"
11682         tool_basename="${tool_specified##*/}"
11683         if test "x$tool_basename" = "x$tool_specified"; then
11684           # A command without a complete path is provided, search $PATH.
11685           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11686 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11687           # Extract the first word of "$tool_basename", so it can be a program name with args.
11688 set dummy $tool_basename; ac_word=$2
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11690 $as_echo_n "checking for $ac_word... " >&6; }
11691 if ${ac_cv_path_TEE+:} false; then :
11692   $as_echo_n "(cached) " >&6
11693 else
11694   case $TEE in
11695   [\\/]* | ?:[\\/]*)
11696   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11697   ;;
11698   *)
11699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11700 for as_dir in $PATH
11701 do
11702   IFS=$as_save_IFS
11703   test -z "$as_dir" && as_dir=.
11704     for ac_exec_ext in '' $ac_executable_extensions; do
11705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11706     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11708     break 2
11709   fi
11710 done
11711   done
11712 IFS=$as_save_IFS
11713 
11714   ;;
11715 esac
11716 fi
11717 TEE=$ac_cv_path_TEE
11718 if test -n "$TEE"; then
11719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11720 $as_echo "$TEE" >&6; }
11721 else
11722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723 $as_echo "no" >&6; }
11724 fi
11725 
11726 
11727           if test "x$TEE" = x; then
11728             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11729           fi
11730         else
11731           # Otherwise we believe it is a complete path. Use it as it is.
11732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11733 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11734           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11735 $as_echo_n "checking for TEE... " >&6; }
11736           if test ! -x "$tool_specified"; then
11737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11738 $as_echo "not found" >&6; }
11739             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11740           fi
11741           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11742 $as_echo "$tool_specified" >&6; }
11743         fi
11744       fi
11745     fi
11746 
11747   fi
11748 
11749 
11750 
11751   if test "x$TEE" = x; then
11752     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11753   fi
11754 
11755 
11756 
11757 
11758 
11759   # Publish this variable in the help.
11760 
11761 
11762   if [ -z "${TOUCH+x}" ]; then
11763     # The variable is not set by user, try to locate tool using the code snippet
11764     for ac_prog in touch
11765 do
11766   # Extract the first word of "$ac_prog", so it can be a program name with args.
11767 set dummy $ac_prog; ac_word=$2
11768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11769 $as_echo_n "checking for $ac_word... " >&6; }
11770 if ${ac_cv_path_TOUCH+:} false; then :
11771   $as_echo_n "(cached) " >&6
11772 else
11773   case $TOUCH in
11774   [\\/]* | ?:[\\/]*)
11775   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11776   ;;
11777   *)
11778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11779 for as_dir in $PATH
11780 do
11781   IFS=$as_save_IFS
11782   test -z "$as_dir" && as_dir=.
11783     for ac_exec_ext in '' $ac_executable_extensions; do
11784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11785     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11787     break 2
11788   fi
11789 done
11790   done
11791 IFS=$as_save_IFS
11792 
11793   ;;
11794 esac
11795 fi
11796 TOUCH=$ac_cv_path_TOUCH
11797 if test -n "$TOUCH"; then
11798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11799 $as_echo "$TOUCH" >&6; }
11800 else
11801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11802 $as_echo "no" >&6; }
11803 fi
11804 
11805 
11806   test -n "$TOUCH" && break
11807 done
11808 
11809   else
11810     # The variable is set, but is it from the command line or the environment?
11811 
11812     # Try to remove the string !TOUCH! from our list.
11813     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11814     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11815       # If it failed, the variable was not from the command line. Ignore it,
11816       # but warn the user (except for BASH, which is always set by the calling BASH).
11817       if test "xTOUCH" != xBASH; then
11818         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11819 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11820       fi
11821       # Try to locate tool using the code snippet
11822       for ac_prog in touch
11823 do
11824   # Extract the first word of "$ac_prog", so it can be a program name with args.
11825 set dummy $ac_prog; ac_word=$2
11826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11827 $as_echo_n "checking for $ac_word... " >&6; }
11828 if ${ac_cv_path_TOUCH+:} false; then :
11829   $as_echo_n "(cached) " >&6
11830 else
11831   case $TOUCH in
11832   [\\/]* | ?:[\\/]*)
11833   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11834   ;;
11835   *)
11836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11837 for as_dir in $PATH
11838 do
11839   IFS=$as_save_IFS
11840   test -z "$as_dir" && as_dir=.
11841     for ac_exec_ext in '' $ac_executable_extensions; do
11842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11843     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11845     break 2
11846   fi
11847 done
11848   done
11849 IFS=$as_save_IFS
11850 
11851   ;;
11852 esac
11853 fi
11854 TOUCH=$ac_cv_path_TOUCH
11855 if test -n "$TOUCH"; then
11856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11857 $as_echo "$TOUCH" >&6; }
11858 else
11859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11860 $as_echo "no" >&6; }
11861 fi
11862 
11863 
11864   test -n "$TOUCH" && break
11865 done
11866 
11867     else
11868       # If it succeeded, then it was overridden by the user. We will use it
11869       # for the tool.
11870 
11871       # First remove it from the list of overridden variables, so we can test
11872       # for unknown variables in the end.
11873       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11874 
11875       # Check if we try to supply an empty value
11876       if test "x$TOUCH" = x; then
11877         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11878 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11879         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11880 $as_echo_n "checking for TOUCH... " >&6; }
11881         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11882 $as_echo "disabled" >&6; }
11883       else
11884         # Check if the provided tool contains a complete path.
11885         tool_specified="$TOUCH"
11886         tool_basename="${tool_specified##*/}"
11887         if test "x$tool_basename" = "x$tool_specified"; then
11888           # A command without a complete path is provided, search $PATH.
11889           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11890 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11891           # Extract the first word of "$tool_basename", so it can be a program name with args.
11892 set dummy $tool_basename; ac_word=$2
11893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894 $as_echo_n "checking for $ac_word... " >&6; }
11895 if ${ac_cv_path_TOUCH+:} false; then :
11896   $as_echo_n "(cached) " >&6
11897 else
11898   case $TOUCH in
11899   [\\/]* | ?:[\\/]*)
11900   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11901   ;;
11902   *)
11903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904 for as_dir in $PATH
11905 do
11906   IFS=$as_save_IFS
11907   test -z "$as_dir" && as_dir=.
11908     for ac_exec_ext in '' $ac_executable_extensions; do
11909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11910     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912     break 2
11913   fi
11914 done
11915   done
11916 IFS=$as_save_IFS
11917 
11918   ;;
11919 esac
11920 fi
11921 TOUCH=$ac_cv_path_TOUCH
11922 if test -n "$TOUCH"; then
11923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11924 $as_echo "$TOUCH" >&6; }
11925 else
11926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927 $as_echo "no" >&6; }
11928 fi
11929 
11930 
11931           if test "x$TOUCH" = x; then
11932             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11933           fi
11934         else
11935           # Otherwise we believe it is a complete path. Use it as it is.
11936           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11937 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11938           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11939 $as_echo_n "checking for TOUCH... " >&6; }
11940           if test ! -x "$tool_specified"; then
11941             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11942 $as_echo "not found" >&6; }
11943             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11944           fi
11945           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11946 $as_echo "$tool_specified" >&6; }
11947         fi
11948       fi
11949     fi
11950 
11951   fi
11952 
11953 
11954 
11955   if test "x$TOUCH" = x; then
11956     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11957   fi
11958 
11959 
11960 
11961 
11962 
11963   # Publish this variable in the help.
11964 
11965 
11966   if [ -z "${TR+x}" ]; then
11967     # The variable is not set by user, try to locate tool using the code snippet
11968     for ac_prog in tr
11969 do
11970   # Extract the first word of "$ac_prog", so it can be a program name with args.
11971 set dummy $ac_prog; ac_word=$2
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973 $as_echo_n "checking for $ac_word... " >&6; }
11974 if ${ac_cv_path_TR+:} false; then :
11975   $as_echo_n "(cached) " >&6
11976 else
11977   case $TR in
11978   [\\/]* | ?:[\\/]*)
11979   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11980   ;;
11981   *)
11982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983 for as_dir in $PATH
11984 do
11985   IFS=$as_save_IFS
11986   test -z "$as_dir" && as_dir=.
11987     for ac_exec_ext in '' $ac_executable_extensions; do
11988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11989     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991     break 2
11992   fi
11993 done
11994   done
11995 IFS=$as_save_IFS
11996 
11997   ;;
11998 esac
11999 fi
12000 TR=$ac_cv_path_TR
12001 if test -n "$TR"; then
12002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12003 $as_echo "$TR" >&6; }
12004 else
12005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006 $as_echo "no" >&6; }
12007 fi
12008 
12009 
12010   test -n "$TR" && break
12011 done
12012 
12013   else
12014     # The variable is set, but is it from the command line or the environment?
12015 
12016     # Try to remove the string !TR! from our list.
12017     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12018     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12019       # If it failed, the variable was not from the command line. Ignore it,
12020       # but warn the user (except for BASH, which is always set by the calling BASH).
12021       if test "xTR" != xBASH; then
12022         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12023 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12024       fi
12025       # Try to locate tool using the code snippet
12026       for ac_prog in tr
12027 do
12028   # Extract the first word of "$ac_prog", so it can be a program name with args.
12029 set dummy $ac_prog; ac_word=$2
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12031 $as_echo_n "checking for $ac_word... " >&6; }
12032 if ${ac_cv_path_TR+:} false; then :
12033   $as_echo_n "(cached) " >&6
12034 else
12035   case $TR in
12036   [\\/]* | ?:[\\/]*)
12037   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12038   ;;
12039   *)
12040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12041 for as_dir in $PATH
12042 do
12043   IFS=$as_save_IFS
12044   test -z "$as_dir" && as_dir=.
12045     for ac_exec_ext in '' $ac_executable_extensions; do
12046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12047     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12049     break 2
12050   fi
12051 done
12052   done
12053 IFS=$as_save_IFS
12054 
12055   ;;
12056 esac
12057 fi
12058 TR=$ac_cv_path_TR
12059 if test -n "$TR"; then
12060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12061 $as_echo "$TR" >&6; }
12062 else
12063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064 $as_echo "no" >&6; }
12065 fi
12066 
12067 
12068   test -n "$TR" && break
12069 done
12070 
12071     else
12072       # If it succeeded, then it was overridden by the user. We will use it
12073       # for the tool.
12074 
12075       # First remove it from the list of overridden variables, so we can test
12076       # for unknown variables in the end.
12077       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12078 
12079       # Check if we try to supply an empty value
12080       if test "x$TR" = x; then
12081         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12082 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12083         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12084 $as_echo_n "checking for TR... " >&6; }
12085         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12086 $as_echo "disabled" >&6; }
12087       else
12088         # Check if the provided tool contains a complete path.
12089         tool_specified="$TR"
12090         tool_basename="${tool_specified##*/}"
12091         if test "x$tool_basename" = "x$tool_specified"; then
12092           # A command without a complete path is provided, search $PATH.
12093           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12094 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12095           # Extract the first word of "$tool_basename", so it can be a program name with args.
12096 set dummy $tool_basename; ac_word=$2
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12098 $as_echo_n "checking for $ac_word... " >&6; }
12099 if ${ac_cv_path_TR+:} false; then :
12100   $as_echo_n "(cached) " >&6
12101 else
12102   case $TR in
12103   [\\/]* | ?:[\\/]*)
12104   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12105   ;;
12106   *)
12107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108 for as_dir in $PATH
12109 do
12110   IFS=$as_save_IFS
12111   test -z "$as_dir" && as_dir=.
12112     for ac_exec_ext in '' $ac_executable_extensions; do
12113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12114     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12116     break 2
12117   fi
12118 done
12119   done
12120 IFS=$as_save_IFS
12121 
12122   ;;
12123 esac
12124 fi
12125 TR=$ac_cv_path_TR
12126 if test -n "$TR"; then
12127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12128 $as_echo "$TR" >&6; }
12129 else
12130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131 $as_echo "no" >&6; }
12132 fi
12133 
12134 
12135           if test "x$TR" = x; then
12136             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12137           fi
12138         else
12139           # Otherwise we believe it is a complete path. Use it as it is.
12140           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12141 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12142           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12143 $as_echo_n "checking for TR... " >&6; }
12144           if test ! -x "$tool_specified"; then
12145             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12146 $as_echo "not found" >&6; }
12147             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12148           fi
12149           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12150 $as_echo "$tool_specified" >&6; }
12151         fi
12152       fi
12153     fi
12154 
12155   fi
12156 
12157 
12158 
12159   if test "x$TR" = x; then
12160     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12161   fi
12162 
12163 
12164 
12165 
12166 
12167   # Publish this variable in the help.
12168 
12169 
12170   if [ -z "${UNAME+x}" ]; then
12171     # The variable is not set by user, try to locate tool using the code snippet
12172     for ac_prog in uname
12173 do
12174   # Extract the first word of "$ac_prog", so it can be a program name with args.
12175 set dummy $ac_prog; ac_word=$2
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12177 $as_echo_n "checking for $ac_word... " >&6; }
12178 if ${ac_cv_path_UNAME+:} false; then :
12179   $as_echo_n "(cached) " >&6
12180 else
12181   case $UNAME in
12182   [\\/]* | ?:[\\/]*)
12183   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12184   ;;
12185   *)
12186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12187 for as_dir in $PATH
12188 do
12189   IFS=$as_save_IFS
12190   test -z "$as_dir" && as_dir=.
12191     for ac_exec_ext in '' $ac_executable_extensions; do
12192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12193     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12195     break 2
12196   fi
12197 done
12198   done
12199 IFS=$as_save_IFS
12200 
12201   ;;
12202 esac
12203 fi
12204 UNAME=$ac_cv_path_UNAME
12205 if test -n "$UNAME"; then
12206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12207 $as_echo "$UNAME" >&6; }
12208 else
12209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12210 $as_echo "no" >&6; }
12211 fi
12212 
12213 
12214   test -n "$UNAME" && break
12215 done
12216 
12217   else
12218     # The variable is set, but is it from the command line or the environment?
12219 
12220     # Try to remove the string !UNAME! from our list.
12221     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12222     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12223       # If it failed, the variable was not from the command line. Ignore it,
12224       # but warn the user (except for BASH, which is always set by the calling BASH).
12225       if test "xUNAME" != xBASH; then
12226         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12227 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12228       fi
12229       # Try to locate tool using the code snippet
12230       for ac_prog in uname
12231 do
12232   # Extract the first word of "$ac_prog", so it can be a program name with args.
12233 set dummy $ac_prog; ac_word=$2
12234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12235 $as_echo_n "checking for $ac_word... " >&6; }
12236 if ${ac_cv_path_UNAME+:} false; then :
12237   $as_echo_n "(cached) " >&6
12238 else
12239   case $UNAME in
12240   [\\/]* | ?:[\\/]*)
12241   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12242   ;;
12243   *)
12244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12245 for as_dir in $PATH
12246 do
12247   IFS=$as_save_IFS
12248   test -z "$as_dir" && as_dir=.
12249     for ac_exec_ext in '' $ac_executable_extensions; do
12250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12251     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12253     break 2
12254   fi
12255 done
12256   done
12257 IFS=$as_save_IFS
12258 
12259   ;;
12260 esac
12261 fi
12262 UNAME=$ac_cv_path_UNAME
12263 if test -n "$UNAME"; then
12264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12265 $as_echo "$UNAME" >&6; }
12266 else
12267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12268 $as_echo "no" >&6; }
12269 fi
12270 
12271 
12272   test -n "$UNAME" && break
12273 done
12274 
12275     else
12276       # If it succeeded, then it was overridden by the user. We will use it
12277       # for the tool.
12278 
12279       # First remove it from the list of overridden variables, so we can test
12280       # for unknown variables in the end.
12281       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12282 
12283       # Check if we try to supply an empty value
12284       if test "x$UNAME" = x; then
12285         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12286 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12287         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12288 $as_echo_n "checking for UNAME... " >&6; }
12289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12290 $as_echo "disabled" >&6; }
12291       else
12292         # Check if the provided tool contains a complete path.
12293         tool_specified="$UNAME"
12294         tool_basename="${tool_specified##*/}"
12295         if test "x$tool_basename" = "x$tool_specified"; then
12296           # A command without a complete path is provided, search $PATH.
12297           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12298 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12299           # Extract the first word of "$tool_basename", so it can be a program name with args.
12300 set dummy $tool_basename; ac_word=$2
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12302 $as_echo_n "checking for $ac_word... " >&6; }
12303 if ${ac_cv_path_UNAME+:} false; then :
12304   $as_echo_n "(cached) " >&6
12305 else
12306   case $UNAME in
12307   [\\/]* | ?:[\\/]*)
12308   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12309   ;;
12310   *)
12311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12312 for as_dir in $PATH
12313 do
12314   IFS=$as_save_IFS
12315   test -z "$as_dir" && as_dir=.
12316     for ac_exec_ext in '' $ac_executable_extensions; do
12317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12318     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12320     break 2
12321   fi
12322 done
12323   done
12324 IFS=$as_save_IFS
12325 
12326   ;;
12327 esac
12328 fi
12329 UNAME=$ac_cv_path_UNAME
12330 if test -n "$UNAME"; then
12331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12332 $as_echo "$UNAME" >&6; }
12333 else
12334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335 $as_echo "no" >&6; }
12336 fi
12337 
12338 
12339           if test "x$UNAME" = x; then
12340             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12341           fi
12342         else
12343           # Otherwise we believe it is a complete path. Use it as it is.
12344           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12345 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12346           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12347 $as_echo_n "checking for UNAME... " >&6; }
12348           if test ! -x "$tool_specified"; then
12349             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12350 $as_echo "not found" >&6; }
12351             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12352           fi
12353           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12354 $as_echo "$tool_specified" >&6; }
12355         fi
12356       fi
12357     fi
12358 
12359   fi
12360 
12361 
12362 
12363   if test "x$UNAME" = x; then
12364     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12365   fi
12366 
12367 
12368 
12369 
12370 
12371   # Publish this variable in the help.
12372 
12373 
12374   if [ -z "${UNIQ+x}" ]; then
12375     # The variable is not set by user, try to locate tool using the code snippet
12376     for ac_prog in uniq
12377 do
12378   # Extract the first word of "$ac_prog", so it can be a program name with args.
12379 set dummy $ac_prog; ac_word=$2
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12381 $as_echo_n "checking for $ac_word... " >&6; }
12382 if ${ac_cv_path_UNIQ+:} false; then :
12383   $as_echo_n "(cached) " >&6
12384 else
12385   case $UNIQ in
12386   [\\/]* | ?:[\\/]*)
12387   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12388   ;;
12389   *)
12390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12391 for as_dir in $PATH
12392 do
12393   IFS=$as_save_IFS
12394   test -z "$as_dir" && as_dir=.
12395     for ac_exec_ext in '' $ac_executable_extensions; do
12396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12397     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12399     break 2
12400   fi
12401 done
12402   done
12403 IFS=$as_save_IFS
12404 
12405   ;;
12406 esac
12407 fi
12408 UNIQ=$ac_cv_path_UNIQ
12409 if test -n "$UNIQ"; then
12410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12411 $as_echo "$UNIQ" >&6; }
12412 else
12413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12414 $as_echo "no" >&6; }
12415 fi
12416 
12417 
12418   test -n "$UNIQ" && break
12419 done
12420 
12421   else
12422     # The variable is set, but is it from the command line or the environment?
12423 
12424     # Try to remove the string !UNIQ! from our list.
12425     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12426     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12427       # If it failed, the variable was not from the command line. Ignore it,
12428       # but warn the user (except for BASH, which is always set by the calling BASH).
12429       if test "xUNIQ" != xBASH; then
12430         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12431 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12432       fi
12433       # Try to locate tool using the code snippet
12434       for ac_prog in uniq
12435 do
12436   # Extract the first word of "$ac_prog", so it can be a program name with args.
12437 set dummy $ac_prog; ac_word=$2
12438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12439 $as_echo_n "checking for $ac_word... " >&6; }
12440 if ${ac_cv_path_UNIQ+:} false; then :
12441   $as_echo_n "(cached) " >&6
12442 else
12443   case $UNIQ in
12444   [\\/]* | ?:[\\/]*)
12445   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12446   ;;
12447   *)
12448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12449 for as_dir in $PATH
12450 do
12451   IFS=$as_save_IFS
12452   test -z "$as_dir" && as_dir=.
12453     for ac_exec_ext in '' $ac_executable_extensions; do
12454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12455     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12457     break 2
12458   fi
12459 done
12460   done
12461 IFS=$as_save_IFS
12462 
12463   ;;
12464 esac
12465 fi
12466 UNIQ=$ac_cv_path_UNIQ
12467 if test -n "$UNIQ"; then
12468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12469 $as_echo "$UNIQ" >&6; }
12470 else
12471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12472 $as_echo "no" >&6; }
12473 fi
12474 
12475 
12476   test -n "$UNIQ" && break
12477 done
12478 
12479     else
12480       # If it succeeded, then it was overridden by the user. We will use it
12481       # for the tool.
12482 
12483       # First remove it from the list of overridden variables, so we can test
12484       # for unknown variables in the end.
12485       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12486 
12487       # Check if we try to supply an empty value
12488       if test "x$UNIQ" = x; then
12489         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12490 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12491         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12492 $as_echo_n "checking for UNIQ... " >&6; }
12493         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12494 $as_echo "disabled" >&6; }
12495       else
12496         # Check if the provided tool contains a complete path.
12497         tool_specified="$UNIQ"
12498         tool_basename="${tool_specified##*/}"
12499         if test "x$tool_basename" = "x$tool_specified"; then
12500           # A command without a complete path is provided, search $PATH.
12501           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12502 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12503           # Extract the first word of "$tool_basename", so it can be a program name with args.
12504 set dummy $tool_basename; ac_word=$2
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12506 $as_echo_n "checking for $ac_word... " >&6; }
12507 if ${ac_cv_path_UNIQ+:} false; then :
12508   $as_echo_n "(cached) " >&6
12509 else
12510   case $UNIQ in
12511   [\\/]* | ?:[\\/]*)
12512   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12513   ;;
12514   *)
12515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12516 for as_dir in $PATH
12517 do
12518   IFS=$as_save_IFS
12519   test -z "$as_dir" && as_dir=.
12520     for ac_exec_ext in '' $ac_executable_extensions; do
12521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12522     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12524     break 2
12525   fi
12526 done
12527   done
12528 IFS=$as_save_IFS
12529 
12530   ;;
12531 esac
12532 fi
12533 UNIQ=$ac_cv_path_UNIQ
12534 if test -n "$UNIQ"; then
12535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12536 $as_echo "$UNIQ" >&6; }
12537 else
12538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539 $as_echo "no" >&6; }
12540 fi
12541 
12542 
12543           if test "x$UNIQ" = x; then
12544             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12545           fi
12546         else
12547           # Otherwise we believe it is a complete path. Use it as it is.
12548           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12549 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12550           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12551 $as_echo_n "checking for UNIQ... " >&6; }
12552           if test ! -x "$tool_specified"; then
12553             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12554 $as_echo "not found" >&6; }
12555             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12556           fi
12557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12558 $as_echo "$tool_specified" >&6; }
12559         fi
12560       fi
12561     fi
12562 
12563   fi
12564 
12565 
12566 
12567   if test "x$UNIQ" = x; then
12568     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12569   fi
12570 
12571 
12572 
12573 
12574 
12575   # Publish this variable in the help.
12576 
12577 
12578   if [ -z "${WC+x}" ]; then
12579     # The variable is not set by user, try to locate tool using the code snippet
12580     for ac_prog in wc
12581 do
12582   # Extract the first word of "$ac_prog", so it can be a program name with args.
12583 set dummy $ac_prog; ac_word=$2
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12585 $as_echo_n "checking for $ac_word... " >&6; }
12586 if ${ac_cv_path_WC+:} false; then :
12587   $as_echo_n "(cached) " >&6
12588 else
12589   case $WC in
12590   [\\/]* | ?:[\\/]*)
12591   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12592   ;;
12593   *)
12594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12595 for as_dir in $PATH
12596 do
12597   IFS=$as_save_IFS
12598   test -z "$as_dir" && as_dir=.
12599     for ac_exec_ext in '' $ac_executable_extensions; do
12600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12601     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12603     break 2
12604   fi
12605 done
12606   done
12607 IFS=$as_save_IFS
12608 
12609   ;;
12610 esac
12611 fi
12612 WC=$ac_cv_path_WC
12613 if test -n "$WC"; then
12614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12615 $as_echo "$WC" >&6; }
12616 else
12617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12618 $as_echo "no" >&6; }
12619 fi
12620 
12621 
12622   test -n "$WC" && break
12623 done
12624 
12625   else
12626     # The variable is set, but is it from the command line or the environment?
12627 
12628     # Try to remove the string !WC! from our list.
12629     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12630     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12631       # If it failed, the variable was not from the command line. Ignore it,
12632       # but warn the user (except for BASH, which is always set by the calling BASH).
12633       if test "xWC" != xBASH; then
12634         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12635 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12636       fi
12637       # Try to locate tool using the code snippet
12638       for ac_prog in wc
12639 do
12640   # Extract the first word of "$ac_prog", so it can be a program name with args.
12641 set dummy $ac_prog; ac_word=$2
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12643 $as_echo_n "checking for $ac_word... " >&6; }
12644 if ${ac_cv_path_WC+:} false; then :
12645   $as_echo_n "(cached) " >&6
12646 else
12647   case $WC in
12648   [\\/]* | ?:[\\/]*)
12649   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12650   ;;
12651   *)
12652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12653 for as_dir in $PATH
12654 do
12655   IFS=$as_save_IFS
12656   test -z "$as_dir" && as_dir=.
12657     for ac_exec_ext in '' $ac_executable_extensions; do
12658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12659     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12661     break 2
12662   fi
12663 done
12664   done
12665 IFS=$as_save_IFS
12666 
12667   ;;
12668 esac
12669 fi
12670 WC=$ac_cv_path_WC
12671 if test -n "$WC"; then
12672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12673 $as_echo "$WC" >&6; }
12674 else
12675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12676 $as_echo "no" >&6; }
12677 fi
12678 
12679 
12680   test -n "$WC" && break
12681 done
12682 
12683     else
12684       # If it succeeded, then it was overridden by the user. We will use it
12685       # for the tool.
12686 
12687       # First remove it from the list of overridden variables, so we can test
12688       # for unknown variables in the end.
12689       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12690 
12691       # Check if we try to supply an empty value
12692       if test "x$WC" = x; then
12693         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12694 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12695         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12696 $as_echo_n "checking for WC... " >&6; }
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12698 $as_echo "disabled" >&6; }
12699       else
12700         # Check if the provided tool contains a complete path.
12701         tool_specified="$WC"
12702         tool_basename="${tool_specified##*/}"
12703         if test "x$tool_basename" = "x$tool_specified"; then
12704           # A command without a complete path is provided, search $PATH.
12705           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12706 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12707           # Extract the first word of "$tool_basename", so it can be a program name with args.
12708 set dummy $tool_basename; ac_word=$2
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12710 $as_echo_n "checking for $ac_word... " >&6; }
12711 if ${ac_cv_path_WC+:} false; then :
12712   $as_echo_n "(cached) " >&6
12713 else
12714   case $WC in
12715   [\\/]* | ?:[\\/]*)
12716   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12717   ;;
12718   *)
12719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12720 for as_dir in $PATH
12721 do
12722   IFS=$as_save_IFS
12723   test -z "$as_dir" && as_dir=.
12724     for ac_exec_ext in '' $ac_executable_extensions; do
12725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12726     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12728     break 2
12729   fi
12730 done
12731   done
12732 IFS=$as_save_IFS
12733 
12734   ;;
12735 esac
12736 fi
12737 WC=$ac_cv_path_WC
12738 if test -n "$WC"; then
12739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12740 $as_echo "$WC" >&6; }
12741 else
12742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12743 $as_echo "no" >&6; }
12744 fi
12745 
12746 
12747           if test "x$WC" = x; then
12748             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12749           fi
12750         else
12751           # Otherwise we believe it is a complete path. Use it as it is.
12752           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12753 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12754           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12755 $as_echo_n "checking for WC... " >&6; }
12756           if test ! -x "$tool_specified"; then
12757             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12758 $as_echo "not found" >&6; }
12759             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12760           fi
12761           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12762 $as_echo "$tool_specified" >&6; }
12763         fi
12764       fi
12765     fi
12766 
12767   fi
12768 
12769 
12770 
12771   if test "x$WC" = x; then
12772     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12773   fi
12774 
12775 
12776 
12777 
12778 
12779   # Publish this variable in the help.
12780 
12781 
12782   if [ -z "${WHICH+x}" ]; then
12783     # The variable is not set by user, try to locate tool using the code snippet
12784     for ac_prog in which
12785 do
12786   # Extract the first word of "$ac_prog", so it can be a program name with args.
12787 set dummy $ac_prog; ac_word=$2
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12789 $as_echo_n "checking for $ac_word... " >&6; }
12790 if ${ac_cv_path_WHICH+:} false; then :
12791   $as_echo_n "(cached) " >&6
12792 else
12793   case $WHICH in
12794   [\\/]* | ?:[\\/]*)
12795   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12796   ;;
12797   *)
12798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12799 for as_dir in $PATH
12800 do
12801   IFS=$as_save_IFS
12802   test -z "$as_dir" && as_dir=.
12803     for ac_exec_ext in '' $ac_executable_extensions; do
12804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12805     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12807     break 2
12808   fi
12809 done
12810   done
12811 IFS=$as_save_IFS
12812 
12813   ;;
12814 esac
12815 fi
12816 WHICH=$ac_cv_path_WHICH
12817 if test -n "$WHICH"; then
12818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12819 $as_echo "$WHICH" >&6; }
12820 else
12821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12822 $as_echo "no" >&6; }
12823 fi
12824 
12825 
12826   test -n "$WHICH" && break
12827 done
12828 
12829   else
12830     # The variable is set, but is it from the command line or the environment?
12831 
12832     # Try to remove the string !WHICH! from our list.
12833     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12834     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12835       # If it failed, the variable was not from the command line. Ignore it,
12836       # but warn the user (except for BASH, which is always set by the calling BASH).
12837       if test "xWHICH" != xBASH; then
12838         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12839 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12840       fi
12841       # Try to locate tool using the code snippet
12842       for ac_prog in which
12843 do
12844   # Extract the first word of "$ac_prog", so it can be a program name with args.
12845 set dummy $ac_prog; ac_word=$2
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12847 $as_echo_n "checking for $ac_word... " >&6; }
12848 if ${ac_cv_path_WHICH+:} false; then :
12849   $as_echo_n "(cached) " >&6
12850 else
12851   case $WHICH in
12852   [\\/]* | ?:[\\/]*)
12853   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12854   ;;
12855   *)
12856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12857 for as_dir in $PATH
12858 do
12859   IFS=$as_save_IFS
12860   test -z "$as_dir" && as_dir=.
12861     for ac_exec_ext in '' $ac_executable_extensions; do
12862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12863     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12865     break 2
12866   fi
12867 done
12868   done
12869 IFS=$as_save_IFS
12870 
12871   ;;
12872 esac
12873 fi
12874 WHICH=$ac_cv_path_WHICH
12875 if test -n "$WHICH"; then
12876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12877 $as_echo "$WHICH" >&6; }
12878 else
12879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12880 $as_echo "no" >&6; }
12881 fi
12882 
12883 
12884   test -n "$WHICH" && break
12885 done
12886 
12887     else
12888       # If it succeeded, then it was overridden by the user. We will use it
12889       # for the tool.
12890 
12891       # First remove it from the list of overridden variables, so we can test
12892       # for unknown variables in the end.
12893       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12894 
12895       # Check if we try to supply an empty value
12896       if test "x$WHICH" = x; then
12897         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12898 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12900 $as_echo_n "checking for WHICH... " >&6; }
12901         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12902 $as_echo "disabled" >&6; }
12903       else
12904         # Check if the provided tool contains a complete path.
12905         tool_specified="$WHICH"
12906         tool_basename="${tool_specified##*/}"
12907         if test "x$tool_basename" = "x$tool_specified"; then
12908           # A command without a complete path is provided, search $PATH.
12909           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12910 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12911           # Extract the first word of "$tool_basename", so it can be a program name with args.
12912 set dummy $tool_basename; ac_word=$2
12913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12914 $as_echo_n "checking for $ac_word... " >&6; }
12915 if ${ac_cv_path_WHICH+:} false; then :
12916   $as_echo_n "(cached) " >&6
12917 else
12918   case $WHICH in
12919   [\\/]* | ?:[\\/]*)
12920   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12921   ;;
12922   *)
12923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12924 for as_dir in $PATH
12925 do
12926   IFS=$as_save_IFS
12927   test -z "$as_dir" && as_dir=.
12928     for ac_exec_ext in '' $ac_executable_extensions; do
12929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12930     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12932     break 2
12933   fi
12934 done
12935   done
12936 IFS=$as_save_IFS
12937 
12938   ;;
12939 esac
12940 fi
12941 WHICH=$ac_cv_path_WHICH
12942 if test -n "$WHICH"; then
12943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12944 $as_echo "$WHICH" >&6; }
12945 else
12946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12947 $as_echo "no" >&6; }
12948 fi
12949 
12950 
12951           if test "x$WHICH" = x; then
12952             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12953           fi
12954         else
12955           # Otherwise we believe it is a complete path. Use it as it is.
12956           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12957 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12958           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12959 $as_echo_n "checking for WHICH... " >&6; }
12960           if test ! -x "$tool_specified"; then
12961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12962 $as_echo "not found" >&6; }
12963             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12964           fi
12965           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12966 $as_echo "$tool_specified" >&6; }
12967         fi
12968       fi
12969     fi
12970 
12971   fi
12972 
12973 
12974 
12975   if test "x$WHICH" = x; then
12976     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12977   fi
12978 
12979 
12980 
12981 
12982 
12983   # Publish this variable in the help.
12984 
12985 
12986   if [ -z "${XARGS+x}" ]; then
12987     # The variable is not set by user, try to locate tool using the code snippet
12988     for ac_prog in xargs
12989 do
12990   # Extract the first word of "$ac_prog", so it can be a program name with args.
12991 set dummy $ac_prog; ac_word=$2
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12993 $as_echo_n "checking for $ac_word... " >&6; }
12994 if ${ac_cv_path_XARGS+:} false; then :
12995   $as_echo_n "(cached) " >&6
12996 else
12997   case $XARGS in
12998   [\\/]* | ?:[\\/]*)
12999   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13000   ;;
13001   *)
13002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13003 for as_dir in $PATH
13004 do
13005   IFS=$as_save_IFS
13006   test -z "$as_dir" && as_dir=.
13007     for ac_exec_ext in '' $ac_executable_extensions; do
13008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13009     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13011     break 2
13012   fi
13013 done
13014   done
13015 IFS=$as_save_IFS
13016 
13017   ;;
13018 esac
13019 fi
13020 XARGS=$ac_cv_path_XARGS
13021 if test -n "$XARGS"; then
13022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13023 $as_echo "$XARGS" >&6; }
13024 else
13025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13026 $as_echo "no" >&6; }
13027 fi
13028 
13029 
13030   test -n "$XARGS" && break
13031 done
13032 
13033   else
13034     # The variable is set, but is it from the command line or the environment?
13035 
13036     # Try to remove the string !XARGS! from our list.
13037     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13038     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13039       # If it failed, the variable was not from the command line. Ignore it,
13040       # but warn the user (except for BASH, which is always set by the calling BASH).
13041       if test "xXARGS" != xBASH; then
13042         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13043 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13044       fi
13045       # Try to locate tool using the code snippet
13046       for ac_prog in xargs
13047 do
13048   # Extract the first word of "$ac_prog", so it can be a program name with args.
13049 set dummy $ac_prog; ac_word=$2
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13051 $as_echo_n "checking for $ac_word... " >&6; }
13052 if ${ac_cv_path_XARGS+:} false; then :
13053   $as_echo_n "(cached) " >&6
13054 else
13055   case $XARGS in
13056   [\\/]* | ?:[\\/]*)
13057   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13058   ;;
13059   *)
13060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13061 for as_dir in $PATH
13062 do
13063   IFS=$as_save_IFS
13064   test -z "$as_dir" && as_dir=.
13065     for ac_exec_ext in '' $ac_executable_extensions; do
13066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13067     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13069     break 2
13070   fi
13071 done
13072   done
13073 IFS=$as_save_IFS
13074 
13075   ;;
13076 esac
13077 fi
13078 XARGS=$ac_cv_path_XARGS
13079 if test -n "$XARGS"; then
13080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13081 $as_echo "$XARGS" >&6; }
13082 else
13083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13084 $as_echo "no" >&6; }
13085 fi
13086 
13087 
13088   test -n "$XARGS" && break
13089 done
13090 
13091     else
13092       # If it succeeded, then it was overridden by the user. We will use it
13093       # for the tool.
13094 
13095       # First remove it from the list of overridden variables, so we can test
13096       # for unknown variables in the end.
13097       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13098 
13099       # Check if we try to supply an empty value
13100       if test "x$XARGS" = x; then
13101         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13102 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13103         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13104 $as_echo_n "checking for XARGS... " >&6; }
13105         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13106 $as_echo "disabled" >&6; }
13107       else
13108         # Check if the provided tool contains a complete path.
13109         tool_specified="$XARGS"
13110         tool_basename="${tool_specified##*/}"
13111         if test "x$tool_basename" = "x$tool_specified"; then
13112           # A command without a complete path is provided, search $PATH.
13113           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13114 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13115           # Extract the first word of "$tool_basename", so it can be a program name with args.
13116 set dummy $tool_basename; ac_word=$2
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13118 $as_echo_n "checking for $ac_word... " >&6; }
13119 if ${ac_cv_path_XARGS+:} false; then :
13120   $as_echo_n "(cached) " >&6
13121 else
13122   case $XARGS in
13123   [\\/]* | ?:[\\/]*)
13124   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13125   ;;
13126   *)
13127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13128 for as_dir in $PATH
13129 do
13130   IFS=$as_save_IFS
13131   test -z "$as_dir" && as_dir=.
13132     for ac_exec_ext in '' $ac_executable_extensions; do
13133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13134     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13136     break 2
13137   fi
13138 done
13139   done
13140 IFS=$as_save_IFS
13141 
13142   ;;
13143 esac
13144 fi
13145 XARGS=$ac_cv_path_XARGS
13146 if test -n "$XARGS"; then
13147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13148 $as_echo "$XARGS" >&6; }
13149 else
13150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13151 $as_echo "no" >&6; }
13152 fi
13153 
13154 
13155           if test "x$XARGS" = x; then
13156             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13157           fi
13158         else
13159           # Otherwise we believe it is a complete path. Use it as it is.
13160           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13161 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13162           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13163 $as_echo_n "checking for XARGS... " >&6; }
13164           if test ! -x "$tool_specified"; then
13165             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13166 $as_echo "not found" >&6; }
13167             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13168           fi
13169           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13170 $as_echo "$tool_specified" >&6; }
13171         fi
13172       fi
13173     fi
13174 
13175   fi
13176 
13177 
13178 
13179   if test "x$XARGS" = x; then
13180     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13181   fi
13182 
13183 
13184 
13185   # Then required tools that require some special treatment.
13186 
13187 
13188   # Publish this variable in the help.
13189 
13190 
13191   if [ -z "${AWK+x}" ]; then
13192     # The variable is not set by user, try to locate tool using the code snippet
13193     for ac_prog in gawk mawk nawk awk
13194 do
13195   # Extract the first word of "$ac_prog", so it can be a program name with args.
13196 set dummy $ac_prog; ac_word=$2
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13198 $as_echo_n "checking for $ac_word... " >&6; }
13199 if ${ac_cv_prog_AWK+:} false; then :
13200   $as_echo_n "(cached) " >&6
13201 else
13202   if test -n "$AWK"; then
13203   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13204 else
13205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13206 for as_dir in $PATH
13207 do
13208   IFS=$as_save_IFS
13209   test -z "$as_dir" && as_dir=.
13210     for ac_exec_ext in '' $ac_executable_extensions; do
13211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13212     ac_cv_prog_AWK="$ac_prog"
13213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13214     break 2
13215   fi
13216 done
13217   done
13218 IFS=$as_save_IFS
13219 
13220 fi
13221 fi
13222 AWK=$ac_cv_prog_AWK
13223 if test -n "$AWK"; then
13224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13225 $as_echo "$AWK" >&6; }
13226 else
13227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228 $as_echo "no" >&6; }
13229 fi
13230 
13231 
13232   test -n "$AWK" && break
13233 done
13234 
13235   else
13236     # The variable is set, but is it from the command line or the environment?
13237 
13238     # Try to remove the string !AWK! from our list.
13239     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13240     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13241       # If it failed, the variable was not from the command line. Ignore it,
13242       # but warn the user (except for BASH, which is always set by the calling BASH).
13243       if test "xAWK" != xBASH; then
13244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13245 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13246       fi
13247       # Try to locate tool using the code snippet
13248       for ac_prog in gawk mawk nawk awk
13249 do
13250   # Extract the first word of "$ac_prog", so it can be a program name with args.
13251 set dummy $ac_prog; ac_word=$2
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253 $as_echo_n "checking for $ac_word... " >&6; }
13254 if ${ac_cv_prog_AWK+:} false; then :
13255   $as_echo_n "(cached) " >&6
13256 else
13257   if test -n "$AWK"; then
13258   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13259 else
13260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13261 for as_dir in $PATH
13262 do
13263   IFS=$as_save_IFS
13264   test -z "$as_dir" && as_dir=.
13265     for ac_exec_ext in '' $ac_executable_extensions; do
13266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13267     ac_cv_prog_AWK="$ac_prog"
13268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13269     break 2
13270   fi
13271 done
13272   done
13273 IFS=$as_save_IFS
13274 
13275 fi
13276 fi
13277 AWK=$ac_cv_prog_AWK
13278 if test -n "$AWK"; then
13279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13280 $as_echo "$AWK" >&6; }
13281 else
13282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13283 $as_echo "no" >&6; }
13284 fi
13285 
13286 
13287   test -n "$AWK" && break
13288 done
13289 
13290     else
13291       # If it succeeded, then it was overridden by the user. We will use it
13292       # for the tool.
13293 
13294       # First remove it from the list of overridden variables, so we can test
13295       # for unknown variables in the end.
13296       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13297 
13298       # Check if we try to supply an empty value
13299       if test "x$AWK" = x; then
13300         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13301 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13302         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13303 $as_echo_n "checking for AWK... " >&6; }
13304         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13305 $as_echo "disabled" >&6; }
13306       else
13307         # Check if the provided tool contains a complete path.
13308         tool_specified="$AWK"
13309         tool_basename="${tool_specified##*/}"
13310         if test "x$tool_basename" = "x$tool_specified"; then
13311           # A command without a complete path is provided, search $PATH.
13312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13313 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13314           # Extract the first word of "$tool_basename", so it can be a program name with args.
13315 set dummy $tool_basename; ac_word=$2
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13317 $as_echo_n "checking for $ac_word... " >&6; }
13318 if ${ac_cv_path_AWK+:} false; then :
13319   $as_echo_n "(cached) " >&6
13320 else
13321   case $AWK in
13322   [\\/]* | ?:[\\/]*)
13323   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13324   ;;
13325   *)
13326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13327 for as_dir in $PATH
13328 do
13329   IFS=$as_save_IFS
13330   test -z "$as_dir" && as_dir=.
13331     for ac_exec_ext in '' $ac_executable_extensions; do
13332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13333     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13335     break 2
13336   fi
13337 done
13338   done
13339 IFS=$as_save_IFS
13340 
13341   ;;
13342 esac
13343 fi
13344 AWK=$ac_cv_path_AWK
13345 if test -n "$AWK"; then
13346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13347 $as_echo "$AWK" >&6; }
13348 else
13349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13350 $as_echo "no" >&6; }
13351 fi
13352 
13353 
13354           if test "x$AWK" = x; then
13355             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13356           fi
13357         else
13358           # Otherwise we believe it is a complete path. Use it as it is.
13359           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13360 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13361           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13362 $as_echo_n "checking for AWK... " >&6; }
13363           if test ! -x "$tool_specified"; then
13364             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13365 $as_echo "not found" >&6; }
13366             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13367           fi
13368           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13369 $as_echo "$tool_specified" >&6; }
13370         fi
13371       fi
13372     fi
13373 
13374   fi
13375 
13376 
13377   if test "x$AWK" = x; then
13378     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13379   fi
13380 
13381 
13382 
13383 
13384   # Publish this variable in the help.
13385 
13386 
13387   if [ -z "${GREP+x}" ]; then
13388     # The variable is not set by user, try to locate tool using the code snippet
13389     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13390 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13391 if ${ac_cv_path_GREP+:} false; then :
13392   $as_echo_n "(cached) " >&6
13393 else
13394   if test -z "$GREP"; then
13395   ac_path_GREP_found=false
13396   # Loop through the user's path and test for each of PROGNAME-LIST
13397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13398 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13399 do
13400   IFS=$as_save_IFS
13401   test -z "$as_dir" && as_dir=.
13402     for ac_prog in grep ggrep; do
13403     for ac_exec_ext in '' $ac_executable_extensions; do
13404       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13405       as_fn_executable_p "$ac_path_GREP" || continue
13406 # Check for GNU ac_path_GREP and select it if it is found.
13407   # Check for GNU $ac_path_GREP
13408 case `"$ac_path_GREP" --version 2>&1` in
13409 *GNU*)
13410   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13411 *)
13412   ac_count=0
13413   $as_echo_n 0123456789 >"conftest.in"
13414   while :
13415   do
13416     cat "conftest.in" "conftest.in" >"conftest.tmp"
13417     mv "conftest.tmp" "conftest.in"
13418     cp "conftest.in" "conftest.nl"
13419     $as_echo 'GREP' >> "conftest.nl"
13420     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13421     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13422     as_fn_arith $ac_count + 1 && ac_count=$as_val
13423     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13424       # Best one so far, save it but keep looking for a better one
13425       ac_cv_path_GREP="$ac_path_GREP"
13426       ac_path_GREP_max=$ac_count
13427     fi
13428     # 10*(2^10) chars as input seems more than enough
13429     test $ac_count -gt 10 && break
13430   done
13431   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13432 esac
13433 
13434       $ac_path_GREP_found && break 3
13435     done
13436   done
13437   done
13438 IFS=$as_save_IFS
13439   if test -z "$ac_cv_path_GREP"; then
13440     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13441   fi
13442 else
13443   ac_cv_path_GREP=$GREP
13444 fi
13445 
13446 fi
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13448 $as_echo "$ac_cv_path_GREP" >&6; }
13449  GREP="$ac_cv_path_GREP"
13450 
13451 
13452   else
13453     # The variable is set, but is it from the command line or the environment?
13454 
13455     # Try to remove the string !GREP! from our list.
13456     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13457     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13458       # If it failed, the variable was not from the command line. Ignore it,
13459       # but warn the user (except for BASH, which is always set by the calling BASH).
13460       if test "xGREP" != xBASH; then
13461         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13462 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13463       fi
13464       # Try to locate tool using the code snippet
13465       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13466 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13467 if ${ac_cv_path_GREP+:} false; then :
13468   $as_echo_n "(cached) " >&6
13469 else
13470   if test -z "$GREP"; then
13471   ac_path_GREP_found=false
13472   # Loop through the user's path and test for each of PROGNAME-LIST
13473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13474 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13475 do
13476   IFS=$as_save_IFS
13477   test -z "$as_dir" && as_dir=.
13478     for ac_prog in grep ggrep; do
13479     for ac_exec_ext in '' $ac_executable_extensions; do
13480       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13481       as_fn_executable_p "$ac_path_GREP" || continue
13482 # Check for GNU ac_path_GREP and select it if it is found.
13483   # Check for GNU $ac_path_GREP
13484 case `"$ac_path_GREP" --version 2>&1` in
13485 *GNU*)
13486   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13487 *)
13488   ac_count=0
13489   $as_echo_n 0123456789 >"conftest.in"
13490   while :
13491   do
13492     cat "conftest.in" "conftest.in" >"conftest.tmp"
13493     mv "conftest.tmp" "conftest.in"
13494     cp "conftest.in" "conftest.nl"
13495     $as_echo 'GREP' >> "conftest.nl"
13496     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13497     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13498     as_fn_arith $ac_count + 1 && ac_count=$as_val
13499     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13500       # Best one so far, save it but keep looking for a better one
13501       ac_cv_path_GREP="$ac_path_GREP"
13502       ac_path_GREP_max=$ac_count
13503     fi
13504     # 10*(2^10) chars as input seems more than enough
13505     test $ac_count -gt 10 && break
13506   done
13507   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13508 esac
13509 
13510       $ac_path_GREP_found && break 3
13511     done
13512   done
13513   done
13514 IFS=$as_save_IFS
13515   if test -z "$ac_cv_path_GREP"; then
13516     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13517   fi
13518 else
13519   ac_cv_path_GREP=$GREP
13520 fi
13521 
13522 fi
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13524 $as_echo "$ac_cv_path_GREP" >&6; }
13525  GREP="$ac_cv_path_GREP"
13526 
13527 
13528     else
13529       # If it succeeded, then it was overridden by the user. We will use it
13530       # for the tool.
13531 
13532       # First remove it from the list of overridden variables, so we can test
13533       # for unknown variables in the end.
13534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13535 
13536       # Check if we try to supply an empty value
13537       if test "x$GREP" = x; then
13538         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13539 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13540         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13541 $as_echo_n "checking for GREP... " >&6; }
13542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13543 $as_echo "disabled" >&6; }
13544       else
13545         # Check if the provided tool contains a complete path.
13546         tool_specified="$GREP"
13547         tool_basename="${tool_specified##*/}"
13548         if test "x$tool_basename" = "x$tool_specified"; then
13549           # A command without a complete path is provided, search $PATH.
13550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13551 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13552           # Extract the first word of "$tool_basename", so it can be a program name with args.
13553 set dummy $tool_basename; ac_word=$2
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13555 $as_echo_n "checking for $ac_word... " >&6; }
13556 if ${ac_cv_path_GREP+:} false; then :
13557   $as_echo_n "(cached) " >&6
13558 else
13559   case $GREP in
13560   [\\/]* | ?:[\\/]*)
13561   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13562   ;;
13563   *)
13564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565 for as_dir in $PATH
13566 do
13567   IFS=$as_save_IFS
13568   test -z "$as_dir" && as_dir=.
13569     for ac_exec_ext in '' $ac_executable_extensions; do
13570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13571     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13573     break 2
13574   fi
13575 done
13576   done
13577 IFS=$as_save_IFS
13578 
13579   ;;
13580 esac
13581 fi
13582 GREP=$ac_cv_path_GREP
13583 if test -n "$GREP"; then
13584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13585 $as_echo "$GREP" >&6; }
13586 else
13587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13588 $as_echo "no" >&6; }
13589 fi
13590 
13591 
13592           if test "x$GREP" = x; then
13593             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13594           fi
13595         else
13596           # Otherwise we believe it is a complete path. Use it as it is.
13597           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13598 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13599           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13600 $as_echo_n "checking for GREP... " >&6; }
13601           if test ! -x "$tool_specified"; then
13602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13603 $as_echo "not found" >&6; }
13604             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13605           fi
13606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13607 $as_echo "$tool_specified" >&6; }
13608         fi
13609       fi
13610     fi
13611 
13612   fi
13613 
13614 
13615   if test "x$GREP" = x; then
13616     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13617   fi
13618 
13619 
13620 
13621 
13622   # Publish this variable in the help.
13623 
13624 
13625   if [ -z "${EGREP+x}" ]; then
13626     # The variable is not set by user, try to locate tool using the code snippet
13627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13628 $as_echo_n "checking for egrep... " >&6; }
13629 if ${ac_cv_path_EGREP+:} false; then :
13630   $as_echo_n "(cached) " >&6
13631 else
13632   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13633    then ac_cv_path_EGREP="$GREP -E"
13634    else
13635      if test -z "$EGREP"; then
13636   ac_path_EGREP_found=false
13637   # Loop through the user's path and test for each of PROGNAME-LIST
13638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13639 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13640 do
13641   IFS=$as_save_IFS
13642   test -z "$as_dir" && as_dir=.
13643     for ac_prog in egrep; do
13644     for ac_exec_ext in '' $ac_executable_extensions; do
13645       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13646       as_fn_executable_p "$ac_path_EGREP" || continue
13647 # Check for GNU ac_path_EGREP and select it if it is found.
13648   # Check for GNU $ac_path_EGREP
13649 case `"$ac_path_EGREP" --version 2>&1` in
13650 *GNU*)
13651   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13652 *)
13653   ac_count=0
13654   $as_echo_n 0123456789 >"conftest.in"
13655   while :
13656   do
13657     cat "conftest.in" "conftest.in" >"conftest.tmp"
13658     mv "conftest.tmp" "conftest.in"
13659     cp "conftest.in" "conftest.nl"
13660     $as_echo 'EGREP' >> "conftest.nl"
13661     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13662     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13663     as_fn_arith $ac_count + 1 && ac_count=$as_val
13664     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13665       # Best one so far, save it but keep looking for a better one
13666       ac_cv_path_EGREP="$ac_path_EGREP"
13667       ac_path_EGREP_max=$ac_count
13668     fi
13669     # 10*(2^10) chars as input seems more than enough
13670     test $ac_count -gt 10 && break
13671   done
13672   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13673 esac
13674 
13675       $ac_path_EGREP_found && break 3
13676     done
13677   done
13678   done
13679 IFS=$as_save_IFS
13680   if test -z "$ac_cv_path_EGREP"; then
13681     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13682   fi
13683 else
13684   ac_cv_path_EGREP=$EGREP
13685 fi
13686 
13687    fi
13688 fi
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13690 $as_echo "$ac_cv_path_EGREP" >&6; }
13691  EGREP="$ac_cv_path_EGREP"
13692 
13693 
13694   else
13695     # The variable is set, but is it from the command line or the environment?
13696 
13697     # Try to remove the string !EGREP! from our list.
13698     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13699     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13700       # If it failed, the variable was not from the command line. Ignore it,
13701       # but warn the user (except for BASH, which is always set by the calling BASH).
13702       if test "xEGREP" != xBASH; then
13703         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13704 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13705       fi
13706       # Try to locate tool using the code snippet
13707       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13708 $as_echo_n "checking for egrep... " >&6; }
13709 if ${ac_cv_path_EGREP+:} false; then :
13710   $as_echo_n "(cached) " >&6
13711 else
13712   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13713    then ac_cv_path_EGREP="$GREP -E"
13714    else
13715      if test -z "$EGREP"; then
13716   ac_path_EGREP_found=false
13717   # Loop through the user's path and test for each of PROGNAME-LIST
13718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13719 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13720 do
13721   IFS=$as_save_IFS
13722   test -z "$as_dir" && as_dir=.
13723     for ac_prog in egrep; do
13724     for ac_exec_ext in '' $ac_executable_extensions; do
13725       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13726       as_fn_executable_p "$ac_path_EGREP" || continue
13727 # Check for GNU ac_path_EGREP and select it if it is found.
13728   # Check for GNU $ac_path_EGREP
13729 case `"$ac_path_EGREP" --version 2>&1` in
13730 *GNU*)
13731   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13732 *)
13733   ac_count=0
13734   $as_echo_n 0123456789 >"conftest.in"
13735   while :
13736   do
13737     cat "conftest.in" "conftest.in" >"conftest.tmp"
13738     mv "conftest.tmp" "conftest.in"
13739     cp "conftest.in" "conftest.nl"
13740     $as_echo 'EGREP' >> "conftest.nl"
13741     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13742     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13743     as_fn_arith $ac_count + 1 && ac_count=$as_val
13744     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13745       # Best one so far, save it but keep looking for a better one
13746       ac_cv_path_EGREP="$ac_path_EGREP"
13747       ac_path_EGREP_max=$ac_count
13748     fi
13749     # 10*(2^10) chars as input seems more than enough
13750     test $ac_count -gt 10 && break
13751   done
13752   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13753 esac
13754 
13755       $ac_path_EGREP_found && break 3
13756     done
13757   done
13758   done
13759 IFS=$as_save_IFS
13760   if test -z "$ac_cv_path_EGREP"; then
13761     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13762   fi
13763 else
13764   ac_cv_path_EGREP=$EGREP
13765 fi
13766 
13767    fi
13768 fi
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13770 $as_echo "$ac_cv_path_EGREP" >&6; }
13771  EGREP="$ac_cv_path_EGREP"
13772 
13773 
13774     else
13775       # If it succeeded, then it was overridden by the user. We will use it
13776       # for the tool.
13777 
13778       # First remove it from the list of overridden variables, so we can test
13779       # for unknown variables in the end.
13780       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13781 
13782       # Check if we try to supply an empty value
13783       if test "x$EGREP" = x; then
13784         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13785 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13786         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13787 $as_echo_n "checking for EGREP... " >&6; }
13788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13789 $as_echo "disabled" >&6; }
13790       else
13791         # Check if the provided tool contains a complete path.
13792         tool_specified="$EGREP"
13793         tool_basename="${tool_specified##*/}"
13794         if test "x$tool_basename" = "x$tool_specified"; then
13795           # A command without a complete path is provided, search $PATH.
13796           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13797 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13798           # Extract the first word of "$tool_basename", so it can be a program name with args.
13799 set dummy $tool_basename; ac_word=$2
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13801 $as_echo_n "checking for $ac_word... " >&6; }
13802 if ${ac_cv_path_EGREP+:} false; then :
13803   $as_echo_n "(cached) " >&6
13804 else
13805   case $EGREP in
13806   [\\/]* | ?:[\\/]*)
13807   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13808   ;;
13809   *)
13810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811 for as_dir in $PATH
13812 do
13813   IFS=$as_save_IFS
13814   test -z "$as_dir" && as_dir=.
13815     for ac_exec_ext in '' $ac_executable_extensions; do
13816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13817     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13819     break 2
13820   fi
13821 done
13822   done
13823 IFS=$as_save_IFS
13824 
13825   ;;
13826 esac
13827 fi
13828 EGREP=$ac_cv_path_EGREP
13829 if test -n "$EGREP"; then
13830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13831 $as_echo "$EGREP" >&6; }
13832 else
13833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13834 $as_echo "no" >&6; }
13835 fi
13836 
13837 
13838           if test "x$EGREP" = x; then
13839             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13840           fi
13841         else
13842           # Otherwise we believe it is a complete path. Use it as it is.
13843           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13844 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13845           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13846 $as_echo_n "checking for EGREP... " >&6; }
13847           if test ! -x "$tool_specified"; then
13848             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13849 $as_echo "not found" >&6; }
13850             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13851           fi
13852           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13853 $as_echo "$tool_specified" >&6; }
13854         fi
13855       fi
13856     fi
13857 
13858   fi
13859 
13860 
13861   if test "x$EGREP" = x; then
13862     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13863   fi
13864 
13865 
13866 
13867 
13868   # Publish this variable in the help.
13869 
13870 
13871   if [ -z "${FGREP+x}" ]; then
13872     # The variable is not set by user, try to locate tool using the code snippet
13873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13874 $as_echo_n "checking for fgrep... " >&6; }
13875 if ${ac_cv_path_FGREP+:} false; then :
13876   $as_echo_n "(cached) " >&6
13877 else
13878   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13879    then ac_cv_path_FGREP="$GREP -F"
13880    else
13881      if test -z "$FGREP"; then
13882   ac_path_FGREP_found=false
13883   # Loop through the user's path and test for each of PROGNAME-LIST
13884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13885 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13886 do
13887   IFS=$as_save_IFS
13888   test -z "$as_dir" && as_dir=.
13889     for ac_prog in fgrep; do
13890     for ac_exec_ext in '' $ac_executable_extensions; do
13891       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13892       as_fn_executable_p "$ac_path_FGREP" || continue
13893 # Check for GNU ac_path_FGREP and select it if it is found.
13894   # Check for GNU $ac_path_FGREP
13895 case `"$ac_path_FGREP" --version 2>&1` in
13896 *GNU*)
13897   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13898 *)
13899   ac_count=0
13900   $as_echo_n 0123456789 >"conftest.in"
13901   while :
13902   do
13903     cat "conftest.in" "conftest.in" >"conftest.tmp"
13904     mv "conftest.tmp" "conftest.in"
13905     cp "conftest.in" "conftest.nl"
13906     $as_echo 'FGREP' >> "conftest.nl"
13907     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13908     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13909     as_fn_arith $ac_count + 1 && ac_count=$as_val
13910     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13911       # Best one so far, save it but keep looking for a better one
13912       ac_cv_path_FGREP="$ac_path_FGREP"
13913       ac_path_FGREP_max=$ac_count
13914     fi
13915     # 10*(2^10) chars as input seems more than enough
13916     test $ac_count -gt 10 && break
13917   done
13918   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13919 esac
13920 
13921       $ac_path_FGREP_found && break 3
13922     done
13923   done
13924   done
13925 IFS=$as_save_IFS
13926   if test -z "$ac_cv_path_FGREP"; then
13927     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13928   fi
13929 else
13930   ac_cv_path_FGREP=$FGREP
13931 fi
13932 
13933    fi
13934 fi
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13936 $as_echo "$ac_cv_path_FGREP" >&6; }
13937  FGREP="$ac_cv_path_FGREP"
13938 
13939 
13940   else
13941     # The variable is set, but is it from the command line or the environment?
13942 
13943     # Try to remove the string !FGREP! from our list.
13944     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13945     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13946       # If it failed, the variable was not from the command line. Ignore it,
13947       # but warn the user (except for BASH, which is always set by the calling BASH).
13948       if test "xFGREP" != xBASH; then
13949         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13950 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13951       fi
13952       # Try to locate tool using the code snippet
13953       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13954 $as_echo_n "checking for fgrep... " >&6; }
13955 if ${ac_cv_path_FGREP+:} false; then :
13956   $as_echo_n "(cached) " >&6
13957 else
13958   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13959    then ac_cv_path_FGREP="$GREP -F"
13960    else
13961      if test -z "$FGREP"; then
13962   ac_path_FGREP_found=false
13963   # Loop through the user's path and test for each of PROGNAME-LIST
13964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13965 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13966 do
13967   IFS=$as_save_IFS
13968   test -z "$as_dir" && as_dir=.
13969     for ac_prog in fgrep; do
13970     for ac_exec_ext in '' $ac_executable_extensions; do
13971       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13972       as_fn_executable_p "$ac_path_FGREP" || continue
13973 # Check for GNU ac_path_FGREP and select it if it is found.
13974   # Check for GNU $ac_path_FGREP
13975 case `"$ac_path_FGREP" --version 2>&1` in
13976 *GNU*)
13977   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13978 *)
13979   ac_count=0
13980   $as_echo_n 0123456789 >"conftest.in"
13981   while :
13982   do
13983     cat "conftest.in" "conftest.in" >"conftest.tmp"
13984     mv "conftest.tmp" "conftest.in"
13985     cp "conftest.in" "conftest.nl"
13986     $as_echo 'FGREP' >> "conftest.nl"
13987     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13988     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13989     as_fn_arith $ac_count + 1 && ac_count=$as_val
13990     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13991       # Best one so far, save it but keep looking for a better one
13992       ac_cv_path_FGREP="$ac_path_FGREP"
13993       ac_path_FGREP_max=$ac_count
13994     fi
13995     # 10*(2^10) chars as input seems more than enough
13996     test $ac_count -gt 10 && break
13997   done
13998   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13999 esac
14000 
14001       $ac_path_FGREP_found && break 3
14002     done
14003   done
14004   done
14005 IFS=$as_save_IFS
14006   if test -z "$ac_cv_path_FGREP"; then
14007     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14008   fi
14009 else
14010   ac_cv_path_FGREP=$FGREP
14011 fi
14012 
14013    fi
14014 fi
14015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14016 $as_echo "$ac_cv_path_FGREP" >&6; }
14017  FGREP="$ac_cv_path_FGREP"
14018 
14019 
14020     else
14021       # If it succeeded, then it was overridden by the user. We will use it
14022       # for the tool.
14023 
14024       # First remove it from the list of overridden variables, so we can test
14025       # for unknown variables in the end.
14026       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14027 
14028       # Check if we try to supply an empty value
14029       if test "x$FGREP" = x; then
14030         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14031 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14032         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14033 $as_echo_n "checking for FGREP... " >&6; }
14034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14035 $as_echo "disabled" >&6; }
14036       else
14037         # Check if the provided tool contains a complete path.
14038         tool_specified="$FGREP"
14039         tool_basename="${tool_specified##*/}"
14040         if test "x$tool_basename" = "x$tool_specified"; then
14041           # A command without a complete path is provided, search $PATH.
14042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14043 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14044           # Extract the first word of "$tool_basename", so it can be a program name with args.
14045 set dummy $tool_basename; ac_word=$2
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14047 $as_echo_n "checking for $ac_word... " >&6; }
14048 if ${ac_cv_path_FGREP+:} false; then :
14049   $as_echo_n "(cached) " >&6
14050 else
14051   case $FGREP in
14052   [\\/]* | ?:[\\/]*)
14053   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14054   ;;
14055   *)
14056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14057 for as_dir in $PATH
14058 do
14059   IFS=$as_save_IFS
14060   test -z "$as_dir" && as_dir=.
14061     for ac_exec_ext in '' $ac_executable_extensions; do
14062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14063     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14065     break 2
14066   fi
14067 done
14068   done
14069 IFS=$as_save_IFS
14070 
14071   ;;
14072 esac
14073 fi
14074 FGREP=$ac_cv_path_FGREP
14075 if test -n "$FGREP"; then
14076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14077 $as_echo "$FGREP" >&6; }
14078 else
14079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14080 $as_echo "no" >&6; }
14081 fi
14082 
14083 
14084           if test "x$FGREP" = x; then
14085             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14086           fi
14087         else
14088           # Otherwise we believe it is a complete path. Use it as it is.
14089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14090 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14091           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14092 $as_echo_n "checking for FGREP... " >&6; }
14093           if test ! -x "$tool_specified"; then
14094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14095 $as_echo "not found" >&6; }
14096             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14097           fi
14098           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14099 $as_echo "$tool_specified" >&6; }
14100         fi
14101       fi
14102     fi
14103 
14104   fi
14105 
14106 
14107   if test "x$FGREP" = x; then
14108     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14109   fi
14110 
14111 
14112 
14113 
14114   # Publish this variable in the help.
14115 
14116 
14117   if [ -z "${SED+x}" ]; then
14118     # The variable is not set by user, try to locate tool using the code snippet
14119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14120 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14121 if ${ac_cv_path_SED+:} false; then :
14122   $as_echo_n "(cached) " >&6
14123 else
14124             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14125      for ac_i in 1 2 3 4 5 6 7; do
14126        ac_script="$ac_script$as_nl$ac_script"
14127      done
14128      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14129      { ac_script=; unset ac_script;}
14130      if test -z "$SED"; then
14131   ac_path_SED_found=false
14132   # Loop through the user's path and test for each of PROGNAME-LIST
14133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14134 for as_dir in $PATH
14135 do
14136   IFS=$as_save_IFS
14137   test -z "$as_dir" && as_dir=.
14138     for ac_prog in sed gsed; do
14139     for ac_exec_ext in '' $ac_executable_extensions; do
14140       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14141       as_fn_executable_p "$ac_path_SED" || continue
14142 # Check for GNU ac_path_SED and select it if it is found.
14143   # Check for GNU $ac_path_SED
14144 case `"$ac_path_SED" --version 2>&1` in
14145 *GNU*)
14146   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14147 *)
14148   ac_count=0
14149   $as_echo_n 0123456789 >"conftest.in"
14150   while :
14151   do
14152     cat "conftest.in" "conftest.in" >"conftest.tmp"
14153     mv "conftest.tmp" "conftest.in"
14154     cp "conftest.in" "conftest.nl"
14155     $as_echo '' >> "conftest.nl"
14156     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14157     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14158     as_fn_arith $ac_count + 1 && ac_count=$as_val
14159     if test $ac_count -gt ${ac_path_SED_max-0}; then
14160       # Best one so far, save it but keep looking for a better one
14161       ac_cv_path_SED="$ac_path_SED"
14162       ac_path_SED_max=$ac_count
14163     fi
14164     # 10*(2^10) chars as input seems more than enough
14165     test $ac_count -gt 10 && break
14166   done
14167   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14168 esac
14169 
14170       $ac_path_SED_found && break 3
14171     done
14172   done
14173   done
14174 IFS=$as_save_IFS
14175   if test -z "$ac_cv_path_SED"; then
14176     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14177   fi
14178 else
14179   ac_cv_path_SED=$SED
14180 fi
14181 
14182 fi
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14184 $as_echo "$ac_cv_path_SED" >&6; }
14185  SED="$ac_cv_path_SED"
14186   rm -f conftest.sed
14187 
14188   else
14189     # The variable is set, but is it from the command line or the environment?
14190 
14191     # Try to remove the string !SED! from our list.
14192     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14193     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14194       # If it failed, the variable was not from the command line. Ignore it,
14195       # but warn the user (except for BASH, which is always set by the calling BASH).
14196       if test "xSED" != xBASH; then
14197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14198 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14199       fi
14200       # Try to locate tool using the code snippet
14201       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14202 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14203 if ${ac_cv_path_SED+:} false; then :
14204   $as_echo_n "(cached) " >&6
14205 else
14206             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14207      for ac_i in 1 2 3 4 5 6 7; do
14208        ac_script="$ac_script$as_nl$ac_script"
14209      done
14210      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14211      { ac_script=; unset ac_script;}
14212      if test -z "$SED"; then
14213   ac_path_SED_found=false
14214   # Loop through the user's path and test for each of PROGNAME-LIST
14215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14216 for as_dir in $PATH
14217 do
14218   IFS=$as_save_IFS
14219   test -z "$as_dir" && as_dir=.
14220     for ac_prog in sed gsed; do
14221     for ac_exec_ext in '' $ac_executable_extensions; do
14222       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14223       as_fn_executable_p "$ac_path_SED" || continue
14224 # Check for GNU ac_path_SED and select it if it is found.
14225   # Check for GNU $ac_path_SED
14226 case `"$ac_path_SED" --version 2>&1` in
14227 *GNU*)
14228   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14229 *)
14230   ac_count=0
14231   $as_echo_n 0123456789 >"conftest.in"
14232   while :
14233   do
14234     cat "conftest.in" "conftest.in" >"conftest.tmp"
14235     mv "conftest.tmp" "conftest.in"
14236     cp "conftest.in" "conftest.nl"
14237     $as_echo '' >> "conftest.nl"
14238     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14239     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14240     as_fn_arith $ac_count + 1 && ac_count=$as_val
14241     if test $ac_count -gt ${ac_path_SED_max-0}; then
14242       # Best one so far, save it but keep looking for a better one
14243       ac_cv_path_SED="$ac_path_SED"
14244       ac_path_SED_max=$ac_count
14245     fi
14246     # 10*(2^10) chars as input seems more than enough
14247     test $ac_count -gt 10 && break
14248   done
14249   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14250 esac
14251 
14252       $ac_path_SED_found && break 3
14253     done
14254   done
14255   done
14256 IFS=$as_save_IFS
14257   if test -z "$ac_cv_path_SED"; then
14258     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14259   fi
14260 else
14261   ac_cv_path_SED=$SED
14262 fi
14263 
14264 fi
14265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14266 $as_echo "$ac_cv_path_SED" >&6; }
14267  SED="$ac_cv_path_SED"
14268   rm -f conftest.sed
14269 
14270     else
14271       # If it succeeded, then it was overridden by the user. We will use it
14272       # for the tool.
14273 
14274       # First remove it from the list of overridden variables, so we can test
14275       # for unknown variables in the end.
14276       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14277 
14278       # Check if we try to supply an empty value
14279       if test "x$SED" = x; then
14280         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14281 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14283 $as_echo_n "checking for SED... " >&6; }
14284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14285 $as_echo "disabled" >&6; }
14286       else
14287         # Check if the provided tool contains a complete path.
14288         tool_specified="$SED"
14289         tool_basename="${tool_specified##*/}"
14290         if test "x$tool_basename" = "x$tool_specified"; then
14291           # A command without a complete path is provided, search $PATH.
14292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14293 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14294           # Extract the first word of "$tool_basename", so it can be a program name with args.
14295 set dummy $tool_basename; ac_word=$2
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14297 $as_echo_n "checking for $ac_word... " >&6; }
14298 if ${ac_cv_path_SED+:} false; then :
14299   $as_echo_n "(cached) " >&6
14300 else
14301   case $SED in
14302   [\\/]* | ?:[\\/]*)
14303   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14304   ;;
14305   *)
14306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14307 for as_dir in $PATH
14308 do
14309   IFS=$as_save_IFS
14310   test -z "$as_dir" && as_dir=.
14311     for ac_exec_ext in '' $ac_executable_extensions; do
14312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14313     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14315     break 2
14316   fi
14317 done
14318   done
14319 IFS=$as_save_IFS
14320 
14321   ;;
14322 esac
14323 fi
14324 SED=$ac_cv_path_SED
14325 if test -n "$SED"; then
14326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14327 $as_echo "$SED" >&6; }
14328 else
14329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14330 $as_echo "no" >&6; }
14331 fi
14332 
14333 
14334           if test "x$SED" = x; then
14335             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14336           fi
14337         else
14338           # Otherwise we believe it is a complete path. Use it as it is.
14339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14340 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14341           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14342 $as_echo_n "checking for SED... " >&6; }
14343           if test ! -x "$tool_specified"; then
14344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14345 $as_echo "not found" >&6; }
14346             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14347           fi
14348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14349 $as_echo "$tool_specified" >&6; }
14350         fi
14351       fi
14352     fi
14353 
14354   fi
14355 
14356 
14357   if test "x$SED" = x; then
14358     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14359   fi
14360 
14361 
14362 
14363   # Always force rm.
14364   RM="$RM -f"
14365 
14366   # pwd behaves differently on various platforms and some don't support the -L flag.
14367   # Always use the bash builtin pwd to get uniform behavior.
14368   THEPWDCMD=pwd
14369 
14370   # These are not required on all platforms
14371 
14372 
14373   # Publish this variable in the help.
14374 
14375 
14376   if [ -z "${CYGPATH+x}" ]; then
14377     # The variable is not set by user, try to locate tool using the code snippet
14378     for ac_prog in cygpath
14379 do
14380   # Extract the first word of "$ac_prog", so it can be a program name with args.
14381 set dummy $ac_prog; ac_word=$2
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14383 $as_echo_n "checking for $ac_word... " >&6; }
14384 if ${ac_cv_path_CYGPATH+:} false; then :
14385   $as_echo_n "(cached) " >&6
14386 else
14387   case $CYGPATH in
14388   [\\/]* | ?:[\\/]*)
14389   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14390   ;;
14391   *)
14392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14393 for as_dir in $PATH
14394 do
14395   IFS=$as_save_IFS
14396   test -z "$as_dir" && as_dir=.
14397     for ac_exec_ext in '' $ac_executable_extensions; do
14398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14399     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14401     break 2
14402   fi
14403 done
14404   done
14405 IFS=$as_save_IFS
14406 
14407   ;;
14408 esac
14409 fi
14410 CYGPATH=$ac_cv_path_CYGPATH
14411 if test -n "$CYGPATH"; then
14412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14413 $as_echo "$CYGPATH" >&6; }
14414 else
14415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416 $as_echo "no" >&6; }
14417 fi
14418 
14419 
14420   test -n "$CYGPATH" && break
14421 done
14422 
14423   else
14424     # The variable is set, but is it from the command line or the environment?
14425 
14426     # Try to remove the string !CYGPATH! from our list.
14427     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14428     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14429       # If it failed, the variable was not from the command line. Ignore it,
14430       # but warn the user (except for BASH, which is always set by the calling BASH).
14431       if test "xCYGPATH" != xBASH; then
14432         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14433 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14434       fi
14435       # Try to locate tool using the code snippet
14436       for ac_prog in cygpath
14437 do
14438   # Extract the first word of "$ac_prog", so it can be a program name with args.
14439 set dummy $ac_prog; ac_word=$2
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14441 $as_echo_n "checking for $ac_word... " >&6; }
14442 if ${ac_cv_path_CYGPATH+:} false; then :
14443   $as_echo_n "(cached) " >&6
14444 else
14445   case $CYGPATH in
14446   [\\/]* | ?:[\\/]*)
14447   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14448   ;;
14449   *)
14450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14451 for as_dir in $PATH
14452 do
14453   IFS=$as_save_IFS
14454   test -z "$as_dir" && as_dir=.
14455     for ac_exec_ext in '' $ac_executable_extensions; do
14456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14457     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14459     break 2
14460   fi
14461 done
14462   done
14463 IFS=$as_save_IFS
14464 
14465   ;;
14466 esac
14467 fi
14468 CYGPATH=$ac_cv_path_CYGPATH
14469 if test -n "$CYGPATH"; then
14470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14471 $as_echo "$CYGPATH" >&6; }
14472 else
14473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14474 $as_echo "no" >&6; }
14475 fi
14476 
14477 
14478   test -n "$CYGPATH" && break
14479 done
14480 
14481     else
14482       # If it succeeded, then it was overridden by the user. We will use it
14483       # for the tool.
14484 
14485       # First remove it from the list of overridden variables, so we can test
14486       # for unknown variables in the end.
14487       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14488 
14489       # Check if we try to supply an empty value
14490       if test "x$CYGPATH" = x; then
14491         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14492 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14494 $as_echo_n "checking for CYGPATH... " >&6; }
14495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14496 $as_echo "disabled" >&6; }
14497       else
14498         # Check if the provided tool contains a complete path.
14499         tool_specified="$CYGPATH"
14500         tool_basename="${tool_specified##*/}"
14501         if test "x$tool_basename" = "x$tool_specified"; then
14502           # A command without a complete path is provided, search $PATH.
14503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14504 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14505           # Extract the first word of "$tool_basename", so it can be a program name with args.
14506 set dummy $tool_basename; ac_word=$2
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14508 $as_echo_n "checking for $ac_word... " >&6; }
14509 if ${ac_cv_path_CYGPATH+:} false; then :
14510   $as_echo_n "(cached) " >&6
14511 else
14512   case $CYGPATH in
14513   [\\/]* | ?:[\\/]*)
14514   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14515   ;;
14516   *)
14517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518 for as_dir in $PATH
14519 do
14520   IFS=$as_save_IFS
14521   test -z "$as_dir" && as_dir=.
14522     for ac_exec_ext in '' $ac_executable_extensions; do
14523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526     break 2
14527   fi
14528 done
14529   done
14530 IFS=$as_save_IFS
14531 
14532   ;;
14533 esac
14534 fi
14535 CYGPATH=$ac_cv_path_CYGPATH
14536 if test -n "$CYGPATH"; then
14537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14538 $as_echo "$CYGPATH" >&6; }
14539 else
14540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541 $as_echo "no" >&6; }
14542 fi
14543 
14544 
14545           if test "x$CYGPATH" = x; then
14546             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14547           fi
14548         else
14549           # Otherwise we believe it is a complete path. Use it as it is.
14550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14551 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14552           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14553 $as_echo_n "checking for CYGPATH... " >&6; }
14554           if test ! -x "$tool_specified"; then
14555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14556 $as_echo "not found" >&6; }
14557             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14558           fi
14559           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14560 $as_echo "$tool_specified" >&6; }
14561         fi
14562       fi
14563     fi
14564 
14565   fi
14566 
14567 
14568 
14569 
14570   # Publish this variable in the help.
14571 
14572 
14573   if [ -z "${READLINK+x}" ]; then
14574     # The variable is not set by user, try to locate tool using the code snippet
14575     for ac_prog in greadlink readlink
14576 do
14577   # Extract the first word of "$ac_prog", so it can be a program name with args.
14578 set dummy $ac_prog; ac_word=$2
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14580 $as_echo_n "checking for $ac_word... " >&6; }
14581 if ${ac_cv_path_READLINK+:} false; then :
14582   $as_echo_n "(cached) " >&6
14583 else
14584   case $READLINK in
14585   [\\/]* | ?:[\\/]*)
14586   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14587   ;;
14588   *)
14589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14590 for as_dir in $PATH
14591 do
14592   IFS=$as_save_IFS
14593   test -z "$as_dir" && as_dir=.
14594     for ac_exec_ext in '' $ac_executable_extensions; do
14595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14596     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14598     break 2
14599   fi
14600 done
14601   done
14602 IFS=$as_save_IFS
14603 
14604   ;;
14605 esac
14606 fi
14607 READLINK=$ac_cv_path_READLINK
14608 if test -n "$READLINK"; then
14609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14610 $as_echo "$READLINK" >&6; }
14611 else
14612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613 $as_echo "no" >&6; }
14614 fi
14615 
14616 
14617   test -n "$READLINK" && break
14618 done
14619 
14620   else
14621     # The variable is set, but is it from the command line or the environment?
14622 
14623     # Try to remove the string !READLINK! from our list.
14624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14626       # If it failed, the variable was not from the command line. Ignore it,
14627       # but warn the user (except for BASH, which is always set by the calling BASH).
14628       if test "xREADLINK" != xBASH; then
14629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14630 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14631       fi
14632       # Try to locate tool using the code snippet
14633       for ac_prog in greadlink readlink
14634 do
14635   # Extract the first word of "$ac_prog", so it can be a program name with args.
14636 set dummy $ac_prog; ac_word=$2
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14638 $as_echo_n "checking for $ac_word... " >&6; }
14639 if ${ac_cv_path_READLINK+:} false; then :
14640   $as_echo_n "(cached) " >&6
14641 else
14642   case $READLINK in
14643   [\\/]* | ?:[\\/]*)
14644   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14645   ;;
14646   *)
14647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14648 for as_dir in $PATH
14649 do
14650   IFS=$as_save_IFS
14651   test -z "$as_dir" && as_dir=.
14652     for ac_exec_ext in '' $ac_executable_extensions; do
14653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14654     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14656     break 2
14657   fi
14658 done
14659   done
14660 IFS=$as_save_IFS
14661 
14662   ;;
14663 esac
14664 fi
14665 READLINK=$ac_cv_path_READLINK
14666 if test -n "$READLINK"; then
14667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14668 $as_echo "$READLINK" >&6; }
14669 else
14670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14671 $as_echo "no" >&6; }
14672 fi
14673 
14674 
14675   test -n "$READLINK" && break
14676 done
14677 
14678     else
14679       # If it succeeded, then it was overridden by the user. We will use it
14680       # for the tool.
14681 
14682       # First remove it from the list of overridden variables, so we can test
14683       # for unknown variables in the end.
14684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14685 
14686       # Check if we try to supply an empty value
14687       if test "x$READLINK" = x; then
14688         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14689 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14691 $as_echo_n "checking for READLINK... " >&6; }
14692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14693 $as_echo "disabled" >&6; }
14694       else
14695         # Check if the provided tool contains a complete path.
14696         tool_specified="$READLINK"
14697         tool_basename="${tool_specified##*/}"
14698         if test "x$tool_basename" = "x$tool_specified"; then
14699           # A command without a complete path is provided, search $PATH.
14700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14701 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14702           # Extract the first word of "$tool_basename", so it can be a program name with args.
14703 set dummy $tool_basename; ac_word=$2
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705 $as_echo_n "checking for $ac_word... " >&6; }
14706 if ${ac_cv_path_READLINK+:} false; then :
14707   $as_echo_n "(cached) " >&6
14708 else
14709   case $READLINK in
14710   [\\/]* | ?:[\\/]*)
14711   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14712   ;;
14713   *)
14714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715 for as_dir in $PATH
14716 do
14717   IFS=$as_save_IFS
14718   test -z "$as_dir" && as_dir=.
14719     for ac_exec_ext in '' $ac_executable_extensions; do
14720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723     break 2
14724   fi
14725 done
14726   done
14727 IFS=$as_save_IFS
14728 
14729   ;;
14730 esac
14731 fi
14732 READLINK=$ac_cv_path_READLINK
14733 if test -n "$READLINK"; then
14734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14735 $as_echo "$READLINK" >&6; }
14736 else
14737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738 $as_echo "no" >&6; }
14739 fi
14740 
14741 
14742           if test "x$READLINK" = x; then
14743             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14744           fi
14745         else
14746           # Otherwise we believe it is a complete path. Use it as it is.
14747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14748 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14750 $as_echo_n "checking for READLINK... " >&6; }
14751           if test ! -x "$tool_specified"; then
14752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14753 $as_echo "not found" >&6; }
14754             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14755           fi
14756           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14757 $as_echo "$tool_specified" >&6; }
14758         fi
14759       fi
14760     fi
14761 
14762   fi
14763 
14764 
14765 
14766 
14767   # Publish this variable in the help.
14768 
14769 
14770   if [ -z "${DF+x}" ]; then
14771     # The variable is not set by user, try to locate tool using the code snippet
14772     for ac_prog in df
14773 do
14774   # Extract the first word of "$ac_prog", so it can be a program name with args.
14775 set dummy $ac_prog; ac_word=$2
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14777 $as_echo_n "checking for $ac_word... " >&6; }
14778 if ${ac_cv_path_DF+:} false; then :
14779   $as_echo_n "(cached) " >&6
14780 else
14781   case $DF in
14782   [\\/]* | ?:[\\/]*)
14783   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14784   ;;
14785   *)
14786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14787 for as_dir in $PATH
14788 do
14789   IFS=$as_save_IFS
14790   test -z "$as_dir" && as_dir=.
14791     for ac_exec_ext in '' $ac_executable_extensions; do
14792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14793     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14795     break 2
14796   fi
14797 done
14798   done
14799 IFS=$as_save_IFS
14800 
14801   ;;
14802 esac
14803 fi
14804 DF=$ac_cv_path_DF
14805 if test -n "$DF"; then
14806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14807 $as_echo "$DF" >&6; }
14808 else
14809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14810 $as_echo "no" >&6; }
14811 fi
14812 
14813 
14814   test -n "$DF" && break
14815 done
14816 
14817   else
14818     # The variable is set, but is it from the command line or the environment?
14819 
14820     # Try to remove the string !DF! from our list.
14821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14823       # If it failed, the variable was not from the command line. Ignore it,
14824       # but warn the user (except for BASH, which is always set by the calling BASH).
14825       if test "xDF" != xBASH; then
14826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14827 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14828       fi
14829       # Try to locate tool using the code snippet
14830       for ac_prog in df
14831 do
14832   # Extract the first word of "$ac_prog", so it can be a program name with args.
14833 set dummy $ac_prog; ac_word=$2
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14835 $as_echo_n "checking for $ac_word... " >&6; }
14836 if ${ac_cv_path_DF+:} false; then :
14837   $as_echo_n "(cached) " >&6
14838 else
14839   case $DF in
14840   [\\/]* | ?:[\\/]*)
14841   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14842   ;;
14843   *)
14844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14845 for as_dir in $PATH
14846 do
14847   IFS=$as_save_IFS
14848   test -z "$as_dir" && as_dir=.
14849     for ac_exec_ext in '' $ac_executable_extensions; do
14850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14851     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14853     break 2
14854   fi
14855 done
14856   done
14857 IFS=$as_save_IFS
14858 
14859   ;;
14860 esac
14861 fi
14862 DF=$ac_cv_path_DF
14863 if test -n "$DF"; then
14864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14865 $as_echo "$DF" >&6; }
14866 else
14867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14868 $as_echo "no" >&6; }
14869 fi
14870 
14871 
14872   test -n "$DF" && break
14873 done
14874 
14875     else
14876       # If it succeeded, then it was overridden by the user. We will use it
14877       # for the tool.
14878 
14879       # First remove it from the list of overridden variables, so we can test
14880       # for unknown variables in the end.
14881       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14882 
14883       # Check if we try to supply an empty value
14884       if test "x$DF" = x; then
14885         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14886 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14887         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14888 $as_echo_n "checking for DF... " >&6; }
14889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14890 $as_echo "disabled" >&6; }
14891       else
14892         # Check if the provided tool contains a complete path.
14893         tool_specified="$DF"
14894         tool_basename="${tool_specified##*/}"
14895         if test "x$tool_basename" = "x$tool_specified"; then
14896           # A command without a complete path is provided, search $PATH.
14897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14898 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14899           # Extract the first word of "$tool_basename", so it can be a program name with args.
14900 set dummy $tool_basename; ac_word=$2
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14902 $as_echo_n "checking for $ac_word... " >&6; }
14903 if ${ac_cv_path_DF+:} false; then :
14904   $as_echo_n "(cached) " >&6
14905 else
14906   case $DF in
14907   [\\/]* | ?:[\\/]*)
14908   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14909   ;;
14910   *)
14911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14912 for as_dir in $PATH
14913 do
14914   IFS=$as_save_IFS
14915   test -z "$as_dir" && as_dir=.
14916     for ac_exec_ext in '' $ac_executable_extensions; do
14917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14918     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14920     break 2
14921   fi
14922 done
14923   done
14924 IFS=$as_save_IFS
14925 
14926   ;;
14927 esac
14928 fi
14929 DF=$ac_cv_path_DF
14930 if test -n "$DF"; then
14931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14932 $as_echo "$DF" >&6; }
14933 else
14934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935 $as_echo "no" >&6; }
14936 fi
14937 
14938 
14939           if test "x$DF" = x; then
14940             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14941           fi
14942         else
14943           # Otherwise we believe it is a complete path. Use it as it is.
14944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14945 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14946           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14947 $as_echo_n "checking for DF... " >&6; }
14948           if test ! -x "$tool_specified"; then
14949             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14950 $as_echo "not found" >&6; }
14951             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14952           fi
14953           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14954 $as_echo "$tool_specified" >&6; }
14955         fi
14956       fi
14957     fi
14958 
14959   fi
14960 
14961 
14962 
14963 
14964   # Publish this variable in the help.
14965 
14966 
14967   if [ -z "${CPIO+x}" ]; then
14968     # The variable is not set by user, try to locate tool using the code snippet
14969     for ac_prog in cpio bsdcpio
14970 do
14971   # Extract the first word of "$ac_prog", so it can be a program name with args.
14972 set dummy $ac_prog; ac_word=$2
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14974 $as_echo_n "checking for $ac_word... " >&6; }
14975 if ${ac_cv_path_CPIO+:} false; then :
14976   $as_echo_n "(cached) " >&6
14977 else
14978   case $CPIO in
14979   [\\/]* | ?:[\\/]*)
14980   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14981   ;;
14982   *)
14983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14984 for as_dir in $PATH
14985 do
14986   IFS=$as_save_IFS
14987   test -z "$as_dir" && as_dir=.
14988     for ac_exec_ext in '' $ac_executable_extensions; do
14989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14990     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14992     break 2
14993   fi
14994 done
14995   done
14996 IFS=$as_save_IFS
14997 
14998   ;;
14999 esac
15000 fi
15001 CPIO=$ac_cv_path_CPIO
15002 if test -n "$CPIO"; then
15003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15004 $as_echo "$CPIO" >&6; }
15005 else
15006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15007 $as_echo "no" >&6; }
15008 fi
15009 
15010 
15011   test -n "$CPIO" && break
15012 done
15013 
15014   else
15015     # The variable is set, but is it from the command line or the environment?
15016 
15017     # Try to remove the string !CPIO! from our list.
15018     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15019     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15020       # If it failed, the variable was not from the command line. Ignore it,
15021       # but warn the user (except for BASH, which is always set by the calling BASH).
15022       if test "xCPIO" != xBASH; then
15023         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15024 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15025       fi
15026       # Try to locate tool using the code snippet
15027       for ac_prog in cpio bsdcpio
15028 do
15029   # Extract the first word of "$ac_prog", so it can be a program name with args.
15030 set dummy $ac_prog; ac_word=$2
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15032 $as_echo_n "checking for $ac_word... " >&6; }
15033 if ${ac_cv_path_CPIO+:} false; then :
15034   $as_echo_n "(cached) " >&6
15035 else
15036   case $CPIO in
15037   [\\/]* | ?:[\\/]*)
15038   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15039   ;;
15040   *)
15041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15042 for as_dir in $PATH
15043 do
15044   IFS=$as_save_IFS
15045   test -z "$as_dir" && as_dir=.
15046     for ac_exec_ext in '' $ac_executable_extensions; do
15047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15048     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15050     break 2
15051   fi
15052 done
15053   done
15054 IFS=$as_save_IFS
15055 
15056   ;;
15057 esac
15058 fi
15059 CPIO=$ac_cv_path_CPIO
15060 if test -n "$CPIO"; then
15061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15062 $as_echo "$CPIO" >&6; }
15063 else
15064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15065 $as_echo "no" >&6; }
15066 fi
15067 
15068 
15069   test -n "$CPIO" && break
15070 done
15071 
15072     else
15073       # If it succeeded, then it was overridden by the user. We will use it
15074       # for the tool.
15075 
15076       # First remove it from the list of overridden variables, so we can test
15077       # for unknown variables in the end.
15078       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15079 
15080       # Check if we try to supply an empty value
15081       if test "x$CPIO" = x; then
15082         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15083 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15085 $as_echo_n "checking for CPIO... " >&6; }
15086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15087 $as_echo "disabled" >&6; }
15088       else
15089         # Check if the provided tool contains a complete path.
15090         tool_specified="$CPIO"
15091         tool_basename="${tool_specified##*/}"
15092         if test "x$tool_basename" = "x$tool_specified"; then
15093           # A command without a complete path is provided, search $PATH.
15094           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15095 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15096           # Extract the first word of "$tool_basename", so it can be a program name with args.
15097 set dummy $tool_basename; ac_word=$2
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15099 $as_echo_n "checking for $ac_word... " >&6; }
15100 if ${ac_cv_path_CPIO+:} false; then :
15101   $as_echo_n "(cached) " >&6
15102 else
15103   case $CPIO in
15104   [\\/]* | ?:[\\/]*)
15105   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15106   ;;
15107   *)
15108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15109 for as_dir in $PATH
15110 do
15111   IFS=$as_save_IFS
15112   test -z "$as_dir" && as_dir=.
15113     for ac_exec_ext in '' $ac_executable_extensions; do
15114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15115     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15117     break 2
15118   fi
15119 done
15120   done
15121 IFS=$as_save_IFS
15122 
15123   ;;
15124 esac
15125 fi
15126 CPIO=$ac_cv_path_CPIO
15127 if test -n "$CPIO"; then
15128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15129 $as_echo "$CPIO" >&6; }
15130 else
15131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132 $as_echo "no" >&6; }
15133 fi
15134 
15135 
15136           if test "x$CPIO" = x; then
15137             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15138           fi
15139         else
15140           # Otherwise we believe it is a complete path. Use it as it is.
15141           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15142 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15143           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15144 $as_echo_n "checking for CPIO... " >&6; }
15145           if test ! -x "$tool_specified"; then
15146             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15147 $as_echo "not found" >&6; }
15148             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15149           fi
15150           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15151 $as_echo "$tool_specified" >&6; }
15152         fi
15153       fi
15154     fi
15155 
15156   fi
15157 
15158 
15159 
15160 
15161   # Publish this variable in the help.
15162 
15163 
15164   if [ -z "${NICE+x}" ]; then
15165     # The variable is not set by user, try to locate tool using the code snippet
15166     for ac_prog in nice
15167 do
15168   # Extract the first word of "$ac_prog", so it can be a program name with args.
15169 set dummy $ac_prog; ac_word=$2
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15171 $as_echo_n "checking for $ac_word... " >&6; }
15172 if ${ac_cv_path_NICE+:} false; then :
15173   $as_echo_n "(cached) " >&6
15174 else
15175   case $NICE in
15176   [\\/]* | ?:[\\/]*)
15177   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15178   ;;
15179   *)
15180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15181 for as_dir in $PATH
15182 do
15183   IFS=$as_save_IFS
15184   test -z "$as_dir" && as_dir=.
15185     for ac_exec_ext in '' $ac_executable_extensions; do
15186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15187     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15189     break 2
15190   fi
15191 done
15192   done
15193 IFS=$as_save_IFS
15194 
15195   ;;
15196 esac
15197 fi
15198 NICE=$ac_cv_path_NICE
15199 if test -n "$NICE"; then
15200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15201 $as_echo "$NICE" >&6; }
15202 else
15203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15204 $as_echo "no" >&6; }
15205 fi
15206 
15207 
15208   test -n "$NICE" && break
15209 done
15210 
15211   else
15212     # The variable is set, but is it from the command line or the environment?
15213 
15214     # Try to remove the string !NICE! from our list.
15215     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15216     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15217       # If it failed, the variable was not from the command line. Ignore it,
15218       # but warn the user (except for BASH, which is always set by the calling BASH).
15219       if test "xNICE" != xBASH; then
15220         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15221 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15222       fi
15223       # Try to locate tool using the code snippet
15224       for ac_prog in nice
15225 do
15226   # Extract the first word of "$ac_prog", so it can be a program name with args.
15227 set dummy $ac_prog; ac_word=$2
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15229 $as_echo_n "checking for $ac_word... " >&6; }
15230 if ${ac_cv_path_NICE+:} false; then :
15231   $as_echo_n "(cached) " >&6
15232 else
15233   case $NICE in
15234   [\\/]* | ?:[\\/]*)
15235   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15236   ;;
15237   *)
15238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15239 for as_dir in $PATH
15240 do
15241   IFS=$as_save_IFS
15242   test -z "$as_dir" && as_dir=.
15243     for ac_exec_ext in '' $ac_executable_extensions; do
15244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15245     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15247     break 2
15248   fi
15249 done
15250   done
15251 IFS=$as_save_IFS
15252 
15253   ;;
15254 esac
15255 fi
15256 NICE=$ac_cv_path_NICE
15257 if test -n "$NICE"; then
15258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15259 $as_echo "$NICE" >&6; }
15260 else
15261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15262 $as_echo "no" >&6; }
15263 fi
15264 
15265 
15266   test -n "$NICE" && break
15267 done
15268 
15269     else
15270       # If it succeeded, then it was overridden by the user. We will use it
15271       # for the tool.
15272 
15273       # First remove it from the list of overridden variables, so we can test
15274       # for unknown variables in the end.
15275       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15276 
15277       # Check if we try to supply an empty value
15278       if test "x$NICE" = x; then
15279         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15280 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15281         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15282 $as_echo_n "checking for NICE... " >&6; }
15283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15284 $as_echo "disabled" >&6; }
15285       else
15286         # Check if the provided tool contains a complete path.
15287         tool_specified="$NICE"
15288         tool_basename="${tool_specified##*/}"
15289         if test "x$tool_basename" = "x$tool_specified"; then
15290           # A command without a complete path is provided, search $PATH.
15291           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15292 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15293           # Extract the first word of "$tool_basename", so it can be a program name with args.
15294 set dummy $tool_basename; ac_word=$2
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15296 $as_echo_n "checking for $ac_word... " >&6; }
15297 if ${ac_cv_path_NICE+:} false; then :
15298   $as_echo_n "(cached) " >&6
15299 else
15300   case $NICE in
15301   [\\/]* | ?:[\\/]*)
15302   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15303   ;;
15304   *)
15305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15306 for as_dir in $PATH
15307 do
15308   IFS=$as_save_IFS
15309   test -z "$as_dir" && as_dir=.
15310     for ac_exec_ext in '' $ac_executable_extensions; do
15311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15312     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15314     break 2
15315   fi
15316 done
15317   done
15318 IFS=$as_save_IFS
15319 
15320   ;;
15321 esac
15322 fi
15323 NICE=$ac_cv_path_NICE
15324 if test -n "$NICE"; then
15325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15326 $as_echo "$NICE" >&6; }
15327 else
15328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15329 $as_echo "no" >&6; }
15330 fi
15331 
15332 
15333           if test "x$NICE" = x; then
15334             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15335           fi
15336         else
15337           # Otherwise we believe it is a complete path. Use it as it is.
15338           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15339 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15340           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15341 $as_echo_n "checking for NICE... " >&6; }
15342           if test ! -x "$tool_specified"; then
15343             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15344 $as_echo "not found" >&6; }
15345             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15346           fi
15347           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15348 $as_echo "$tool_specified" >&6; }
15349         fi
15350       fi
15351     fi
15352 
15353   fi
15354 
15355 
15356 
15357 
15358 # Now we can determine OpenJDK build and target platforms. This is required to
15359 # have early on.
15360 # Make sure we can run config.sub.
15361 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15362   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15363 
15364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15365 $as_echo_n "checking build system type... " >&6; }
15366 if ${ac_cv_build+:} false; then :
15367   $as_echo_n "(cached) " >&6
15368 else
15369   ac_build_alias=$build_alias
15370 test "x$ac_build_alias" = x &&
15371   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15372 test "x$ac_build_alias" = x &&
15373   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15374 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15375   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15376 
15377 fi
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15379 $as_echo "$ac_cv_build" >&6; }
15380 case $ac_cv_build in
15381 *-*-*) ;;
15382 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15383 esac
15384 build=$ac_cv_build
15385 ac_save_IFS=$IFS; IFS='-'
15386 set x $ac_cv_build
15387 shift
15388 build_cpu=$1
15389 build_vendor=$2
15390 shift; shift
15391 # Remember, the first character of IFS is used to create $*,
15392 # except with old shells:
15393 build_os=$*
15394 IFS=$ac_save_IFS
15395 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15396 
15397 
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15399 $as_echo_n "checking host system type... " >&6; }
15400 if ${ac_cv_host+:} false; then :
15401   $as_echo_n "(cached) " >&6
15402 else
15403   if test "x$host_alias" = x; then
15404   ac_cv_host=$ac_cv_build
15405 else
15406   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15407     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15408 fi
15409 
15410 fi
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15412 $as_echo "$ac_cv_host" >&6; }
15413 case $ac_cv_host in
15414 *-*-*) ;;
15415 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15416 esac
15417 host=$ac_cv_host
15418 ac_save_IFS=$IFS; IFS='-'
15419 set x $ac_cv_host
15420 shift
15421 host_cpu=$1
15422 host_vendor=$2
15423 shift; shift
15424 # Remember, the first character of IFS is used to create $*,
15425 # except with old shells:
15426 host_os=$*
15427 IFS=$ac_save_IFS
15428 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15429 
15430 
15431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15432 $as_echo_n "checking target system type... " >&6; }
15433 if ${ac_cv_target+:} false; then :
15434   $as_echo_n "(cached) " >&6
15435 else
15436   if test "x$target_alias" = x; then
15437   ac_cv_target=$ac_cv_host
15438 else
15439   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15440     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15441 fi
15442 
15443 fi
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15445 $as_echo "$ac_cv_target" >&6; }
15446 case $ac_cv_target in
15447 *-*-*) ;;
15448 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15449 esac
15450 target=$ac_cv_target
15451 ac_save_IFS=$IFS; IFS='-'
15452 set x $ac_cv_target
15453 shift
15454 target_cpu=$1
15455 target_vendor=$2
15456 shift; shift
15457 # Remember, the first character of IFS is used to create $*,
15458 # except with old shells:
15459 target_os=$*
15460 IFS=$ac_save_IFS
15461 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15462 
15463 
15464 # The aliases save the names the user supplied, while $host etc.
15465 # will get canonicalized.
15466 test -n "$target_alias" &&
15467   test "$program_prefix$program_suffix$program_transform_name" = \
15468     NONENONEs,x,x, &&
15469   program_prefix=${target_alias}-
15470 
15471   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15472   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15473   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15474   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15475   # to use the configure naming style.
15476 
15477 
15478 
15479 
15480 
15481   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15482   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15483   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15484   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15485   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15486   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15487 
15488 
15489 
15490   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15491 
15492   case "$build_os" in
15493     *linux*)
15494       VAR_OS=linux
15495       VAR_OS_TYPE=unix
15496       ;;
15497     *solaris*)
15498       VAR_OS=solaris
15499       VAR_OS_TYPE=unix
15500       ;;
15501     *darwin*)
15502       VAR_OS=macosx
15503       VAR_OS_TYPE=unix
15504       ;;
15505     *bsd*)
15506       VAR_OS=bsd
15507       VAR_OS_TYPE=unix
15508       ;;
15509     *cygwin*)
15510       VAR_OS=windows
15511       VAR_OS_ENV=windows.cygwin
15512       ;;
15513     *mingw*)
15514       VAR_OS=windows
15515       VAR_OS_ENV=windows.msys
15516       ;;
15517     *aix*)
15518       VAR_OS=aix
15519       VAR_OS_TYPE=unix
15520       ;;
15521     *)
15522       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15523       ;;
15524   esac
15525 
15526 
15527   # First argument is the cpu name from the trip/quad
15528   case "$build_cpu" in
15529     x86_64)
15530       VAR_CPU=x86_64
15531       VAR_CPU_ARCH=x86
15532       VAR_CPU_BITS=64
15533       VAR_CPU_ENDIAN=little
15534       ;;
15535     i?86)
15536       VAR_CPU=x86
15537       VAR_CPU_ARCH=x86
15538       VAR_CPU_BITS=32
15539       VAR_CPU_ENDIAN=little
15540       ;;
15541     arm*)
15542       VAR_CPU=arm
15543       VAR_CPU_ARCH=arm
15544       VAR_CPU_BITS=32
15545       VAR_CPU_ENDIAN=little
15546       ;;
15547     aarch64)
15548       VAR_CPU=aarch64
15549       VAR_CPU_ARCH=aarch64
15550       VAR_CPU_BITS=64
15551       VAR_CPU_ENDIAN=little
15552       ;;
15553     powerpc)
15554       VAR_CPU=ppc
15555       VAR_CPU_ARCH=ppc
15556       VAR_CPU_BITS=32
15557       VAR_CPU_ENDIAN=big
15558       ;;
15559     powerpc64)
15560       VAR_CPU=ppc64
15561       VAR_CPU_ARCH=ppc
15562       VAR_CPU_BITS=64
15563       VAR_CPU_ENDIAN=big
15564       ;;
15565     powerpc64le)
15566       VAR_CPU=ppc64le
15567       VAR_CPU_ARCH=ppc
15568       VAR_CPU_BITS=64
15569       VAR_CPU_ENDIAN=little
15570       ;;
15571     s390)
15572       VAR_CPU=s390
15573       VAR_CPU_ARCH=s390
15574       VAR_CPU_BITS=32
15575       VAR_CPU_ENDIAN=big
15576       ;;
15577     s390x)
15578       VAR_CPU=s390x
15579       VAR_CPU_ARCH=s390
15580       VAR_CPU_BITS=64
15581       VAR_CPU_ENDIAN=big
15582       ;;
15583     sparc)
15584       VAR_CPU=sparc
15585       VAR_CPU_ARCH=sparc
15586       VAR_CPU_BITS=32
15587       VAR_CPU_ENDIAN=big
15588       ;;
15589     sparcv9|sparc64)
15590       VAR_CPU=sparcv9
15591       VAR_CPU_ARCH=sparc
15592       VAR_CPU_BITS=64
15593       VAR_CPU_ENDIAN=big
15594       ;;
15595     *)
15596       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15597       ;;
15598   esac
15599 
15600   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15601   OPENJDK_BUILD_OS="$VAR_OS"
15602   if test "x$VAR_OS_TYPE" != x; then
15603     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15604   else
15605     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15606   fi
15607   if test "x$VAR_OS_ENV" != x; then
15608     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15609   else
15610     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15611   fi
15612   OPENJDK_BUILD_CPU="$VAR_CPU"
15613   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15614   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15615   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15616 
15617 
15618 
15619 
15620 
15621 
15622 
15623 
15624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15625 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15627 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15628 
15629   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15630 
15631   case "$host_os" in
15632     *linux*)
15633       VAR_OS=linux
15634       VAR_OS_TYPE=unix
15635       ;;
15636     *solaris*)
15637       VAR_OS=solaris
15638       VAR_OS_TYPE=unix
15639       ;;
15640     *darwin*)
15641       VAR_OS=macosx
15642       VAR_OS_TYPE=unix
15643       ;;
15644     *bsd*)
15645       VAR_OS=bsd
15646       VAR_OS_TYPE=unix
15647       ;;
15648     *cygwin*)
15649       VAR_OS=windows
15650       VAR_OS_ENV=windows.cygwin
15651       ;;
15652     *mingw*)
15653       VAR_OS=windows
15654       VAR_OS_ENV=windows.msys
15655       ;;
15656     *aix*)
15657       VAR_OS=aix
15658       VAR_OS_TYPE=unix
15659       ;;
15660     *)
15661       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15662       ;;
15663   esac
15664 
15665 
15666   # First argument is the cpu name from the trip/quad
15667   case "$host_cpu" in
15668     x86_64)
15669       VAR_CPU=x86_64
15670       VAR_CPU_ARCH=x86
15671       VAR_CPU_BITS=64
15672       VAR_CPU_ENDIAN=little
15673       ;;
15674     i?86)
15675       VAR_CPU=x86
15676       VAR_CPU_ARCH=x86
15677       VAR_CPU_BITS=32
15678       VAR_CPU_ENDIAN=little
15679       ;;
15680     arm*)
15681       VAR_CPU=arm
15682       VAR_CPU_ARCH=arm
15683       VAR_CPU_BITS=32
15684       VAR_CPU_ENDIAN=little
15685       ;;
15686     aarch64)
15687       VAR_CPU=aarch64
15688       VAR_CPU_ARCH=aarch64
15689       VAR_CPU_BITS=64
15690       VAR_CPU_ENDIAN=little
15691       ;;
15692     powerpc)
15693       VAR_CPU=ppc
15694       VAR_CPU_ARCH=ppc
15695       VAR_CPU_BITS=32
15696       VAR_CPU_ENDIAN=big
15697       ;;
15698     powerpc64)
15699       VAR_CPU=ppc64
15700       VAR_CPU_ARCH=ppc
15701       VAR_CPU_BITS=64
15702       VAR_CPU_ENDIAN=big
15703       ;;
15704     powerpc64le)
15705       VAR_CPU=ppc64le
15706       VAR_CPU_ARCH=ppc
15707       VAR_CPU_BITS=64
15708       VAR_CPU_ENDIAN=little
15709       ;;
15710     s390)
15711       VAR_CPU=s390
15712       VAR_CPU_ARCH=s390
15713       VAR_CPU_BITS=32
15714       VAR_CPU_ENDIAN=big
15715       ;;
15716     s390x)
15717       VAR_CPU=s390x
15718       VAR_CPU_ARCH=s390
15719       VAR_CPU_BITS=64
15720       VAR_CPU_ENDIAN=big
15721       ;;
15722     sparc)
15723       VAR_CPU=sparc
15724       VAR_CPU_ARCH=sparc
15725       VAR_CPU_BITS=32
15726       VAR_CPU_ENDIAN=big
15727       ;;
15728     sparcv9|sparc64)
15729       VAR_CPU=sparcv9
15730       VAR_CPU_ARCH=sparc
15731       VAR_CPU_BITS=64
15732       VAR_CPU_ENDIAN=big
15733       ;;
15734     *)
15735       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15736       ;;
15737   esac
15738 
15739   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15740   OPENJDK_TARGET_OS="$VAR_OS"
15741   if test "x$VAR_OS_TYPE" != x; then
15742     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15743   else
15744     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15745   fi
15746   if test "x$VAR_OS_ENV" != x; then
15747     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15748   else
15749     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15750   fi
15751   OPENJDK_TARGET_CPU="$VAR_CPU"
15752   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15753   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15754   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15755 
15756 
15757 
15758 
15759 
15760 
15761 
15762 
15763   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15764 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15766 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15767 
15768 
15769 
15770 # Check whether --with-target-bits was given.
15771 if test "${with_target_bits+set}" = set; then :
15772   withval=$with_target_bits;
15773 fi
15774 
15775 
15776   # We have three types of compiles:
15777   # native  == normal compilation, target system == build system
15778   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15779   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15780   #
15781   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15782     # We're doing a proper cross-compilation
15783     COMPILE_TYPE="cross"
15784   else
15785     COMPILE_TYPE="native"
15786   fi
15787 
15788   if test "x$with_target_bits" != x; then
15789     if test "x$COMPILE_TYPE" = "xcross"; then
15790       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15791     fi
15792 
15793     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15794       # A reduced build is requested
15795       COMPILE_TYPE="reduced"
15796       OPENJDK_TARGET_CPU_BITS=32
15797       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15798         OPENJDK_TARGET_CPU=x86
15799       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15800         OPENJDK_TARGET_CPU=sparc
15801       else
15802         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15803       fi
15804     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15805       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
15806     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15807       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15808 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15809     else
15810       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15811     fi
15812   fi
15813 
15814 
15815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15816 $as_echo_n "checking compilation type... " >&6; }
15817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15818 $as_echo "$COMPILE_TYPE" >&6; }
15819 
15820 
15821   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15822     REQUIRED_OS_NAME=SunOS
15823     REQUIRED_OS_VERSION=5.10
15824   fi
15825   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15826     REQUIRED_OS_NAME=Linux
15827     REQUIRED_OS_VERSION=2.6
15828   fi
15829   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15830     REQUIRED_OS_NAME=Windows
15831     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15832       REQUIRED_OS_VERSION=5.2
15833     else
15834       REQUIRED_OS_VERSION=5.1
15835     fi
15836   fi
15837   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15838     REQUIRED_OS_NAME=Darwin
15839     REQUIRED_OS_VERSION=11.2
15840   fi
15841   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15842     REQUIRED_OS_NAME=AIX
15843     REQUIRED_OS_VERSION=7.1
15844   fi
15845 
15846 
15847 
15848 
15849 
15850 
15851   # Also store the legacy naming of the cpu.
15852   # Ie i586 and amd64 instead of x86 and x86_64
15853   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15854   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15855     OPENJDK_TARGET_CPU_LEGACY="i586"
15856   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15857     # On all platforms except MacOSX replace x86_64 with amd64.
15858     OPENJDK_TARGET_CPU_LEGACY="amd64"
15859   fi
15860 
15861 
15862   # And the second legacy naming of the cpu.
15863   # Ie i386 and amd64 instead of x86 and x86_64.
15864   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15865   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15866     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15867   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15868     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15869   fi
15870 
15871 
15872   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15873   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15874   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15875   OPENJDK_TARGET_CPU_ISADIR=""
15876   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15877     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15878       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15879     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15880       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15881     fi
15882   fi
15883 
15884 
15885   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15886   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15887   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15888     # On linux only, we replace x86 with i386.
15889     OPENJDK_TARGET_CPU_OSARCH="i386"
15890   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15891     # On all platforms except macosx, we replace x86_64 with amd64.
15892     OPENJDK_TARGET_CPU_OSARCH="amd64"
15893   fi
15894 
15895 
15896   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15897   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15898     OPENJDK_TARGET_CPU_JLI="i386"
15899   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15900     # On all platforms except macosx, we replace x86_64 with amd64.
15901     OPENJDK_TARGET_CPU_JLI="amd64"
15902   fi
15903 
15904   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15905       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15906   else
15907       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15908   fi
15909 
15910 
15911   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15912   # Macosx is osx and x86_64 is x64
15913   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15914     OPENJDK_TARGET_OS_BUNDLE="osx"
15915   else
15916     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15917   fi
15918   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15919     OPENJDK_TARGET_CPU_BUNDLE="x64"
15920   else
15921     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15922   fi
15923   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15924 
15925 
15926 
15927 
15928   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15929     A_LP64="LP64:="
15930     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15931     # unpack200.exe
15932     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15933       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15934     fi
15935   fi
15936   LP64=$A_LP64
15937 
15938 
15939   if test "x$COMPILE_TYPE" = "xcross"; then
15940     # FIXME: ... or should this include reduced builds..?
15941     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15942   else
15943     DEFINE_CROSS_COMPILE_ARCH=""
15944   fi
15945 
15946 
15947   # Convert openjdk platform names to hotspot names
15948 
15949   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15950   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15951     HOTSPOT_TARGET_OS=bsd
15952   fi
15953 
15954 
15955   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15956   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15957     HOTSPOT_TARGET_OS_TYPE=posix
15958   fi
15959 
15960 
15961   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15962   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15963     HOTSPOT_TARGET_CPU=x86_32
15964   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15965     HOTSPOT_TARGET_CPU=sparc
15966   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15967     HOTSPOT_TARGET_CPU=ppc_64
15968   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15969     HOTSPOT_TARGET_CPU=ppc_64
15970   fi
15971 
15972 
15973   # This is identical with OPENJDK_*, but define anyway for consistency.
15974   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15975 
15976 
15977   # Setup HOTSPOT_TARGET_CPU_DEFINE
15978   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15979     HOTSPOT_TARGET_CPU_DEFINE=IA32
15980   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15981     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15982   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15983     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15984   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15985     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15986   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15987     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15988   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15989     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15990 
15991   # The cpu defines below are for zero, we don't support them directly.
15992   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15993     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15994   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15995     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15996   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15997     HOTSPOT_TARGET_CPU_DEFINE=S390
15998   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15999     HOTSPOT_TARGET_CPU_DEFINE=S390
16000   elif test "x$OPENJDK_TARGET_CPU" != x; then
16001     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16002   fi
16003 
16004 
16005 
16006 
16007   # Also store the legacy naming of the cpu.
16008   # Ie i586 and amd64 instead of x86 and x86_64
16009   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16010   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16011     OPENJDK_BUILD_CPU_LEGACY="i586"
16012   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16013     # On all platforms except MacOSX replace x86_64 with amd64.
16014     OPENJDK_BUILD_CPU_LEGACY="amd64"
16015   fi
16016 
16017 
16018   # And the second legacy naming of the cpu.
16019   # Ie i386 and amd64 instead of x86 and x86_64.
16020   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16021   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16022     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16023   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16024     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16025   fi
16026 
16027 
16028   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16029   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16030   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16031   OPENJDK_BUILD_CPU_ISADIR=""
16032   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16033     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16034       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16035     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16036       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16037     fi
16038   fi
16039 
16040 
16041   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16042   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16043   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16044     # On linux only, we replace x86 with i386.
16045     OPENJDK_BUILD_CPU_OSARCH="i386"
16046   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16047     # On all platforms except macosx, we replace x86_64 with amd64.
16048     OPENJDK_BUILD_CPU_OSARCH="amd64"
16049   fi
16050 
16051 
16052   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16053   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16054     OPENJDK_BUILD_CPU_JLI="i386"
16055   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16056     # On all platforms except macosx, we replace x86_64 with amd64.
16057     OPENJDK_BUILD_CPU_JLI="amd64"
16058   fi
16059 
16060   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16061       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16062   else
16063       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16064   fi
16065 
16066 
16067   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16068   # Macosx is osx and x86_64 is x64
16069   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070     OPENJDK_BUILD_OS_BUNDLE="osx"
16071   else
16072     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16073   fi
16074   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16075     OPENJDK_BUILD_CPU_BUNDLE="x64"
16076   else
16077     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16078   fi
16079   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16080 
16081 
16082 
16083 
16084   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16085     A_LP64="LP64:="
16086     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16087     # unpack200.exe
16088     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16089       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16090     fi
16091   fi
16092   LP64=$A_LP64
16093 
16094 
16095   if test "x$COMPILE_TYPE" = "xcross"; then
16096     # FIXME: ... or should this include reduced builds..?
16097     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16098   else
16099     DEFINE_CROSS_COMPILE_ARCH=""
16100   fi
16101 
16102 
16103   # Convert openjdk platform names to hotspot names
16104 
16105   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16106   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16107     HOTSPOT_BUILD_OS=bsd
16108   fi
16109 
16110 
16111   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16112   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16113     HOTSPOT_BUILD_OS_TYPE=posix
16114   fi
16115 
16116 
16117   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16118   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16119     HOTSPOT_BUILD_CPU=x86_32
16120   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16121     HOTSPOT_BUILD_CPU=sparc
16122   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16123     HOTSPOT_BUILD_CPU=ppc_64
16124   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16125     HOTSPOT_BUILD_CPU=ppc_64
16126   fi
16127 
16128 
16129   # This is identical with OPENJDK_*, but define anyway for consistency.
16130   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16131 
16132 
16133   # Setup HOTSPOT_BUILD_CPU_DEFINE
16134   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16135     HOTSPOT_BUILD_CPU_DEFINE=IA32
16136   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16137     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16138   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16139     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16140   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16141     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16142   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16143     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16144   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16145     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16146 
16147   # The cpu defines below are for zero, we don't support them directly.
16148   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16149     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16150   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16151     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16152   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16153     HOTSPOT_BUILD_CPU_DEFINE=S390
16154   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16155     HOTSPOT_BUILD_CPU_DEFINE=S390
16156   elif test "x$OPENJDK_BUILD_CPU" != x; then
16157     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16158   fi
16159 
16160 
16161 
16162 
16163   # ZERO_ARCHDEF is used to enable architecture-specific code.
16164   # This is used in legacy hotspot build.
16165   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16166 
16167 
16168 
16169 
16170 
16171 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16172 
16173   # Save the current directory this script was started from
16174   CURDIR="$PWD"
16175 
16176   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16177   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16178   # was not available at that time.
16179   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16180   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16181     ORIGINAL_PATH="$REWRITTEN_PATH"
16182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16183 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16184   fi
16185 
16186   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16187     PATH_SEP=";"
16188 
16189   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16190   if test $SRC_ROOT_LENGTH -gt 100; then
16191     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16192   fi
16193 
16194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16196 $as_echo_n "checking cygwin release... " >&6; }
16197     CYGWIN_VERSION=`$UNAME -r`
16198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16199 $as_echo "$CYGWIN_VERSION" >&6; }
16200     WINDOWS_ENV_VENDOR='cygwin'
16201     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16202 
16203     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16204     if test "x$CYGWIN_VERSION_OLD" != x; then
16205       { $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
16206 $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;}
16207       as_fn_error $? "Cannot continue" "$LINENO" 5
16208     fi
16209     if test "x$CYGPATH" = x; then
16210       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16211     fi
16212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16213 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16214     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16215     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16216     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16217     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16219 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16220     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16221     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16222     if test "x$test_cygdrive_prefix" = x; then
16223       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16224     fi
16225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16227 $as_echo_n "checking msys release... " >&6; }
16228     MSYS_VERSION=`$UNAME -r`
16229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16230 $as_echo "$MSYS_VERSION" >&6; }
16231 
16232     WINDOWS_ENV_VENDOR='msys'
16233     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16234 
16235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16236 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16237     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16238     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16239 
16240   windows_path="$MSYS_ROOT_PATH"
16241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16242     unix_path=`$CYGPATH -u "$windows_path"`
16243     MSYS_ROOT_PATH="$unix_path"
16244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16246     MSYS_ROOT_PATH="$unix_path"
16247   fi
16248 
16249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16250 $as_echo "$MSYS_ROOT_PATH" >&6; }
16251     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16252   else
16253     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16254   fi
16255 
16256   # Test if windows or unix (cygwin/msys) find is first in path.
16257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16258 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16259   FIND_BINARY_OUTPUT=`find --version 2>&1`
16260   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16262 $as_echo "unix style" >&6; }
16263   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16265 $as_echo "Windows" >&6; }
16266     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16267 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16268     { $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
16269 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16270     as_fn_error $? "Cannot continue" "$LINENO" 5
16271   else
16272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16273 $as_echo "unknown" >&6; }
16274     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16275 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16276   fi
16277 
16278   else
16279     PATH_SEP=":"
16280   fi
16281 
16282 
16283   # We get the top-level directory from the supporting wrappers.
16284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16285 $as_echo_n "checking for top-level directory... " >&6; }
16286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16287 $as_echo "$TOPDIR" >&6; }
16288 
16289 
16290   # Save the original version of TOPDIR for string comparisons
16291   ORIGINAL_TOPDIR="$TOPDIR"
16292 
16293 
16294   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16295 
16296   # Only process if variable expands to non-empty
16297 
16298   if test "x$CURDIR" != x; then
16299     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16300 
16301   # Input might be given as Windows format, start by converting to
16302   # unix format.
16303   path="$CURDIR"
16304   new_path=`$CYGPATH -u "$path"`
16305 
16306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16309   # "foo.exe" is OK but "foo" is an error.
16310   #
16311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16312   # It is also a way to make sure we got the proper file name for the real test later on.
16313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16314   if test "x$test_shortpath" = x; then
16315     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16316 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16317     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16318   fi
16319 
16320   # Call helper function which possibly converts this using DOS-style short mode.
16321   # If so, the updated path is stored in $new_path.
16322 
16323   input_path="$new_path"
16324   # Check if we need to convert this using DOS-style short mode. If the path
16325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16326   # take no chances and rewrite it.
16327   # Note: m4 eats our [], so we need to use [ and ] instead.
16328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16329   if test "x$has_forbidden_chars" != x; then
16330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16334       # Going to short mode and back again did indeed matter. Since short mode is
16335       # case insensitive, let's make it lowercase to improve readability.
16336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16337       # Now convert it back to Unix-style (cygpath)
16338       input_path=`$CYGPATH -u "$shortmode_path"`
16339       new_path="$input_path"
16340     fi
16341   fi
16342 
16343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16344   if test "x$test_cygdrive_prefix" = x; then
16345     # As a simple fix, exclude /usr/bin since it's not a real path.
16346     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16348       # a path prefixed by /cygdrive for fixpath to work.
16349       new_path="$CYGWIN_ROOT_PATH$input_path"
16350     fi
16351   fi
16352 
16353 
16354   if test "x$path" != "x$new_path"; then
16355     CURDIR="$new_path"
16356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16357 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16358   fi
16359 
16360     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361 
16362   path="$CURDIR"
16363   has_colon=`$ECHO $path | $GREP ^.:`
16364   new_path="$path"
16365   if test "x$has_colon" = x; then
16366     # Not in mixed or Windows style, start by that.
16367     new_path=`cmd //c echo $path`
16368   fi
16369 
16370 
16371   input_path="$new_path"
16372   # Check if we need to convert this using DOS-style short mode. If the path
16373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16374   # take no chances and rewrite it.
16375   # Note: m4 eats our [], so we need to use [ and ] instead.
16376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16377   if test "x$has_forbidden_chars" != x; then
16378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16380   fi
16381 
16382 
16383   windows_path="$new_path"
16384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385     unix_path=`$CYGPATH -u "$windows_path"`
16386     new_path="$unix_path"
16387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16389     new_path="$unix_path"
16390   fi
16391 
16392   if test "x$path" != "x$new_path"; then
16393     CURDIR="$new_path"
16394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16395 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16396   fi
16397 
16398   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16399   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16400 
16401     else
16402       # We're on a unix platform. Hooray! :)
16403       path="$CURDIR"
16404       has_space=`$ECHO "$path" | $GREP " "`
16405       if test "x$has_space" != x; then
16406         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16407 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16408         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16409       fi
16410 
16411       # Use eval to expand a potential ~
16412       eval path="$path"
16413       if test ! -f "$path" && test ! -d "$path"; then
16414         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16415       fi
16416 
16417       if test -d "$path"; then
16418         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16419       else
16420         dir="`$DIRNAME "$path"`"
16421         base="`$BASENAME "$path"`"
16422         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16423       fi
16424     fi
16425   fi
16426 
16427 
16428   # Only process if variable expands to non-empty
16429 
16430   if test "x$TOPDIR" != x; then
16431     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16432 
16433   # Input might be given as Windows format, start by converting to
16434   # unix format.
16435   path="$TOPDIR"
16436   new_path=`$CYGPATH -u "$path"`
16437 
16438   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16439   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16440   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16441   # "foo.exe" is OK but "foo" is an error.
16442   #
16443   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16444   # It is also a way to make sure we got the proper file name for the real test later on.
16445   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16446   if test "x$test_shortpath" = x; then
16447     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16448 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16449     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16450   fi
16451 
16452   # Call helper function which possibly converts this using DOS-style short mode.
16453   # If so, the updated path is stored in $new_path.
16454 
16455   input_path="$new_path"
16456   # Check if we need to convert this using DOS-style short mode. If the path
16457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16458   # take no chances and rewrite it.
16459   # Note: m4 eats our [], so we need to use [ and ] instead.
16460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16461   if test "x$has_forbidden_chars" != x; then
16462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16463     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16464     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16465     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16466       # Going to short mode and back again did indeed matter. Since short mode is
16467       # case insensitive, let's make it lowercase to improve readability.
16468       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16469       # Now convert it back to Unix-style (cygpath)
16470       input_path=`$CYGPATH -u "$shortmode_path"`
16471       new_path="$input_path"
16472     fi
16473   fi
16474 
16475   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16476   if test "x$test_cygdrive_prefix" = x; then
16477     # As a simple fix, exclude /usr/bin since it's not a real path.
16478     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16479       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16480       # a path prefixed by /cygdrive for fixpath to work.
16481       new_path="$CYGWIN_ROOT_PATH$input_path"
16482     fi
16483   fi
16484 
16485 
16486   if test "x$path" != "x$new_path"; then
16487     TOPDIR="$new_path"
16488     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16489 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16490   fi
16491 
16492     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16493 
16494   path="$TOPDIR"
16495   has_colon=`$ECHO $path | $GREP ^.:`
16496   new_path="$path"
16497   if test "x$has_colon" = x; then
16498     # Not in mixed or Windows style, start by that.
16499     new_path=`cmd //c echo $path`
16500   fi
16501 
16502 
16503   input_path="$new_path"
16504   # Check if we need to convert this using DOS-style short mode. If the path
16505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16506   # take no chances and rewrite it.
16507   # Note: m4 eats our [], so we need to use [ and ] instead.
16508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16509   if test "x$has_forbidden_chars" != x; then
16510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16512   fi
16513 
16514 
16515   windows_path="$new_path"
16516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16517     unix_path=`$CYGPATH -u "$windows_path"`
16518     new_path="$unix_path"
16519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16521     new_path="$unix_path"
16522   fi
16523 
16524   if test "x$path" != "x$new_path"; then
16525     TOPDIR="$new_path"
16526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16527 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16528   fi
16529 
16530   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16531   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16532 
16533     else
16534       # We're on a unix platform. Hooray! :)
16535       path="$TOPDIR"
16536       has_space=`$ECHO "$path" | $GREP " "`
16537       if test "x$has_space" != x; then
16538         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16539 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16540         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16541       fi
16542 
16543       # Use eval to expand a potential ~
16544       eval path="$path"
16545       if test ! -f "$path" && test ! -d "$path"; then
16546         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16547       fi
16548 
16549       if test -d "$path"; then
16550         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16551       else
16552         dir="`$DIRNAME "$path"`"
16553         base="`$BASENAME "$path"`"
16554         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16555       fi
16556     fi
16557   fi
16558 
16559   # SRC_ROOT is a traditional alias for TOPDIR.
16560   SRC_ROOT=$TOPDIR
16561 
16562   # Calculate a canonical version of TOPDIR for string comparisons
16563   CANONICAL_TOPDIR=$TOPDIR
16564 
16565   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16566     # Follow a chain of symbolic links. Use readlink
16567     # where it exists, else fall back to horribly
16568     # complicated shell code.
16569     if test "x$READLINK_TESTED" != yes; then
16570       # On MacOSX there is a readlink tool with a different
16571       # purpose than the GNU readlink tool. Check the found readlink.
16572       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16573       if test "x$ISGNU" = x; then
16574         # A readlink that we do not know how to use.
16575         # Are there other non-GNU readlinks out there?
16576         READLINK_TESTED=yes
16577         READLINK=
16578       fi
16579     fi
16580 
16581     if test "x$READLINK" != x; then
16582       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16583     else
16584       # Save the current directory for restoring afterwards
16585       STARTDIR=$PWD
16586       COUNTER=0
16587       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16588       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16589       cd $sym_link_dir
16590       # Use -P flag to resolve symlinks in directories.
16591       cd `$THEPWDCMD -P`
16592       sym_link_dir=`$THEPWDCMD -P`
16593       # Resolve file symlinks
16594       while test $COUNTER -lt 20; do
16595         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16596         if test "x$ISLINK" == x; then
16597           # This is not a symbolic link! We are done!
16598           break
16599         fi
16600         # Again resolve directory symlinks since the target of the just found
16601         # link could be in a different directory
16602         cd `$DIRNAME $ISLINK`
16603         sym_link_dir=`$THEPWDCMD -P`
16604         sym_link_file=`$BASENAME $ISLINK`
16605         let COUNTER=COUNTER+1
16606       done
16607       cd $STARTDIR
16608       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16609     fi
16610   fi
16611 
16612 
16613 
16614   # Locate the directory of this script.
16615   AUTOCONF_DIR=$TOPDIR/common/autoconf
16616 
16617   # Setup username (for use in adhoc version strings etc)
16618   # Outer [ ] to quote m4.
16619    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16620 
16621 
16622 
16623 # Check if it's a pure open build or if custom sources are to be used.
16624 
16625   # Check whether --enable-openjdk-only was given.
16626 if test "${enable_openjdk_only+set}" = set; then :
16627   enableval=$enable_openjdk_only;
16628 else
16629   enable_openjdk_only="no"
16630 fi
16631 
16632 
16633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16634 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16636 $as_echo "$enable_openjdk_only" >&6; }
16637   if test "x$enable_openjdk_only" = "xyes"; then
16638     SUPPRESS_CUSTOM_EXTENSIONS="true"
16639   elif test "x$enable_openjdk_only" = "xno"; then
16640     SUPPRESS_CUSTOM_EXTENSIONS="false"
16641   else
16642     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16643   fi
16644 
16645   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16646   # the IncludeCustomExtension macro.
16647 
16648 
16649 # Check whether --with-custom-make-dir was given.
16650 if test "${with_custom_make_dir+set}" = set; then :
16651   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
16652 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16653 fi
16654 
16655 
16656 
16657 
16658 # These are needed to be able to create a configuration name (and thus the output directory)
16659 
16660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16661 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16662 
16663 # Check whether --with-jdk-variant was given.
16664 if test "${with_jdk_variant+set}" = set; then :
16665   withval=$with_jdk_variant;
16666 fi
16667 
16668 
16669   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16670     JDK_VARIANT="normal"
16671   else
16672     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16673   fi
16674 
16675 
16676 
16677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16678 $as_echo "$JDK_VARIANT" >&6; }
16679 
16680 
16681   DEBUG_LEVEL="release"
16682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16683 $as_echo_n "checking which debug level to use... " >&6; }
16684   # Check whether --enable-debug was given.
16685 if test "${enable_debug+set}" = set; then :
16686   enableval=$enable_debug;
16687         ENABLE_DEBUG="${enableval}"
16688         DEBUG_LEVEL="fastdebug"
16689 
16690 else
16691   ENABLE_DEBUG="no"
16692 fi
16693 
16694 
16695 
16696 # Check whether --with-debug-level was given.
16697 if test "${with_debug_level+set}" = set; then :
16698   withval=$with_debug_level;
16699         DEBUG_LEVEL="${withval}"
16700         if test "x$ENABLE_DEBUG" = xyes; then
16701           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16702         fi
16703 
16704 fi
16705 
16706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16707 $as_echo "$DEBUG_LEVEL" >&6; }
16708 
16709   if test "x$DEBUG_LEVEL" != xrelease && \
16710       test "x$DEBUG_LEVEL" != xoptimized && \
16711       test "x$DEBUG_LEVEL" != xfastdebug && \
16712       test "x$DEBUG_LEVEL" != xslowdebug; then
16713     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16714   fi
16715 
16716   # Translate DEBUG_LEVEL to debug level used by Hotspot
16717   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16718   if test "x$DEBUG_LEVEL" = xrelease; then
16719     HOTSPOT_DEBUG_LEVEL="product"
16720   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16721     HOTSPOT_DEBUG_LEVEL="debug"
16722   fi
16723 
16724   if test "x$DEBUG_LEVEL" = xoptimized; then
16725     # The debug level 'optimized' is a little special because it is currently only
16726     # applicable to the HotSpot build where it means to build a completely
16727     # optimized version of the VM without any debugging code (like for the
16728     # 'release' debug level which is called 'product' in the HotSpot build) but
16729     # with the exception that it can contain additional code which is otherwise
16730     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16731     # test new and/or experimental features which are not intended for customer
16732     # shipment. Because these new features need to be tested and benchmarked in
16733     # real world scenarios, we want to build the containing JDK at the 'release'
16734     # debug level.
16735     DEBUG_LEVEL="release"
16736   fi
16737 
16738 
16739 
16740 
16741 
16742 
16743 # Check whether --with-jvm-variants was given.
16744 if test "${with_jvm_variants+set}" = set; then :
16745   withval=$with_jvm_variants;
16746 fi
16747 
16748 
16749 
16750 
16751 # Check whether --with-cpu-port was given.
16752 if test "${with_cpu_port+set}" = set; then :
16753   withval=$with_cpu_port;
16754 fi
16755 
16756 
16757   if test "x$with_cpu_port" != x; then
16758     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16759       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16760     fi
16761     if test "x$with_cpu_port" != xarm64 && \
16762         test "x$with_cpu_port" != xaarch64; then
16763       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16764     fi
16765     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16766   fi
16767 
16768 
16769   if test "x$with_jvm_variants" = x; then
16770     with_jvm_variants="server"
16771   fi
16772   JVM_VARIANTS_OPT="$with_jvm_variants"
16773 
16774   # Has the user listed more than one variant?
16775   # Additional [] needed to keep m4 from mangling shell constructs.
16776   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16777     BUILDING_MULTIPLE_JVM_VARIANTS=true
16778   else
16779     BUILDING_MULTIPLE_JVM_VARIANTS=false
16780   fi
16781   # Replace the commas with AND for use in the build directory name.
16782   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16783 
16784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16785 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16786   # JVM_VARIANTS is a space-separated list.
16787   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16788   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16790 $as_echo "$JVM_VARIANTS" >&6; }
16791 
16792   # Check that the selected variants are valid
16793 
16794   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16795   # Notice that the original variant failes on SLES 10 and 11
16796   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16797   STACK=${JVM_VARIANTS// /$'\n'}
16798   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16799   if test "x$INVALID_VARIANTS" != x; then
16800     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16801 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16802     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16803   fi
16804 
16805   # All "special" variants share the same output directory ("server")
16806   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16807   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16808   STACK=${JVM_VARIANTS// /$'\n'}
16809   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16810   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16811     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16812   fi
16813 
16814   # The "main" variant is the one used by other libs to link against during the
16815   # build.
16816   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16817     MAIN_VARIANT_PRIO_ORDER="server client minimal"
16818     for variant in $MAIN_VARIANT_PRIO_ORDER; do
16819       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16820         JVM_VARIANT_MAIN="$variant"
16821         break
16822       fi
16823     done
16824   else
16825     JVM_VARIANT_MAIN="$JVM_VARIANTS"
16826   fi
16827 
16828 
16829 
16830 
16831 
16832   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16833     # zero behaves as a platform and rewrites these values. This is really weird. :(
16834     # We are guaranteed that we do not build any other variants when building zero.
16835     HOTSPOT_TARGET_CPU=zero
16836     HOTSPOT_TARGET_CPU_ARCH=zero
16837   fi
16838 
16839 
16840 # With basic setup done, call the custom early hook.
16841 
16842 
16843 # Check if we have devkits, extra paths or sysroot set.
16844 
16845 
16846 # Check whether --with-devkit was given.
16847 if test "${with_devkit+set}" = set; then :
16848   withval=$with_devkit;
16849 
16850   # Only process if variable expands to non-empty
16851 
16852   if test "x$with_devkit" != x; then
16853     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16854 
16855   # Input might be given as Windows format, start by converting to
16856   # unix format.
16857   path="$with_devkit"
16858   new_path=`$CYGPATH -u "$path"`
16859 
16860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16863   # "foo.exe" is OK but "foo" is an error.
16864   #
16865   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16866   # It is also a way to make sure we got the proper file name for the real test later on.
16867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16868   if test "x$test_shortpath" = x; then
16869     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16870 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16871     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16872   fi
16873 
16874   # Call helper function which possibly converts this using DOS-style short mode.
16875   # If so, the updated path is stored in $new_path.
16876 
16877   input_path="$new_path"
16878   # Check if we need to convert this using DOS-style short mode. If the path
16879   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16880   # take no chances and rewrite it.
16881   # Note: m4 eats our [], so we need to use [ and ] instead.
16882   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16883   if test "x$has_forbidden_chars" != x; then
16884     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16885     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16886     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16887     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16888       # Going to short mode and back again did indeed matter. Since short mode is
16889       # case insensitive, let's make it lowercase to improve readability.
16890       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16891       # Now convert it back to Unix-style (cygpath)
16892       input_path=`$CYGPATH -u "$shortmode_path"`
16893       new_path="$input_path"
16894     fi
16895   fi
16896 
16897   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16898   if test "x$test_cygdrive_prefix" = x; then
16899     # As a simple fix, exclude /usr/bin since it's not a real path.
16900     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16901       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16902       # a path prefixed by /cygdrive for fixpath to work.
16903       new_path="$CYGWIN_ROOT_PATH$input_path"
16904     fi
16905   fi
16906 
16907 
16908   if test "x$path" != "x$new_path"; then
16909     with_devkit="$new_path"
16910     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16911 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16912   fi
16913 
16914     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16915 
16916   path="$with_devkit"
16917   has_colon=`$ECHO $path | $GREP ^.:`
16918   new_path="$path"
16919   if test "x$has_colon" = x; then
16920     # Not in mixed or Windows style, start by that.
16921     new_path=`cmd //c echo $path`
16922   fi
16923 
16924 
16925   input_path="$new_path"
16926   # Check if we need to convert this using DOS-style short mode. If the path
16927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16928   # take no chances and rewrite it.
16929   # Note: m4 eats our [], so we need to use [ and ] instead.
16930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16931   if test "x$has_forbidden_chars" != x; then
16932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16933     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16934   fi
16935 
16936 
16937   windows_path="$new_path"
16938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939     unix_path=`$CYGPATH -u "$windows_path"`
16940     new_path="$unix_path"
16941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16943     new_path="$unix_path"
16944   fi
16945 
16946   if test "x$path" != "x$new_path"; then
16947     with_devkit="$new_path"
16948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16949 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16950   fi
16951 
16952   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16953   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16954 
16955     else
16956       # We're on a unix platform. Hooray! :)
16957       path="$with_devkit"
16958       has_space=`$ECHO "$path" | $GREP " "`
16959       if test "x$has_space" != x; then
16960         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16961 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16962         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16963       fi
16964 
16965       # Use eval to expand a potential ~
16966       eval path="$path"
16967       if test ! -f "$path" && test ! -d "$path"; then
16968         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16969       fi
16970 
16971       if test -d "$path"; then
16972         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16973       else
16974         dir="`$DIRNAME "$path"`"
16975         base="`$BASENAME "$path"`"
16976         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16977       fi
16978     fi
16979   fi
16980 
16981         DEVKIT_ROOT="$with_devkit"
16982         # Check for a meta data info file in the root of the devkit
16983         if test -f "$DEVKIT_ROOT/devkit.info"; then
16984           . $DEVKIT_ROOT/devkit.info
16985           # This potentially sets the following:
16986           # A descriptive name of the devkit
16987 
16988   if test "x$DEVKIT_NAME" = x; then
16989     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16990   fi
16991 
16992           # Corresponds to --with-extra-path
16993 
16994   if test "x$DEVKIT_EXTRA_PATH" = x; then
16995     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16996   fi
16997 
16998           # Corresponds to --with-toolchain-path
16999 
17000   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17001     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17002   fi
17003 
17004           # Corresponds to --with-sysroot
17005 
17006   if test "x$DEVKIT_SYSROOT" = x; then
17007     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17008   fi
17009 
17010 
17011           # Identifies the Visual Studio version in the devkit
17012 
17013   if test "x$DEVKIT_VS_VERSION" = x; then
17014     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17015   fi
17016 
17017           # The Visual Studio include environment variable
17018 
17019   if test "x$DEVKIT_VS_INCLUDE" = x; then
17020     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17021   fi
17022 
17023           # The Visual Studio lib environment variable
17024 
17025   if test "x$DEVKIT_VS_LIB" = x; then
17026     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17027   fi
17028 
17029           # Corresponds to --with-msvcr-dll
17030 
17031   if test "x$DEVKIT_MSVCR_DLL" = x; then
17032     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17033   fi
17034 
17035           # Corresponds to --with-msvcp-dll
17036 
17037   if test "x$DEVKIT_MSVCP_DLL" = x; then
17038     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17039   fi
17040 
17041         fi
17042 
17043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17044 $as_echo_n "checking for devkit... " >&6; }
17045         if test "x$DEVKIT_NAME" != x; then
17046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17047 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17048         else
17049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17050 $as_echo "$DEVKIT_ROOT" >&6; }
17051         fi
17052 
17053 
17054   if test "x$DEVKIT_EXTRA_PATH" != x; then
17055     if test "x$EXTRA_PATH" = x; then
17056       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17057     else
17058       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17059     fi
17060   fi
17061 
17062 
17063         # Fallback default of just /bin if DEVKIT_PATH is not defined
17064         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17065           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17066         fi
17067 
17068   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17069     if test "x$TOOLCHAIN_PATH" = x; then
17070       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17071     else
17072       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17073     fi
17074   fi
17075 
17076 
17077         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17078         # places for backwards compatiblity.
17079         if test "x$DEVKIT_SYSROOT" != x; then
17080           SYSROOT="$DEVKIT_SYSROOT"
17081         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17082           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17083         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17084           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17085         fi
17086 
17087 
17088 fi
17089 
17090 
17091   # You can force the sysroot if the sysroot encoded into the compiler tools
17092   # is not correct.
17093 
17094 # Check whether --with-sys-root was given.
17095 if test "${with_sys_root+set}" = set; then :
17096   withval=$with_sys_root; SYSROOT=$with_sys_root
17097 
17098 fi
17099 
17100 
17101 
17102 # Check whether --with-sysroot was given.
17103 if test "${with_sysroot+set}" = set; then :
17104   withval=$with_sysroot; SYSROOT=$with_sysroot
17105 
17106 fi
17107 
17108 
17109 
17110 # Check whether --with-tools-dir was given.
17111 if test "${with_tools_dir+set}" = set; then :
17112   withval=$with_tools_dir;
17113   if test "x$with_tools_dir" != x; then
17114     if test "x$TOOLCHAIN_PATH" = x; then
17115       TOOLCHAIN_PATH="$with_tools_dir"
17116     else
17117       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17118     fi
17119   fi
17120 
17121 
17122 fi
17123 
17124 
17125 
17126 # Check whether --with-toolchain-path was given.
17127 if test "${with_toolchain_path+set}" = set; then :
17128   withval=$with_toolchain_path;
17129   if test "x$with_toolchain_path" != x; then
17130     if test "x$TOOLCHAIN_PATH" = x; then
17131       TOOLCHAIN_PATH="$with_toolchain_path"
17132     else
17133       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17134     fi
17135   fi
17136 
17137 
17138 fi
17139 
17140 
17141 
17142 # Check whether --with-extra-path was given.
17143 if test "${with_extra_path+set}" = set; then :
17144   withval=$with_extra_path;
17145   if test "x$with_extra_path" != x; then
17146     if test "x$EXTRA_PATH" = x; then
17147       EXTRA_PATH="$with_extra_path"
17148     else
17149       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17150     fi
17151   fi
17152 
17153 
17154 fi
17155 
17156 
17157   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17158     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17159     # If not, detect if Xcode is installed by running xcodebuild -version
17160     # if no Xcode installed, xcodebuild exits with 1
17161     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17162     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17163       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17164       # fall back on the stub binary in /usr/bin/xcodebuild
17165       # Extract the first word of "xcodebuild", so it can be a program name with args.
17166 set dummy xcodebuild; ac_word=$2
17167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17168 $as_echo_n "checking for $ac_word... " >&6; }
17169 if ${ac_cv_path_XCODEBUILD+:} false; then :
17170   $as_echo_n "(cached) " >&6
17171 else
17172   case $XCODEBUILD in
17173   [\\/]* | ?:[\\/]*)
17174   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17175   ;;
17176   *)
17177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17178 for as_dir in $TOOLCHAIN_PATH
17179 do
17180   IFS=$as_save_IFS
17181   test -z "$as_dir" && as_dir=.
17182     for ac_exec_ext in '' $ac_executable_extensions; do
17183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17184     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17186     break 2
17187   fi
17188 done
17189   done
17190 IFS=$as_save_IFS
17191 
17192   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17193   ;;
17194 esac
17195 fi
17196 XCODEBUILD=$ac_cv_path_XCODEBUILD
17197 if test -n "$XCODEBUILD"; then
17198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17199 $as_echo "$XCODEBUILD" >&6; }
17200 else
17201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17202 $as_echo "no" >&6; }
17203 fi
17204 
17205 
17206     else
17207       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17208       # when only the command line tools are installed there are no SDKs, so headers
17209       # are copied into the system frameworks
17210       XCODEBUILD=
17211 
17212     fi
17213 
17214     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17215 $as_echo_n "checking for sdk name... " >&6; }
17216 
17217 # Check whether --with-sdk-name was given.
17218 if test "${with_sdk_name+set}" = set; then :
17219   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17220 
17221 fi
17222 
17223     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17224 $as_echo "$SDKNAME" >&6; }
17225 
17226     # if toolchain path is specified then don't rely on system headers, they may not compile
17227     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17228     test -z "$TOOLCHAIN_PATH" && \
17229       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17230 
17231     if test -z "$SYSROOT"; then
17232       if test -n "$XCODEBUILD"; then
17233         # if we don't have system headers, use default SDK name (last resort)
17234         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17235           SDKNAME=${SDKNAME:-macosx}
17236         fi
17237 
17238         if test -n "$SDKNAME"; then
17239           # Call xcodebuild to determine SYSROOT
17240           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17241         fi
17242       else
17243         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17244           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
17245         fi
17246       fi
17247     else
17248       # warn user if --with-sdk-name was also set
17249       if test -n "$with_sdk_name"; then
17250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17251 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17252       fi
17253     fi
17254 
17255     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17256       # If no system framework headers, then SYSROOT must be set, or we won't build
17257       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
17258     fi
17259 
17260     # Perform a basic sanity test
17261     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17262       if test -z "$SYSROOT"; then
17263         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
17264       else
17265         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17266       fi
17267     fi
17268 
17269     # set SDKROOT too, Xcode tools will pick it up
17270     SDKROOT=$SYSROOT
17271 
17272   fi
17273 
17274   # Prepend the extra path to the global path
17275 
17276   if test "x$EXTRA_PATH" != x; then
17277     if test "x$PATH" = x; then
17278       PATH="$EXTRA_PATH"
17279     else
17280       PATH="$EXTRA_PATH:$PATH"
17281     fi
17282   fi
17283 
17284 
17285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17286 $as_echo_n "checking for sysroot... " >&6; }
17287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17288 $as_echo "$SYSROOT" >&6; }
17289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17290 $as_echo_n "checking for toolchain path... " >&6; }
17291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17292 $as_echo "$TOOLCHAIN_PATH" >&6; }
17293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17294 $as_echo_n "checking for extra path... " >&6; }
17295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17296 $as_echo "$EXTRA_PATH" >&6; }
17297 
17298 
17299 # To properly create a configuration name, we need to have the OpenJDK target
17300 # and options (variants and debug level) parsed.
17301 
17302 
17303 
17304 # Check whether --with-conf-name was given.
17305 if test "${with_conf_name+set}" = set; then :
17306   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17307 fi
17308 
17309 
17310   # Test from where we are running configure, in or outside of src root.
17311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17312 $as_echo_n "checking where to store configuration... " >&6; }
17313   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17314       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17315       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17316     # We are running configure from the src root.
17317     # Create a default ./build/target-variant-debuglevel output root.
17318     if test "x${CONF_NAME}" = x; then
17319       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17320 $as_echo "in default location" >&6; }
17321       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17322     else
17323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17324 $as_echo "in build directory with custom name" >&6; }
17325     fi
17326     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17327     $MKDIR -p "$OUTPUT_ROOT"
17328     if test ! -d "$OUTPUT_ROOT"; then
17329       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17330     fi
17331   else
17332     # We are running configure from outside of the src dir.
17333     # Then use the current directory as output dir!
17334     # If configuration is situated in normal build directory, just use the build
17335     # directory name as configuration name, otherwise use the complete path.
17336     if test "x${CONF_NAME}" = x; then
17337       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17338     fi
17339     OUTPUT_ROOT="$CURDIR"
17340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17341 $as_echo "in current directory" >&6; }
17342 
17343     # WARNING: This might be a bad thing to do. You need to be sure you want to
17344     # have a configuration in this directory. Do some sanity checks!
17345 
17346     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17347       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17348       # other files
17349       files_present=`$LS $OUTPUT_ROOT`
17350       # Configure has already touched config.log and confdefs.h in the current dir when this check
17351       # is performed.
17352       filtered_files=`$ECHO "$files_present" \
17353           | $SED -e 's/config.log//g' \
17354               -e 's/configure.log//g' \
17355               -e 's/confdefs.h//g' \
17356               -e 's/ //g' \
17357           | $TR -d '\n'`
17358       if test "x$filtered_files" != x; then
17359         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17360 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17361         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17362 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17363         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17364 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17365         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17366 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17367         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17368 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17369         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17370 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17371         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17372 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17373         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17374       fi
17375     fi
17376   fi
17377   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17378 $as_echo_n "checking what configuration name to use... " >&6; }
17379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17380 $as_echo "$CONF_NAME" >&6; }
17381 
17382 
17383   # Only process if variable expands to non-empty
17384 
17385   if test "x$OUTPUT_ROOT" != x; then
17386     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17387 
17388   # Input might be given as Windows format, start by converting to
17389   # unix format.
17390   path="$OUTPUT_ROOT"
17391   new_path=`$CYGPATH -u "$path"`
17392 
17393   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17394   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17395   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17396   # "foo.exe" is OK but "foo" is an error.
17397   #
17398   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17399   # It is also a way to make sure we got the proper file name for the real test later on.
17400   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17401   if test "x$test_shortpath" = x; then
17402     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17403 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17404     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17405   fi
17406 
17407   # Call helper function which possibly converts this using DOS-style short mode.
17408   # If so, the updated path is stored in $new_path.
17409 
17410   input_path="$new_path"
17411   # Check if we need to convert this using DOS-style short mode. If the path
17412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17413   # take no chances and rewrite it.
17414   # Note: m4 eats our [], so we need to use [ and ] instead.
17415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17416   if test "x$has_forbidden_chars" != x; then
17417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17421       # Going to short mode and back again did indeed matter. Since short mode is
17422       # case insensitive, let's make it lowercase to improve readability.
17423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17424       # Now convert it back to Unix-style (cygpath)
17425       input_path=`$CYGPATH -u "$shortmode_path"`
17426       new_path="$input_path"
17427     fi
17428   fi
17429 
17430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17431   if test "x$test_cygdrive_prefix" = x; then
17432     # As a simple fix, exclude /usr/bin since it's not a real path.
17433     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17435       # a path prefixed by /cygdrive for fixpath to work.
17436       new_path="$CYGWIN_ROOT_PATH$input_path"
17437     fi
17438   fi
17439 
17440 
17441   if test "x$path" != "x$new_path"; then
17442     OUTPUT_ROOT="$new_path"
17443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17444 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17445   fi
17446 
17447     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17448 
17449   path="$OUTPUT_ROOT"
17450   has_colon=`$ECHO $path | $GREP ^.:`
17451   new_path="$path"
17452   if test "x$has_colon" = x; then
17453     # Not in mixed or Windows style, start by that.
17454     new_path=`cmd //c echo $path`
17455   fi
17456 
17457 
17458   input_path="$new_path"
17459   # Check if we need to convert this using DOS-style short mode. If the path
17460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17461   # take no chances and rewrite it.
17462   # Note: m4 eats our [], so we need to use [ and ] instead.
17463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17464   if test "x$has_forbidden_chars" != x; then
17465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17466     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17467   fi
17468 
17469 
17470   windows_path="$new_path"
17471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17472     unix_path=`$CYGPATH -u "$windows_path"`
17473     new_path="$unix_path"
17474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17476     new_path="$unix_path"
17477   fi
17478 
17479   if test "x$path" != "x$new_path"; then
17480     OUTPUT_ROOT="$new_path"
17481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17482 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17483   fi
17484 
17485   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17486   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17487 
17488     else
17489       # We're on a unix platform. Hooray! :)
17490       path="$OUTPUT_ROOT"
17491       has_space=`$ECHO "$path" | $GREP " "`
17492       if test "x$has_space" != x; then
17493         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17494 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17495         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17496       fi
17497 
17498       # Use eval to expand a potential ~
17499       eval path="$path"
17500       if test ! -f "$path" && test ! -d "$path"; then
17501         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17502       fi
17503 
17504       if test -d "$path"; then
17505         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17506       else
17507         dir="`$DIRNAME "$path"`"
17508         base="`$BASENAME "$path"`"
17509         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17510       fi
17511     fi
17512   fi
17513 
17514 
17515   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17516   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17517 
17518   SPEC=$OUTPUT_ROOT/spec.gmk
17519 
17520   CONF_NAME=$CONF_NAME
17521 
17522   OUTPUT_ROOT=$OUTPUT_ROOT
17523 
17524 
17525 
17526   # The spec.gmk file contains all variables for the make system.
17527   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17528 
17529   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17530   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17531 
17532   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17533   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17534 
17535   # The compare.sh is used to compare the build output to other builds.
17536   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17537 
17538   # The generated Makefile knows where the spec.gmk is and where the source is.
17539   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17540   # which will look for generated configurations
17541   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17542 
17543 
17544 
17545 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17546 
17547   for ac_prog in apt-get yum port pkgutil pkgadd
17548 do
17549   # Extract the first word of "$ac_prog", so it can be a program name with args.
17550 set dummy $ac_prog; ac_word=$2
17551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17552 $as_echo_n "checking for $ac_word... " >&6; }
17553 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17554   $as_echo_n "(cached) " >&6
17555 else
17556   if test -n "$PKGHANDLER"; then
17557   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17558 else
17559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17560 for as_dir in $PATH
17561 do
17562   IFS=$as_save_IFS
17563   test -z "$as_dir" && as_dir=.
17564     for ac_exec_ext in '' $ac_executable_extensions; do
17565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17566     ac_cv_prog_PKGHANDLER="$ac_prog"
17567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17568     break 2
17569   fi
17570 done
17571   done
17572 IFS=$as_save_IFS
17573 
17574 fi
17575 fi
17576 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17577 if test -n "$PKGHANDLER"; then
17578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17579 $as_echo "$PKGHANDLER" >&6; }
17580 else
17581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17582 $as_echo "no" >&6; }
17583 fi
17584 
17585 
17586   test -n "$PKGHANDLER" && break
17587 done
17588 
17589 
17590 
17591 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17592 
17593 
17594 
17595   # Publish this variable in the help.
17596 
17597 
17598   if [ -z "${MAKE+x}" ]; then
17599     # The variable is not set by user, try to locate tool using the code snippet
17600 
17601     # Try our hardest to locate a correct version of GNU make
17602     for ac_prog in gmake
17603 do
17604   # Extract the first word of "$ac_prog", so it can be a program name with args.
17605 set dummy $ac_prog; ac_word=$2
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17607 $as_echo_n "checking for $ac_word... " >&6; }
17608 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17609   $as_echo_n "(cached) " >&6
17610 else
17611   case $CHECK_GMAKE in
17612   [\\/]* | ?:[\\/]*)
17613   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17614   ;;
17615   *)
17616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17617 for as_dir in $PATH
17618 do
17619   IFS=$as_save_IFS
17620   test -z "$as_dir" && as_dir=.
17621     for ac_exec_ext in '' $ac_executable_extensions; do
17622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17623     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17625     break 2
17626   fi
17627 done
17628   done
17629 IFS=$as_save_IFS
17630 
17631   ;;
17632 esac
17633 fi
17634 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17635 if test -n "$CHECK_GMAKE"; then
17636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17637 $as_echo "$CHECK_GMAKE" >&6; }
17638 else
17639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17640 $as_echo "no" >&6; }
17641 fi
17642 
17643 
17644   test -n "$CHECK_GMAKE" && break
17645 done
17646 
17647 
17648   MAKE_CANDIDATE=""$CHECK_GMAKE""
17649   DESCRIPTION="gmake in PATH"
17650 
17651   # On Cygwin, we require a newer version of make than on other platforms
17652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17653     MAKE_VERSION_EXPR="-e 4\."
17654     MAKE_REQUIRED_VERSION="4.0"
17655    else
17656     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17657     MAKE_REQUIRED_VERSION="3.81"
17658   fi
17659 
17660   if test "x$MAKE_CANDIDATE" != x; then
17661     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17662 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17663     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17664     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17665     if test "x$IS_GNU_MAKE" = x; then
17666       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17667 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17668     else
17669       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17670       if test "x$IS_MODERN_MAKE" = x; then
17671         { $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
17672 $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;}
17673       else
17674         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17675           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17676             MAKE_EXPECTED_ENV='cygwin'
17677           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17678             MAKE_EXPECTED_ENV='msys'
17679           else
17680             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17681           fi
17682           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17683           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17684         else
17685           # Not relevant for non-Windows
17686           IS_MAKE_CORRECT_ENV=true
17687         fi
17688         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17689           { $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
17690 $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;}
17691         else
17692           FOUND_MAKE=$MAKE_CANDIDATE
17693 
17694   # Only process if variable expands to non-empty
17695 
17696   if test "x$FOUND_MAKE" != x; then
17697     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17698 
17699   # First separate the path from the arguments. This will split at the first
17700   # space.
17701   complete="$FOUND_MAKE"
17702   path="${complete%% *}"
17703   tmp="$complete EOL"
17704   arguments="${tmp#* }"
17705 
17706   # Input might be given as Windows format, start by converting to
17707   # unix format.
17708   new_path=`$CYGPATH -u "$path"`
17709 
17710   # Now try to locate executable using which
17711   new_path=`$WHICH "$new_path" 2> /dev/null`
17712   # bat and cmd files are not always considered executable in cygwin causing which
17713   # to not find them
17714   if test "x$new_path" = x \
17715       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17716       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17717     new_path=`$CYGPATH -u "$path"`
17718   fi
17719   if test "x$new_path" = x; then
17720     # Oops. Which didn't find the executable.
17721     # The splitting of arguments from the executable at a space might have been incorrect,
17722     # since paths with space are more likely in Windows. Give it another try with the whole
17723     # argument.
17724     path="$complete"
17725     arguments="EOL"
17726     new_path=`$CYGPATH -u "$path"`
17727     new_path=`$WHICH "$new_path" 2> /dev/null`
17728     # bat and cmd files are not always considered executable in cygwin causing which
17729     # to not find them
17730     if test "x$new_path" = x \
17731         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17732         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17733       new_path=`$CYGPATH -u "$path"`
17734     fi
17735     if test "x$new_path" = x; then
17736       # It's still not found. Now this is an unrecoverable error.
17737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17738 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17739       has_space=`$ECHO "$complete" | $GREP " "`
17740       if test "x$has_space" != x; then
17741         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17742 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17743       fi
17744       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17745     fi
17746   fi
17747 
17748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17751   # "foo.exe" is OK but "foo" is an error.
17752   #
17753   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17754   # It is also a way to make sure we got the proper file name for the real test later on.
17755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17756   if test "x$test_shortpath" = x; then
17757     # Short path failed, file does not exist as specified.
17758     # Try adding .exe or .cmd
17759     if test -f "${new_path}.exe"; then
17760       input_to_shortpath="${new_path}.exe"
17761     elif test -f "${new_path}.cmd"; then
17762       input_to_shortpath="${new_path}.cmd"
17763     else
17764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17765 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17766       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17767 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17768       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17769     fi
17770   else
17771     input_to_shortpath="$new_path"
17772   fi
17773 
17774   # Call helper function which possibly converts this using DOS-style short mode.
17775   # If so, the updated path is stored in $new_path.
17776   new_path="$input_to_shortpath"
17777 
17778   input_path="$input_to_shortpath"
17779   # Check if we need to convert this using DOS-style short mode. If the path
17780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17781   # take no chances and rewrite it.
17782   # Note: m4 eats our [], so we need to use [ and ] instead.
17783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17784   if test "x$has_forbidden_chars" != x; then
17785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17789       # Going to short mode and back again did indeed matter. Since short mode is
17790       # case insensitive, let's make it lowercase to improve readability.
17791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17792       # Now convert it back to Unix-style (cygpath)
17793       input_path=`$CYGPATH -u "$shortmode_path"`
17794       new_path="$input_path"
17795     fi
17796   fi
17797 
17798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17799   if test "x$test_cygdrive_prefix" = x; then
17800     # As a simple fix, exclude /usr/bin since it's not a real path.
17801     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17803       # a path prefixed by /cygdrive for fixpath to work.
17804       new_path="$CYGWIN_ROOT_PATH$input_path"
17805     fi
17806   fi
17807 
17808   # remove trailing .exe if any
17809   new_path="${new_path/%.exe/}"
17810 
17811     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17812 
17813   # First separate the path from the arguments. This will split at the first
17814   # space.
17815   complete="$FOUND_MAKE"
17816   path="${complete%% *}"
17817   tmp="$complete EOL"
17818   arguments="${tmp#* }"
17819 
17820   # Input might be given as Windows format, start by converting to
17821   # unix format.
17822   new_path="$path"
17823 
17824   windows_path="$new_path"
17825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17826     unix_path=`$CYGPATH -u "$windows_path"`
17827     new_path="$unix_path"
17828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17830     new_path="$unix_path"
17831   fi
17832 
17833 
17834   # Now try to locate executable using which
17835   new_path=`$WHICH "$new_path" 2> /dev/null`
17836 
17837   if test "x$new_path" = x; then
17838     # Oops. Which didn't find the executable.
17839     # The splitting of arguments from the executable at a space might have been incorrect,
17840     # since paths with space are more likely in Windows. Give it another try with the whole
17841     # argument.
17842     path="$complete"
17843     arguments="EOL"
17844     new_path="$path"
17845 
17846   windows_path="$new_path"
17847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17848     unix_path=`$CYGPATH -u "$windows_path"`
17849     new_path="$unix_path"
17850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17852     new_path="$unix_path"
17853   fi
17854 
17855 
17856     new_path=`$WHICH "$new_path" 2> /dev/null`
17857     # bat and cmd files are not always considered executable in MSYS causing which
17858     # to not find them
17859     if test "x$new_path" = x \
17860         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17861         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17862       new_path="$path"
17863 
17864   windows_path="$new_path"
17865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17866     unix_path=`$CYGPATH -u "$windows_path"`
17867     new_path="$unix_path"
17868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17870     new_path="$unix_path"
17871   fi
17872 
17873     fi
17874 
17875     if test "x$new_path" = x; then
17876       # It's still not found. Now this is an unrecoverable error.
17877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17878 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17879       has_space=`$ECHO "$complete" | $GREP " "`
17880       if test "x$has_space" != x; then
17881         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17882 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17883       fi
17884       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17885     fi
17886   fi
17887 
17888   # Now new_path has a complete unix path to the binary
17889   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17890     # Keep paths in /bin as-is, but remove trailing .exe if any
17891     new_path="${new_path/%.exe/}"
17892     # Do not save /bin paths to all_fixpath_prefixes!
17893   else
17894     # Not in mixed or Windows style, start by that.
17895     new_path=`cmd //c echo $new_path`
17896 
17897   input_path="$new_path"
17898   # Check if we need to convert this using DOS-style short mode. If the path
17899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17900   # take no chances and rewrite it.
17901   # Note: m4 eats our [], so we need to use [ and ] instead.
17902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17903   if test "x$has_forbidden_chars" != x; then
17904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17906   fi
17907 
17908     # Output is in $new_path
17909 
17910   windows_path="$new_path"
17911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17912     unix_path=`$CYGPATH -u "$windows_path"`
17913     new_path="$unix_path"
17914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17916     new_path="$unix_path"
17917   fi
17918 
17919     # remove trailing .exe if any
17920     new_path="${new_path/%.exe/}"
17921 
17922     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17923     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17924   fi
17925 
17926     else
17927       # We're on a unix platform. Hooray! :)
17928       # First separate the path from the arguments. This will split at the first
17929       # space.
17930       complete="$FOUND_MAKE"
17931       path="${complete%% *}"
17932       tmp="$complete EOL"
17933       arguments="${tmp#* }"
17934 
17935       # Cannot rely on the command "which" here since it doesn't always work.
17936       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17937       if test -z "$is_absolute_path"; then
17938         # Path to executable is not absolute. Find it.
17939         IFS_save="$IFS"
17940         IFS=:
17941         for p in $PATH; do
17942           if test -f "$p/$path" && test -x "$p/$path"; then
17943             new_path="$p/$path"
17944             break
17945           fi
17946         done
17947         IFS="$IFS_save"
17948       else
17949         # This is an absolute path, we can use it without further modifications.
17950         new_path="$path"
17951       fi
17952 
17953       if test "x$new_path" = x; then
17954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17955 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17956         has_space=`$ECHO "$complete" | $GREP " "`
17957         if test "x$has_space" != x; then
17958           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17959 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17960         fi
17961         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17962       fi
17963     fi
17964 
17965     # Now join together the path and the arguments once again
17966     if test "x$arguments" != xEOL; then
17967       new_complete="$new_path ${arguments% *}"
17968     else
17969       new_complete="$new_path"
17970     fi
17971 
17972     if test "x$complete" != "x$new_complete"; then
17973       FOUND_MAKE="$new_complete"
17974       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17975 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17976     fi
17977   fi
17978 
17979         fi
17980       fi
17981     fi
17982   fi
17983 
17984 
17985     if test "x$FOUND_MAKE" = x; then
17986       for ac_prog in make
17987 do
17988   # Extract the first word of "$ac_prog", so it can be a program name with args.
17989 set dummy $ac_prog; ac_word=$2
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17991 $as_echo_n "checking for $ac_word... " >&6; }
17992 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17993   $as_echo_n "(cached) " >&6
17994 else
17995   case $CHECK_MAKE in
17996   [\\/]* | ?:[\\/]*)
17997   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17998   ;;
17999   *)
18000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18001 for as_dir in $PATH
18002 do
18003   IFS=$as_save_IFS
18004   test -z "$as_dir" && as_dir=.
18005     for ac_exec_ext in '' $ac_executable_extensions; do
18006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18007     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18009     break 2
18010   fi
18011 done
18012   done
18013 IFS=$as_save_IFS
18014 
18015   ;;
18016 esac
18017 fi
18018 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18019 if test -n "$CHECK_MAKE"; then
18020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18021 $as_echo "$CHECK_MAKE" >&6; }
18022 else
18023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18024 $as_echo "no" >&6; }
18025 fi
18026 
18027 
18028   test -n "$CHECK_MAKE" && break
18029 done
18030 
18031 
18032   MAKE_CANDIDATE=""$CHECK_MAKE""
18033   DESCRIPTION="make in PATH"
18034 
18035   # On Cygwin, we require a newer version of make than on other platforms
18036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037     MAKE_VERSION_EXPR="-e 4\."
18038     MAKE_REQUIRED_VERSION="4.0"
18039    else
18040     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18041     MAKE_REQUIRED_VERSION="3.81"
18042   fi
18043 
18044   if test "x$MAKE_CANDIDATE" != x; then
18045     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18046 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18047     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18048     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18049     if test "x$IS_GNU_MAKE" = x; then
18050       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18051 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18052     else
18053       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18054       if test "x$IS_MODERN_MAKE" = x; then
18055         { $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
18056 $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;}
18057       else
18058         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18059           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18060             MAKE_EXPECTED_ENV='cygwin'
18061           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062             MAKE_EXPECTED_ENV='msys'
18063           else
18064             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18065           fi
18066           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18067           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18068         else
18069           # Not relevant for non-Windows
18070           IS_MAKE_CORRECT_ENV=true
18071         fi
18072         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18073           { $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
18074 $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;}
18075         else
18076           FOUND_MAKE=$MAKE_CANDIDATE
18077 
18078   # Only process if variable expands to non-empty
18079 
18080   if test "x$FOUND_MAKE" != x; then
18081     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18082 
18083   # First separate the path from the arguments. This will split at the first
18084   # space.
18085   complete="$FOUND_MAKE"
18086   path="${complete%% *}"
18087   tmp="$complete EOL"
18088   arguments="${tmp#* }"
18089 
18090   # Input might be given as Windows format, start by converting to
18091   # unix format.
18092   new_path=`$CYGPATH -u "$path"`
18093 
18094   # Now try to locate executable using which
18095   new_path=`$WHICH "$new_path" 2> /dev/null`
18096   # bat and cmd files are not always considered executable in cygwin causing which
18097   # to not find them
18098   if test "x$new_path" = x \
18099       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18100       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18101     new_path=`$CYGPATH -u "$path"`
18102   fi
18103   if test "x$new_path" = x; then
18104     # Oops. Which didn't find the executable.
18105     # The splitting of arguments from the executable at a space might have been incorrect,
18106     # since paths with space are more likely in Windows. Give it another try with the whole
18107     # argument.
18108     path="$complete"
18109     arguments="EOL"
18110     new_path=`$CYGPATH -u "$path"`
18111     new_path=`$WHICH "$new_path" 2> /dev/null`
18112     # bat and cmd files are not always considered executable in cygwin causing which
18113     # to not find them
18114     if test "x$new_path" = x \
18115         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18116         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18117       new_path=`$CYGPATH -u "$path"`
18118     fi
18119     if test "x$new_path" = x; then
18120       # It's still not found. Now this is an unrecoverable error.
18121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18122 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18123       has_space=`$ECHO "$complete" | $GREP " "`
18124       if test "x$has_space" != x; then
18125         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18126 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18127       fi
18128       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18129     fi
18130   fi
18131 
18132   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18133   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18134   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18135   # "foo.exe" is OK but "foo" is an error.
18136   #
18137   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18138   # It is also a way to make sure we got the proper file name for the real test later on.
18139   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18140   if test "x$test_shortpath" = x; then
18141     # Short path failed, file does not exist as specified.
18142     # Try adding .exe or .cmd
18143     if test -f "${new_path}.exe"; then
18144       input_to_shortpath="${new_path}.exe"
18145     elif test -f "${new_path}.cmd"; then
18146       input_to_shortpath="${new_path}.cmd"
18147     else
18148       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18149 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18150       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18151 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18152       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18153     fi
18154   else
18155     input_to_shortpath="$new_path"
18156   fi
18157 
18158   # Call helper function which possibly converts this using DOS-style short mode.
18159   # If so, the updated path is stored in $new_path.
18160   new_path="$input_to_shortpath"
18161 
18162   input_path="$input_to_shortpath"
18163   # Check if we need to convert this using DOS-style short mode. If the path
18164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18165   # take no chances and rewrite it.
18166   # Note: m4 eats our [], so we need to use [ and ] instead.
18167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18168   if test "x$has_forbidden_chars" != x; then
18169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18173       # Going to short mode and back again did indeed matter. Since short mode is
18174       # case insensitive, let's make it lowercase to improve readability.
18175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18176       # Now convert it back to Unix-style (cygpath)
18177       input_path=`$CYGPATH -u "$shortmode_path"`
18178       new_path="$input_path"
18179     fi
18180   fi
18181 
18182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18183   if test "x$test_cygdrive_prefix" = x; then
18184     # As a simple fix, exclude /usr/bin since it's not a real path.
18185     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18187       # a path prefixed by /cygdrive for fixpath to work.
18188       new_path="$CYGWIN_ROOT_PATH$input_path"
18189     fi
18190   fi
18191 
18192   # remove trailing .exe if any
18193   new_path="${new_path/%.exe/}"
18194 
18195     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18196 
18197   # First separate the path from the arguments. This will split at the first
18198   # space.
18199   complete="$FOUND_MAKE"
18200   path="${complete%% *}"
18201   tmp="$complete EOL"
18202   arguments="${tmp#* }"
18203 
18204   # Input might be given as Windows format, start by converting to
18205   # unix format.
18206   new_path="$path"
18207 
18208   windows_path="$new_path"
18209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18210     unix_path=`$CYGPATH -u "$windows_path"`
18211     new_path="$unix_path"
18212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18214     new_path="$unix_path"
18215   fi
18216 
18217 
18218   # Now try to locate executable using which
18219   new_path=`$WHICH "$new_path" 2> /dev/null`
18220 
18221   if test "x$new_path" = x; then
18222     # Oops. Which didn't find the executable.
18223     # The splitting of arguments from the executable at a space might have been incorrect,
18224     # since paths with space are more likely in Windows. Give it another try with the whole
18225     # argument.
18226     path="$complete"
18227     arguments="EOL"
18228     new_path="$path"
18229 
18230   windows_path="$new_path"
18231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18232     unix_path=`$CYGPATH -u "$windows_path"`
18233     new_path="$unix_path"
18234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18236     new_path="$unix_path"
18237   fi
18238 
18239 
18240     new_path=`$WHICH "$new_path" 2> /dev/null`
18241     # bat and cmd files are not always considered executable in MSYS causing which
18242     # to not find them
18243     if test "x$new_path" = x \
18244         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18245         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18246       new_path="$path"
18247 
18248   windows_path="$new_path"
18249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18250     unix_path=`$CYGPATH -u "$windows_path"`
18251     new_path="$unix_path"
18252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18254     new_path="$unix_path"
18255   fi
18256 
18257     fi
18258 
18259     if test "x$new_path" = x; then
18260       # It's still not found. Now this is an unrecoverable error.
18261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18262 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18263       has_space=`$ECHO "$complete" | $GREP " "`
18264       if test "x$has_space" != x; then
18265         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18266 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18267       fi
18268       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18269     fi
18270   fi
18271 
18272   # Now new_path has a complete unix path to the binary
18273   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18274     # Keep paths in /bin as-is, but remove trailing .exe if any
18275     new_path="${new_path/%.exe/}"
18276     # Do not save /bin paths to all_fixpath_prefixes!
18277   else
18278     # Not in mixed or Windows style, start by that.
18279     new_path=`cmd //c echo $new_path`
18280 
18281   input_path="$new_path"
18282   # Check if we need to convert this using DOS-style short mode. If the path
18283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18284   # take no chances and rewrite it.
18285   # Note: m4 eats our [], so we need to use [ and ] instead.
18286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18287   if test "x$has_forbidden_chars" != x; then
18288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18290   fi
18291 
18292     # Output is in $new_path
18293 
18294   windows_path="$new_path"
18295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18296     unix_path=`$CYGPATH -u "$windows_path"`
18297     new_path="$unix_path"
18298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18300     new_path="$unix_path"
18301   fi
18302 
18303     # remove trailing .exe if any
18304     new_path="${new_path/%.exe/}"
18305 
18306     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18307     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18308   fi
18309 
18310     else
18311       # We're on a unix platform. Hooray! :)
18312       # First separate the path from the arguments. This will split at the first
18313       # space.
18314       complete="$FOUND_MAKE"
18315       path="${complete%% *}"
18316       tmp="$complete EOL"
18317       arguments="${tmp#* }"
18318 
18319       # Cannot rely on the command "which" here since it doesn't always work.
18320       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18321       if test -z "$is_absolute_path"; then
18322         # Path to executable is not absolute. Find it.
18323         IFS_save="$IFS"
18324         IFS=:
18325         for p in $PATH; do
18326           if test -f "$p/$path" && test -x "$p/$path"; then
18327             new_path="$p/$path"
18328             break
18329           fi
18330         done
18331         IFS="$IFS_save"
18332       else
18333         # This is an absolute path, we can use it without further modifications.
18334         new_path="$path"
18335       fi
18336 
18337       if test "x$new_path" = x; then
18338         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18339 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18340         has_space=`$ECHO "$complete" | $GREP " "`
18341         if test "x$has_space" != x; then
18342           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18343 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18344         fi
18345         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18346       fi
18347     fi
18348 
18349     # Now join together the path and the arguments once again
18350     if test "x$arguments" != xEOL; then
18351       new_complete="$new_path ${arguments% *}"
18352     else
18353       new_complete="$new_path"
18354     fi
18355 
18356     if test "x$complete" != "x$new_complete"; then
18357       FOUND_MAKE="$new_complete"
18358       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18359 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18360     fi
18361   fi
18362 
18363         fi
18364       fi
18365     fi
18366   fi
18367 
18368     fi
18369 
18370     if test "x$FOUND_MAKE" = x; then
18371       if test "x$TOOLCHAIN_PATH" != x; then
18372         # We have a toolchain path, check that as well before giving up.
18373         OLD_PATH=$PATH
18374         PATH=$TOOLCHAIN_PATH:$PATH
18375         for ac_prog in gmake
18376 do
18377   # Extract the first word of "$ac_prog", so it can be a program name with args.
18378 set dummy $ac_prog; ac_word=$2
18379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18380 $as_echo_n "checking for $ac_word... " >&6; }
18381 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18382   $as_echo_n "(cached) " >&6
18383 else
18384   case $CHECK_TOOLSDIR_GMAKE in
18385   [\\/]* | ?:[\\/]*)
18386   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18387   ;;
18388   *)
18389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18390 for as_dir in $PATH
18391 do
18392   IFS=$as_save_IFS
18393   test -z "$as_dir" && as_dir=.
18394     for ac_exec_ext in '' $ac_executable_extensions; do
18395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18396     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18398     break 2
18399   fi
18400 done
18401   done
18402 IFS=$as_save_IFS
18403 
18404   ;;
18405 esac
18406 fi
18407 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18408 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18410 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18411 else
18412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18413 $as_echo "no" >&6; }
18414 fi
18415 
18416 
18417   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18418 done
18419 
18420 
18421   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18422   DESCRIPTION="gmake in tools-dir"
18423 
18424   # On Cygwin, we require a newer version of make than on other platforms
18425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426     MAKE_VERSION_EXPR="-e 4\."
18427     MAKE_REQUIRED_VERSION="4.0"
18428    else
18429     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18430     MAKE_REQUIRED_VERSION="3.81"
18431   fi
18432 
18433   if test "x$MAKE_CANDIDATE" != x; then
18434     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18435 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18436     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18437     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18438     if test "x$IS_GNU_MAKE" = x; then
18439       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18440 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18441     else
18442       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18443       if test "x$IS_MODERN_MAKE" = x; then
18444         { $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
18445 $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;}
18446       else
18447         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18448           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18449             MAKE_EXPECTED_ENV='cygwin'
18450           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18451             MAKE_EXPECTED_ENV='msys'
18452           else
18453             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18454           fi
18455           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18456           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18457         else
18458           # Not relevant for non-Windows
18459           IS_MAKE_CORRECT_ENV=true
18460         fi
18461         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18462           { $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
18463 $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;}
18464         else
18465           FOUND_MAKE=$MAKE_CANDIDATE
18466 
18467   # Only process if variable expands to non-empty
18468 
18469   if test "x$FOUND_MAKE" != x; then
18470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18471 
18472   # First separate the path from the arguments. This will split at the first
18473   # space.
18474   complete="$FOUND_MAKE"
18475   path="${complete%% *}"
18476   tmp="$complete EOL"
18477   arguments="${tmp#* }"
18478 
18479   # Input might be given as Windows format, start by converting to
18480   # unix format.
18481   new_path=`$CYGPATH -u "$path"`
18482 
18483   # Now try to locate executable using which
18484   new_path=`$WHICH "$new_path" 2> /dev/null`
18485   # bat and cmd files are not always considered executable in cygwin causing which
18486   # to not find them
18487   if test "x$new_path" = x \
18488       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18489       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18490     new_path=`$CYGPATH -u "$path"`
18491   fi
18492   if test "x$new_path" = x; then
18493     # Oops. Which didn't find the executable.
18494     # The splitting of arguments from the executable at a space might have been incorrect,
18495     # since paths with space are more likely in Windows. Give it another try with the whole
18496     # argument.
18497     path="$complete"
18498     arguments="EOL"
18499     new_path=`$CYGPATH -u "$path"`
18500     new_path=`$WHICH "$new_path" 2> /dev/null`
18501     # bat and cmd files are not always considered executable in cygwin causing which
18502     # to not find them
18503     if test "x$new_path" = x \
18504         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18505         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18506       new_path=`$CYGPATH -u "$path"`
18507     fi
18508     if test "x$new_path" = x; then
18509       # It's still not found. Now this is an unrecoverable error.
18510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18511 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18512       has_space=`$ECHO "$complete" | $GREP " "`
18513       if test "x$has_space" != x; then
18514         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18515 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18516       fi
18517       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18518     fi
18519   fi
18520 
18521   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18522   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18523   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18524   # "foo.exe" is OK but "foo" is an error.
18525   #
18526   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18527   # It is also a way to make sure we got the proper file name for the real test later on.
18528   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18529   if test "x$test_shortpath" = x; then
18530     # Short path failed, file does not exist as specified.
18531     # Try adding .exe or .cmd
18532     if test -f "${new_path}.exe"; then
18533       input_to_shortpath="${new_path}.exe"
18534     elif test -f "${new_path}.cmd"; then
18535       input_to_shortpath="${new_path}.cmd"
18536     else
18537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18538 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18539       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18540 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18541       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18542     fi
18543   else
18544     input_to_shortpath="$new_path"
18545   fi
18546 
18547   # Call helper function which possibly converts this using DOS-style short mode.
18548   # If so, the updated path is stored in $new_path.
18549   new_path="$input_to_shortpath"
18550 
18551   input_path="$input_to_shortpath"
18552   # Check if we need to convert this using DOS-style short mode. If the path
18553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18554   # take no chances and rewrite it.
18555   # Note: m4 eats our [], so we need to use [ and ] instead.
18556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18557   if test "x$has_forbidden_chars" != x; then
18558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18559     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18560     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18561     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18562       # Going to short mode and back again did indeed matter. Since short mode is
18563       # case insensitive, let's make it lowercase to improve readability.
18564       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18565       # Now convert it back to Unix-style (cygpath)
18566       input_path=`$CYGPATH -u "$shortmode_path"`
18567       new_path="$input_path"
18568     fi
18569   fi
18570 
18571   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18572   if test "x$test_cygdrive_prefix" = x; then
18573     # As a simple fix, exclude /usr/bin since it's not a real path.
18574     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18575       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18576       # a path prefixed by /cygdrive for fixpath to work.
18577       new_path="$CYGWIN_ROOT_PATH$input_path"
18578     fi
18579   fi
18580 
18581   # remove trailing .exe if any
18582   new_path="${new_path/%.exe/}"
18583 
18584     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18585 
18586   # First separate the path from the arguments. This will split at the first
18587   # space.
18588   complete="$FOUND_MAKE"
18589   path="${complete%% *}"
18590   tmp="$complete EOL"
18591   arguments="${tmp#* }"
18592 
18593   # Input might be given as Windows format, start by converting to
18594   # unix format.
18595   new_path="$path"
18596 
18597   windows_path="$new_path"
18598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18599     unix_path=`$CYGPATH -u "$windows_path"`
18600     new_path="$unix_path"
18601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18603     new_path="$unix_path"
18604   fi
18605 
18606 
18607   # Now try to locate executable using which
18608   new_path=`$WHICH "$new_path" 2> /dev/null`
18609 
18610   if test "x$new_path" = x; then
18611     # Oops. Which didn't find the executable.
18612     # The splitting of arguments from the executable at a space might have been incorrect,
18613     # since paths with space are more likely in Windows. Give it another try with the whole
18614     # argument.
18615     path="$complete"
18616     arguments="EOL"
18617     new_path="$path"
18618 
18619   windows_path="$new_path"
18620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18621     unix_path=`$CYGPATH -u "$windows_path"`
18622     new_path="$unix_path"
18623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18625     new_path="$unix_path"
18626   fi
18627 
18628 
18629     new_path=`$WHICH "$new_path" 2> /dev/null`
18630     # bat and cmd files are not always considered executable in MSYS causing which
18631     # to not find them
18632     if test "x$new_path" = x \
18633         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18634         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18635       new_path="$path"
18636 
18637   windows_path="$new_path"
18638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18639     unix_path=`$CYGPATH -u "$windows_path"`
18640     new_path="$unix_path"
18641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18643     new_path="$unix_path"
18644   fi
18645 
18646     fi
18647 
18648     if test "x$new_path" = x; then
18649       # It's still not found. Now this is an unrecoverable error.
18650       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18651 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18652       has_space=`$ECHO "$complete" | $GREP " "`
18653       if test "x$has_space" != x; then
18654         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18655 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18656       fi
18657       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18658     fi
18659   fi
18660 
18661   # Now new_path has a complete unix path to the binary
18662   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18663     # Keep paths in /bin as-is, but remove trailing .exe if any
18664     new_path="${new_path/%.exe/}"
18665     # Do not save /bin paths to all_fixpath_prefixes!
18666   else
18667     # Not in mixed or Windows style, start by that.
18668     new_path=`cmd //c echo $new_path`
18669 
18670   input_path="$new_path"
18671   # Check if we need to convert this using DOS-style short mode. If the path
18672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18673   # take no chances and rewrite it.
18674   # Note: m4 eats our [], so we need to use [ and ] instead.
18675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18676   if test "x$has_forbidden_chars" != x; then
18677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18678     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18679   fi
18680 
18681     # Output is in $new_path
18682 
18683   windows_path="$new_path"
18684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18685     unix_path=`$CYGPATH -u "$windows_path"`
18686     new_path="$unix_path"
18687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18689     new_path="$unix_path"
18690   fi
18691 
18692     # remove trailing .exe if any
18693     new_path="${new_path/%.exe/}"
18694 
18695     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18696     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18697   fi
18698 
18699     else
18700       # We're on a unix platform. Hooray! :)
18701       # First separate the path from the arguments. This will split at the first
18702       # space.
18703       complete="$FOUND_MAKE"
18704       path="${complete%% *}"
18705       tmp="$complete EOL"
18706       arguments="${tmp#* }"
18707 
18708       # Cannot rely on the command "which" here since it doesn't always work.
18709       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18710       if test -z "$is_absolute_path"; then
18711         # Path to executable is not absolute. Find it.
18712         IFS_save="$IFS"
18713         IFS=:
18714         for p in $PATH; do
18715           if test -f "$p/$path" && test -x "$p/$path"; then
18716             new_path="$p/$path"
18717             break
18718           fi
18719         done
18720         IFS="$IFS_save"
18721       else
18722         # This is an absolute path, we can use it without further modifications.
18723         new_path="$path"
18724       fi
18725 
18726       if test "x$new_path" = x; then
18727         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18728 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18729         has_space=`$ECHO "$complete" | $GREP " "`
18730         if test "x$has_space" != x; then
18731           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18732 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18733         fi
18734         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18735       fi
18736     fi
18737 
18738     # Now join together the path and the arguments once again
18739     if test "x$arguments" != xEOL; then
18740       new_complete="$new_path ${arguments% *}"
18741     else
18742       new_complete="$new_path"
18743     fi
18744 
18745     if test "x$complete" != "x$new_complete"; then
18746       FOUND_MAKE="$new_complete"
18747       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18748 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18749     fi
18750   fi
18751 
18752         fi
18753       fi
18754     fi
18755   fi
18756 
18757         if test "x$FOUND_MAKE" = x; then
18758           for ac_prog in make
18759 do
18760   # Extract the first word of "$ac_prog", so it can be a program name with args.
18761 set dummy $ac_prog; ac_word=$2
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18763 $as_echo_n "checking for $ac_word... " >&6; }
18764 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18765   $as_echo_n "(cached) " >&6
18766 else
18767   case $CHECK_TOOLSDIR_MAKE in
18768   [\\/]* | ?:[\\/]*)
18769   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18770   ;;
18771   *)
18772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18773 for as_dir in $PATH
18774 do
18775   IFS=$as_save_IFS
18776   test -z "$as_dir" && as_dir=.
18777     for ac_exec_ext in '' $ac_executable_extensions; do
18778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18779     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18781     break 2
18782   fi
18783 done
18784   done
18785 IFS=$as_save_IFS
18786 
18787   ;;
18788 esac
18789 fi
18790 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18791 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18793 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18794 else
18795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18796 $as_echo "no" >&6; }
18797 fi
18798 
18799 
18800   test -n "$CHECK_TOOLSDIR_MAKE" && break
18801 done
18802 
18803 
18804   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18805   DESCRIPTION="make in tools-dir"
18806 
18807   # On Cygwin, we require a newer version of make than on other platforms
18808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809     MAKE_VERSION_EXPR="-e 4\."
18810     MAKE_REQUIRED_VERSION="4.0"
18811    else
18812     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18813     MAKE_REQUIRED_VERSION="3.81"
18814   fi
18815 
18816   if test "x$MAKE_CANDIDATE" != x; then
18817     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18818 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18819     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18820     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18821     if test "x$IS_GNU_MAKE" = x; then
18822       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18823 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18824     else
18825       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18826       if test "x$IS_MODERN_MAKE" = x; then
18827         { $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
18828 $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;}
18829       else
18830         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18831           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18832             MAKE_EXPECTED_ENV='cygwin'
18833           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18834             MAKE_EXPECTED_ENV='msys'
18835           else
18836             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18837           fi
18838           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18839           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18840         else
18841           # Not relevant for non-Windows
18842           IS_MAKE_CORRECT_ENV=true
18843         fi
18844         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18845           { $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
18846 $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;}
18847         else
18848           FOUND_MAKE=$MAKE_CANDIDATE
18849 
18850   # Only process if variable expands to non-empty
18851 
18852   if test "x$FOUND_MAKE" != x; then
18853     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18854 
18855   # First separate the path from the arguments. This will split at the first
18856   # space.
18857   complete="$FOUND_MAKE"
18858   path="${complete%% *}"
18859   tmp="$complete EOL"
18860   arguments="${tmp#* }"
18861 
18862   # Input might be given as Windows format, start by converting to
18863   # unix format.
18864   new_path=`$CYGPATH -u "$path"`
18865 
18866   # Now try to locate executable using which
18867   new_path=`$WHICH "$new_path" 2> /dev/null`
18868   # bat and cmd files are not always considered executable in cygwin causing which
18869   # to not find them
18870   if test "x$new_path" = x \
18871       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18872       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18873     new_path=`$CYGPATH -u "$path"`
18874   fi
18875   if test "x$new_path" = x; then
18876     # Oops. Which didn't find the executable.
18877     # The splitting of arguments from the executable at a space might have been incorrect,
18878     # since paths with space are more likely in Windows. Give it another try with the whole
18879     # argument.
18880     path="$complete"
18881     arguments="EOL"
18882     new_path=`$CYGPATH -u "$path"`
18883     new_path=`$WHICH "$new_path" 2> /dev/null`
18884     # bat and cmd files are not always considered executable in cygwin causing which
18885     # to not find them
18886     if test "x$new_path" = x \
18887         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18888         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18889       new_path=`$CYGPATH -u "$path"`
18890     fi
18891     if test "x$new_path" = x; then
18892       # It's still not found. Now this is an unrecoverable error.
18893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18894 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18895       has_space=`$ECHO "$complete" | $GREP " "`
18896       if test "x$has_space" != x; then
18897         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18898 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18899       fi
18900       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18901     fi
18902   fi
18903 
18904   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18905   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18906   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18907   # "foo.exe" is OK but "foo" is an error.
18908   #
18909   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18910   # It is also a way to make sure we got the proper file name for the real test later on.
18911   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18912   if test "x$test_shortpath" = x; then
18913     # Short path failed, file does not exist as specified.
18914     # Try adding .exe or .cmd
18915     if test -f "${new_path}.exe"; then
18916       input_to_shortpath="${new_path}.exe"
18917     elif test -f "${new_path}.cmd"; then
18918       input_to_shortpath="${new_path}.cmd"
18919     else
18920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18921 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18922       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18923 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18924       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18925     fi
18926   else
18927     input_to_shortpath="$new_path"
18928   fi
18929 
18930   # Call helper function which possibly converts this using DOS-style short mode.
18931   # If so, the updated path is stored in $new_path.
18932   new_path="$input_to_shortpath"
18933 
18934   input_path="$input_to_shortpath"
18935   # Check if we need to convert this using DOS-style short mode. If the path
18936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18937   # take no chances and rewrite it.
18938   # Note: m4 eats our [], so we need to use [ and ] instead.
18939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18940   if test "x$has_forbidden_chars" != x; then
18941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18945       # Going to short mode and back again did indeed matter. Since short mode is
18946       # case insensitive, let's make it lowercase to improve readability.
18947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18948       # Now convert it back to Unix-style (cygpath)
18949       input_path=`$CYGPATH -u "$shortmode_path"`
18950       new_path="$input_path"
18951     fi
18952   fi
18953 
18954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18955   if test "x$test_cygdrive_prefix" = x; then
18956     # As a simple fix, exclude /usr/bin since it's not a real path.
18957     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18959       # a path prefixed by /cygdrive for fixpath to work.
18960       new_path="$CYGWIN_ROOT_PATH$input_path"
18961     fi
18962   fi
18963 
18964   # remove trailing .exe if any
18965   new_path="${new_path/%.exe/}"
18966 
18967     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18968 
18969   # First separate the path from the arguments. This will split at the first
18970   # space.
18971   complete="$FOUND_MAKE"
18972   path="${complete%% *}"
18973   tmp="$complete EOL"
18974   arguments="${tmp#* }"
18975 
18976   # Input might be given as Windows format, start by converting to
18977   # unix format.
18978   new_path="$path"
18979 
18980   windows_path="$new_path"
18981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18982     unix_path=`$CYGPATH -u "$windows_path"`
18983     new_path="$unix_path"
18984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18986     new_path="$unix_path"
18987   fi
18988 
18989 
18990   # Now try to locate executable using which
18991   new_path=`$WHICH "$new_path" 2> /dev/null`
18992 
18993   if test "x$new_path" = x; then
18994     # Oops. Which didn't find the executable.
18995     # The splitting of arguments from the executable at a space might have been incorrect,
18996     # since paths with space are more likely in Windows. Give it another try with the whole
18997     # argument.
18998     path="$complete"
18999     arguments="EOL"
19000     new_path="$path"
19001 
19002   windows_path="$new_path"
19003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19004     unix_path=`$CYGPATH -u "$windows_path"`
19005     new_path="$unix_path"
19006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19008     new_path="$unix_path"
19009   fi
19010 
19011 
19012     new_path=`$WHICH "$new_path" 2> /dev/null`
19013     # bat and cmd files are not always considered executable in MSYS causing which
19014     # to not find them
19015     if test "x$new_path" = x \
19016         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19017         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19018       new_path="$path"
19019 
19020   windows_path="$new_path"
19021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19022     unix_path=`$CYGPATH -u "$windows_path"`
19023     new_path="$unix_path"
19024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19026     new_path="$unix_path"
19027   fi
19028 
19029     fi
19030 
19031     if test "x$new_path" = x; then
19032       # It's still not found. Now this is an unrecoverable error.
19033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19034 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19035       has_space=`$ECHO "$complete" | $GREP " "`
19036       if test "x$has_space" != x; then
19037         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19038 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19039       fi
19040       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19041     fi
19042   fi
19043 
19044   # Now new_path has a complete unix path to the binary
19045   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19046     # Keep paths in /bin as-is, but remove trailing .exe if any
19047     new_path="${new_path/%.exe/}"
19048     # Do not save /bin paths to all_fixpath_prefixes!
19049   else
19050     # Not in mixed or Windows style, start by that.
19051     new_path=`cmd //c echo $new_path`
19052 
19053   input_path="$new_path"
19054   # Check if we need to convert this using DOS-style short mode. If the path
19055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19056   # take no chances and rewrite it.
19057   # Note: m4 eats our [], so we need to use [ and ] instead.
19058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19059   if test "x$has_forbidden_chars" != x; then
19060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19061     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19062   fi
19063 
19064     # Output is in $new_path
19065 
19066   windows_path="$new_path"
19067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19068     unix_path=`$CYGPATH -u "$windows_path"`
19069     new_path="$unix_path"
19070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19072     new_path="$unix_path"
19073   fi
19074 
19075     # remove trailing .exe if any
19076     new_path="${new_path/%.exe/}"
19077 
19078     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19079     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19080   fi
19081 
19082     else
19083       # We're on a unix platform. Hooray! :)
19084       # First separate the path from the arguments. This will split at the first
19085       # space.
19086       complete="$FOUND_MAKE"
19087       path="${complete%% *}"
19088       tmp="$complete EOL"
19089       arguments="${tmp#* }"
19090 
19091       # Cannot rely on the command "which" here since it doesn't always work.
19092       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19093       if test -z "$is_absolute_path"; then
19094         # Path to executable is not absolute. Find it.
19095         IFS_save="$IFS"
19096         IFS=:
19097         for p in $PATH; do
19098           if test -f "$p/$path" && test -x "$p/$path"; then
19099             new_path="$p/$path"
19100             break
19101           fi
19102         done
19103         IFS="$IFS_save"
19104       else
19105         # This is an absolute path, we can use it without further modifications.
19106         new_path="$path"
19107       fi
19108 
19109       if test "x$new_path" = x; then
19110         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19111 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19112         has_space=`$ECHO "$complete" | $GREP " "`
19113         if test "x$has_space" != x; then
19114           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19115 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19116         fi
19117         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19118       fi
19119     fi
19120 
19121     # Now join together the path and the arguments once again
19122     if test "x$arguments" != xEOL; then
19123       new_complete="$new_path ${arguments% *}"
19124     else
19125       new_complete="$new_path"
19126     fi
19127 
19128     if test "x$complete" != "x$new_complete"; then
19129       FOUND_MAKE="$new_complete"
19130       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19131 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19132     fi
19133   fi
19134 
19135         fi
19136       fi
19137     fi
19138   fi
19139 
19140         fi
19141         PATH=$OLD_PATH
19142       fi
19143     fi
19144 
19145     if test "x$FOUND_MAKE" = x; then
19146       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
19147     fi
19148 
19149   else
19150     # The variable is set, but is it from the command line or the environment?
19151 
19152     # Try to remove the string !MAKE! from our list.
19153     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19154     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19155       # If it failed, the variable was not from the command line. Ignore it,
19156       # but warn the user (except for BASH, which is always set by the calling BASH).
19157       if test "xMAKE" != xBASH; then
19158         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19159 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19160       fi
19161       # Try to locate tool using the code snippet
19162 
19163     # Try our hardest to locate a correct version of GNU make
19164     for ac_prog in gmake
19165 do
19166   # Extract the first word of "$ac_prog", so it can be a program name with args.
19167 set dummy $ac_prog; ac_word=$2
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19169 $as_echo_n "checking for $ac_word... " >&6; }
19170 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19171   $as_echo_n "(cached) " >&6
19172 else
19173   case $CHECK_GMAKE in
19174   [\\/]* | ?:[\\/]*)
19175   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19176   ;;
19177   *)
19178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19179 for as_dir in $PATH
19180 do
19181   IFS=$as_save_IFS
19182   test -z "$as_dir" && as_dir=.
19183     for ac_exec_ext in '' $ac_executable_extensions; do
19184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19185     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19187     break 2
19188   fi
19189 done
19190   done
19191 IFS=$as_save_IFS
19192 
19193   ;;
19194 esac
19195 fi
19196 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19197 if test -n "$CHECK_GMAKE"; then
19198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19199 $as_echo "$CHECK_GMAKE" >&6; }
19200 else
19201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19202 $as_echo "no" >&6; }
19203 fi
19204 
19205 
19206   test -n "$CHECK_GMAKE" && break
19207 done
19208 
19209 
19210   MAKE_CANDIDATE=""$CHECK_GMAKE""
19211   DESCRIPTION="gmake in PATH"
19212 
19213   # On Cygwin, we require a newer version of make than on other platforms
19214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215     MAKE_VERSION_EXPR="-e 4\."
19216     MAKE_REQUIRED_VERSION="4.0"
19217    else
19218     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19219     MAKE_REQUIRED_VERSION="3.81"
19220   fi
19221 
19222   if test "x$MAKE_CANDIDATE" != x; then
19223     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19224 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19225     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19226     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19227     if test "x$IS_GNU_MAKE" = x; then
19228       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19229 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19230     else
19231       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19232       if test "x$IS_MODERN_MAKE" = x; then
19233         { $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
19234 $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;}
19235       else
19236         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19237           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19238             MAKE_EXPECTED_ENV='cygwin'
19239           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19240             MAKE_EXPECTED_ENV='msys'
19241           else
19242             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19243           fi
19244           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19245           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19246         else
19247           # Not relevant for non-Windows
19248           IS_MAKE_CORRECT_ENV=true
19249         fi
19250         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19251           { $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
19252 $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;}
19253         else
19254           FOUND_MAKE=$MAKE_CANDIDATE
19255 
19256   # Only process if variable expands to non-empty
19257 
19258   if test "x$FOUND_MAKE" != x; then
19259     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19260 
19261   # First separate the path from the arguments. This will split at the first
19262   # space.
19263   complete="$FOUND_MAKE"
19264   path="${complete%% *}"
19265   tmp="$complete EOL"
19266   arguments="${tmp#* }"
19267 
19268   # Input might be given as Windows format, start by converting to
19269   # unix format.
19270   new_path=`$CYGPATH -u "$path"`
19271 
19272   # Now try to locate executable using which
19273   new_path=`$WHICH "$new_path" 2> /dev/null`
19274   # bat and cmd files are not always considered executable in cygwin causing which
19275   # to not find them
19276   if test "x$new_path" = x \
19277       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19278       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19279     new_path=`$CYGPATH -u "$path"`
19280   fi
19281   if test "x$new_path" = x; then
19282     # Oops. Which didn't find the executable.
19283     # The splitting of arguments from the executable at a space might have been incorrect,
19284     # since paths with space are more likely in Windows. Give it another try with the whole
19285     # argument.
19286     path="$complete"
19287     arguments="EOL"
19288     new_path=`$CYGPATH -u "$path"`
19289     new_path=`$WHICH "$new_path" 2> /dev/null`
19290     # bat and cmd files are not always considered executable in cygwin causing which
19291     # to not find them
19292     if test "x$new_path" = x \
19293         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19294         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19295       new_path=`$CYGPATH -u "$path"`
19296     fi
19297     if test "x$new_path" = x; then
19298       # It's still not found. Now this is an unrecoverable error.
19299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19300 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19301       has_space=`$ECHO "$complete" | $GREP " "`
19302       if test "x$has_space" != x; then
19303         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19304 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19305       fi
19306       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19307     fi
19308   fi
19309 
19310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19313   # "foo.exe" is OK but "foo" is an error.
19314   #
19315   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19316   # It is also a way to make sure we got the proper file name for the real test later on.
19317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19318   if test "x$test_shortpath" = x; then
19319     # Short path failed, file does not exist as specified.
19320     # Try adding .exe or .cmd
19321     if test -f "${new_path}.exe"; then
19322       input_to_shortpath="${new_path}.exe"
19323     elif test -f "${new_path}.cmd"; then
19324       input_to_shortpath="${new_path}.cmd"
19325     else
19326       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19327 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19328       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19329 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19330       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19331     fi
19332   else
19333     input_to_shortpath="$new_path"
19334   fi
19335 
19336   # Call helper function which possibly converts this using DOS-style short mode.
19337   # If so, the updated path is stored in $new_path.
19338   new_path="$input_to_shortpath"
19339 
19340   input_path="$input_to_shortpath"
19341   # Check if we need to convert this using DOS-style short mode. If the path
19342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19343   # take no chances and rewrite it.
19344   # Note: m4 eats our [], so we need to use [ and ] instead.
19345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19346   if test "x$has_forbidden_chars" != x; then
19347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19351       # Going to short mode and back again did indeed matter. Since short mode is
19352       # case insensitive, let's make it lowercase to improve readability.
19353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19354       # Now convert it back to Unix-style (cygpath)
19355       input_path=`$CYGPATH -u "$shortmode_path"`
19356       new_path="$input_path"
19357     fi
19358   fi
19359 
19360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19361   if test "x$test_cygdrive_prefix" = x; then
19362     # As a simple fix, exclude /usr/bin since it's not a real path.
19363     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19365       # a path prefixed by /cygdrive for fixpath to work.
19366       new_path="$CYGWIN_ROOT_PATH$input_path"
19367     fi
19368   fi
19369 
19370   # remove trailing .exe if any
19371   new_path="${new_path/%.exe/}"
19372 
19373     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19374 
19375   # First separate the path from the arguments. This will split at the first
19376   # space.
19377   complete="$FOUND_MAKE"
19378   path="${complete%% *}"
19379   tmp="$complete EOL"
19380   arguments="${tmp#* }"
19381 
19382   # Input might be given as Windows format, start by converting to
19383   # unix format.
19384   new_path="$path"
19385 
19386   windows_path="$new_path"
19387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19388     unix_path=`$CYGPATH -u "$windows_path"`
19389     new_path="$unix_path"
19390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19392     new_path="$unix_path"
19393   fi
19394 
19395 
19396   # Now try to locate executable using which
19397   new_path=`$WHICH "$new_path" 2> /dev/null`
19398 
19399   if test "x$new_path" = x; then
19400     # Oops. Which didn't find the executable.
19401     # The splitting of arguments from the executable at a space might have been incorrect,
19402     # since paths with space are more likely in Windows. Give it another try with the whole
19403     # argument.
19404     path="$complete"
19405     arguments="EOL"
19406     new_path="$path"
19407 
19408   windows_path="$new_path"
19409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19410     unix_path=`$CYGPATH -u "$windows_path"`
19411     new_path="$unix_path"
19412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19414     new_path="$unix_path"
19415   fi
19416 
19417 
19418     new_path=`$WHICH "$new_path" 2> /dev/null`
19419     # bat and cmd files are not always considered executable in MSYS causing which
19420     # to not find them
19421     if test "x$new_path" = x \
19422         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19423         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19424       new_path="$path"
19425 
19426   windows_path="$new_path"
19427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19428     unix_path=`$CYGPATH -u "$windows_path"`
19429     new_path="$unix_path"
19430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19432     new_path="$unix_path"
19433   fi
19434 
19435     fi
19436 
19437     if test "x$new_path" = x; then
19438       # It's still not found. Now this is an unrecoverable error.
19439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19440 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19441       has_space=`$ECHO "$complete" | $GREP " "`
19442       if test "x$has_space" != x; then
19443         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19444 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19445       fi
19446       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19447     fi
19448   fi
19449 
19450   # Now new_path has a complete unix path to the binary
19451   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19452     # Keep paths in /bin as-is, but remove trailing .exe if any
19453     new_path="${new_path/%.exe/}"
19454     # Do not save /bin paths to all_fixpath_prefixes!
19455   else
19456     # Not in mixed or Windows style, start by that.
19457     new_path=`cmd //c echo $new_path`
19458 
19459   input_path="$new_path"
19460   # Check if we need to convert this using DOS-style short mode. If the path
19461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19462   # take no chances and rewrite it.
19463   # Note: m4 eats our [], so we need to use [ and ] instead.
19464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19465   if test "x$has_forbidden_chars" != x; then
19466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19468   fi
19469 
19470     # Output is in $new_path
19471 
19472   windows_path="$new_path"
19473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19474     unix_path=`$CYGPATH -u "$windows_path"`
19475     new_path="$unix_path"
19476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19478     new_path="$unix_path"
19479   fi
19480 
19481     # remove trailing .exe if any
19482     new_path="${new_path/%.exe/}"
19483 
19484     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19485     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19486   fi
19487 
19488     else
19489       # We're on a unix platform. Hooray! :)
19490       # First separate the path from the arguments. This will split at the first
19491       # space.
19492       complete="$FOUND_MAKE"
19493       path="${complete%% *}"
19494       tmp="$complete EOL"
19495       arguments="${tmp#* }"
19496 
19497       # Cannot rely on the command "which" here since it doesn't always work.
19498       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19499       if test -z "$is_absolute_path"; then
19500         # Path to executable is not absolute. Find it.
19501         IFS_save="$IFS"
19502         IFS=:
19503         for p in $PATH; do
19504           if test -f "$p/$path" && test -x "$p/$path"; then
19505             new_path="$p/$path"
19506             break
19507           fi
19508         done
19509         IFS="$IFS_save"
19510       else
19511         # This is an absolute path, we can use it without further modifications.
19512         new_path="$path"
19513       fi
19514 
19515       if test "x$new_path" = x; then
19516         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19518         has_space=`$ECHO "$complete" | $GREP " "`
19519         if test "x$has_space" != x; then
19520           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19521 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19522         fi
19523         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19524       fi
19525     fi
19526 
19527     # Now join together the path and the arguments once again
19528     if test "x$arguments" != xEOL; then
19529       new_complete="$new_path ${arguments% *}"
19530     else
19531       new_complete="$new_path"
19532     fi
19533 
19534     if test "x$complete" != "x$new_complete"; then
19535       FOUND_MAKE="$new_complete"
19536       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19537 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19538     fi
19539   fi
19540 
19541         fi
19542       fi
19543     fi
19544   fi
19545 
19546 
19547     if test "x$FOUND_MAKE" = x; then
19548       for ac_prog in make
19549 do
19550   # Extract the first word of "$ac_prog", so it can be a program name with args.
19551 set dummy $ac_prog; ac_word=$2
19552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19553 $as_echo_n "checking for $ac_word... " >&6; }
19554 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19555   $as_echo_n "(cached) " >&6
19556 else
19557   case $CHECK_MAKE in
19558   [\\/]* | ?:[\\/]*)
19559   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19560   ;;
19561   *)
19562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19563 for as_dir in $PATH
19564 do
19565   IFS=$as_save_IFS
19566   test -z "$as_dir" && as_dir=.
19567     for ac_exec_ext in '' $ac_executable_extensions; do
19568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19569     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19571     break 2
19572   fi
19573 done
19574   done
19575 IFS=$as_save_IFS
19576 
19577   ;;
19578 esac
19579 fi
19580 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19581 if test -n "$CHECK_MAKE"; then
19582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19583 $as_echo "$CHECK_MAKE" >&6; }
19584 else
19585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19586 $as_echo "no" >&6; }
19587 fi
19588 
19589 
19590   test -n "$CHECK_MAKE" && break
19591 done
19592 
19593 
19594   MAKE_CANDIDATE=""$CHECK_MAKE""
19595   DESCRIPTION="make in PATH"
19596 
19597   # On Cygwin, we require a newer version of make than on other platforms
19598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599     MAKE_VERSION_EXPR="-e 4\."
19600     MAKE_REQUIRED_VERSION="4.0"
19601    else
19602     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19603     MAKE_REQUIRED_VERSION="3.81"
19604   fi
19605 
19606   if test "x$MAKE_CANDIDATE" != x; then
19607     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19608 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19609     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19610     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19611     if test "x$IS_GNU_MAKE" = x; then
19612       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19613 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19614     else
19615       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19616       if test "x$IS_MODERN_MAKE" = x; then
19617         { $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
19618 $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;}
19619       else
19620         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19621           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19622             MAKE_EXPECTED_ENV='cygwin'
19623           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19624             MAKE_EXPECTED_ENV='msys'
19625           else
19626             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19627           fi
19628           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19629           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19630         else
19631           # Not relevant for non-Windows
19632           IS_MAKE_CORRECT_ENV=true
19633         fi
19634         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19635           { $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
19636 $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;}
19637         else
19638           FOUND_MAKE=$MAKE_CANDIDATE
19639 
19640   # Only process if variable expands to non-empty
19641 
19642   if test "x$FOUND_MAKE" != x; then
19643     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644 
19645   # First separate the path from the arguments. This will split at the first
19646   # space.
19647   complete="$FOUND_MAKE"
19648   path="${complete%% *}"
19649   tmp="$complete EOL"
19650   arguments="${tmp#* }"
19651 
19652   # Input might be given as Windows format, start by converting to
19653   # unix format.
19654   new_path=`$CYGPATH -u "$path"`
19655 
19656   # Now try to locate executable using which
19657   new_path=`$WHICH "$new_path" 2> /dev/null`
19658   # bat and cmd files are not always considered executable in cygwin causing which
19659   # to not find them
19660   if test "x$new_path" = x \
19661       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19662       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19663     new_path=`$CYGPATH -u "$path"`
19664   fi
19665   if test "x$new_path" = x; then
19666     # Oops. Which didn't find the executable.
19667     # The splitting of arguments from the executable at a space might have been incorrect,
19668     # since paths with space are more likely in Windows. Give it another try with the whole
19669     # argument.
19670     path="$complete"
19671     arguments="EOL"
19672     new_path=`$CYGPATH -u "$path"`
19673     new_path=`$WHICH "$new_path" 2> /dev/null`
19674     # bat and cmd files are not always considered executable in cygwin causing which
19675     # to not find them
19676     if test "x$new_path" = x \
19677         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19678         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19679       new_path=`$CYGPATH -u "$path"`
19680     fi
19681     if test "x$new_path" = x; then
19682       # It's still not found. Now this is an unrecoverable error.
19683       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19684 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19685       has_space=`$ECHO "$complete" | $GREP " "`
19686       if test "x$has_space" != x; then
19687         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19688 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19689       fi
19690       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19691     fi
19692   fi
19693 
19694   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19695   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19696   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19697   # "foo.exe" is OK but "foo" is an error.
19698   #
19699   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19700   # It is also a way to make sure we got the proper file name for the real test later on.
19701   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19702   if test "x$test_shortpath" = x; then
19703     # Short path failed, file does not exist as specified.
19704     # Try adding .exe or .cmd
19705     if test -f "${new_path}.exe"; then
19706       input_to_shortpath="${new_path}.exe"
19707     elif test -f "${new_path}.cmd"; then
19708       input_to_shortpath="${new_path}.cmd"
19709     else
19710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19711 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19712       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19713 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19714       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19715     fi
19716   else
19717     input_to_shortpath="$new_path"
19718   fi
19719 
19720   # Call helper function which possibly converts this using DOS-style short mode.
19721   # If so, the updated path is stored in $new_path.
19722   new_path="$input_to_shortpath"
19723 
19724   input_path="$input_to_shortpath"
19725   # Check if we need to convert this using DOS-style short mode. If the path
19726   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19727   # take no chances and rewrite it.
19728   # Note: m4 eats our [], so we need to use [ and ] instead.
19729   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19730   if test "x$has_forbidden_chars" != x; then
19731     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19732     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19733     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19734     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19735       # Going to short mode and back again did indeed matter. Since short mode is
19736       # case insensitive, let's make it lowercase to improve readability.
19737       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19738       # Now convert it back to Unix-style (cygpath)
19739       input_path=`$CYGPATH -u "$shortmode_path"`
19740       new_path="$input_path"
19741     fi
19742   fi
19743 
19744   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19745   if test "x$test_cygdrive_prefix" = x; then
19746     # As a simple fix, exclude /usr/bin since it's not a real path.
19747     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19748       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19749       # a path prefixed by /cygdrive for fixpath to work.
19750       new_path="$CYGWIN_ROOT_PATH$input_path"
19751     fi
19752   fi
19753 
19754   # remove trailing .exe if any
19755   new_path="${new_path/%.exe/}"
19756 
19757     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19758 
19759   # First separate the path from the arguments. This will split at the first
19760   # space.
19761   complete="$FOUND_MAKE"
19762   path="${complete%% *}"
19763   tmp="$complete EOL"
19764   arguments="${tmp#* }"
19765 
19766   # Input might be given as Windows format, start by converting to
19767   # unix format.
19768   new_path="$path"
19769 
19770   windows_path="$new_path"
19771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19772     unix_path=`$CYGPATH -u "$windows_path"`
19773     new_path="$unix_path"
19774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19776     new_path="$unix_path"
19777   fi
19778 
19779 
19780   # Now try to locate executable using which
19781   new_path=`$WHICH "$new_path" 2> /dev/null`
19782 
19783   if test "x$new_path" = x; then
19784     # Oops. Which didn't find the executable.
19785     # The splitting of arguments from the executable at a space might have been incorrect,
19786     # since paths with space are more likely in Windows. Give it another try with the whole
19787     # argument.
19788     path="$complete"
19789     arguments="EOL"
19790     new_path="$path"
19791 
19792   windows_path="$new_path"
19793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19794     unix_path=`$CYGPATH -u "$windows_path"`
19795     new_path="$unix_path"
19796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19798     new_path="$unix_path"
19799   fi
19800 
19801 
19802     new_path=`$WHICH "$new_path" 2> /dev/null`
19803     # bat and cmd files are not always considered executable in MSYS causing which
19804     # to not find them
19805     if test "x$new_path" = x \
19806         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19807         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19808       new_path="$path"
19809 
19810   windows_path="$new_path"
19811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19812     unix_path=`$CYGPATH -u "$windows_path"`
19813     new_path="$unix_path"
19814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19816     new_path="$unix_path"
19817   fi
19818 
19819     fi
19820 
19821     if test "x$new_path" = x; then
19822       # It's still not found. Now this is an unrecoverable error.
19823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19824 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19825       has_space=`$ECHO "$complete" | $GREP " "`
19826       if test "x$has_space" != x; then
19827         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19828 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19829       fi
19830       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19831     fi
19832   fi
19833 
19834   # Now new_path has a complete unix path to the binary
19835   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19836     # Keep paths in /bin as-is, but remove trailing .exe if any
19837     new_path="${new_path/%.exe/}"
19838     # Do not save /bin paths to all_fixpath_prefixes!
19839   else
19840     # Not in mixed or Windows style, start by that.
19841     new_path=`cmd //c echo $new_path`
19842 
19843   input_path="$new_path"
19844   # Check if we need to convert this using DOS-style short mode. If the path
19845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19846   # take no chances and rewrite it.
19847   # Note: m4 eats our [], so we need to use [ and ] instead.
19848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19849   if test "x$has_forbidden_chars" != x; then
19850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19851     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19852   fi
19853 
19854     # Output is in $new_path
19855 
19856   windows_path="$new_path"
19857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19858     unix_path=`$CYGPATH -u "$windows_path"`
19859     new_path="$unix_path"
19860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19862     new_path="$unix_path"
19863   fi
19864 
19865     # remove trailing .exe if any
19866     new_path="${new_path/%.exe/}"
19867 
19868     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19869     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19870   fi
19871 
19872     else
19873       # We're on a unix platform. Hooray! :)
19874       # First separate the path from the arguments. This will split at the first
19875       # space.
19876       complete="$FOUND_MAKE"
19877       path="${complete%% *}"
19878       tmp="$complete EOL"
19879       arguments="${tmp#* }"
19880 
19881       # Cannot rely on the command "which" here since it doesn't always work.
19882       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19883       if test -z "$is_absolute_path"; then
19884         # Path to executable is not absolute. Find it.
19885         IFS_save="$IFS"
19886         IFS=:
19887         for p in $PATH; do
19888           if test -f "$p/$path" && test -x "$p/$path"; then
19889             new_path="$p/$path"
19890             break
19891           fi
19892         done
19893         IFS="$IFS_save"
19894       else
19895         # This is an absolute path, we can use it without further modifications.
19896         new_path="$path"
19897       fi
19898 
19899       if test "x$new_path" = x; then
19900         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19901 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19902         has_space=`$ECHO "$complete" | $GREP " "`
19903         if test "x$has_space" != x; then
19904           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19905 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19906         fi
19907         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19908       fi
19909     fi
19910 
19911     # Now join together the path and the arguments once again
19912     if test "x$arguments" != xEOL; then
19913       new_complete="$new_path ${arguments% *}"
19914     else
19915       new_complete="$new_path"
19916     fi
19917 
19918     if test "x$complete" != "x$new_complete"; then
19919       FOUND_MAKE="$new_complete"
19920       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19921 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19922     fi
19923   fi
19924 
19925         fi
19926       fi
19927     fi
19928   fi
19929 
19930     fi
19931 
19932     if test "x$FOUND_MAKE" = x; then
19933       if test "x$TOOLCHAIN_PATH" != x; then
19934         # We have a toolchain path, check that as well before giving up.
19935         OLD_PATH=$PATH
19936         PATH=$TOOLCHAIN_PATH:$PATH
19937         for ac_prog in gmake
19938 do
19939   # Extract the first word of "$ac_prog", so it can be a program name with args.
19940 set dummy $ac_prog; ac_word=$2
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19942 $as_echo_n "checking for $ac_word... " >&6; }
19943 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19944   $as_echo_n "(cached) " >&6
19945 else
19946   case $CHECK_TOOLSDIR_GMAKE in
19947   [\\/]* | ?:[\\/]*)
19948   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19949   ;;
19950   *)
19951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19952 for as_dir in $PATH
19953 do
19954   IFS=$as_save_IFS
19955   test -z "$as_dir" && as_dir=.
19956     for ac_exec_ext in '' $ac_executable_extensions; do
19957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19958     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19960     break 2
19961   fi
19962 done
19963   done
19964 IFS=$as_save_IFS
19965 
19966   ;;
19967 esac
19968 fi
19969 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19970 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19972 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19973 else
19974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19975 $as_echo "no" >&6; }
19976 fi
19977 
19978 
19979   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19980 done
19981 
19982 
19983   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19984   DESCRIPTION="gmake in tools-dir"
19985 
19986   # On Cygwin, we require a newer version of make than on other platforms
19987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988     MAKE_VERSION_EXPR="-e 4\."
19989     MAKE_REQUIRED_VERSION="4.0"
19990    else
19991     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19992     MAKE_REQUIRED_VERSION="3.81"
19993   fi
19994 
19995   if test "x$MAKE_CANDIDATE" != x; then
19996     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19997 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19998     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19999     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20000     if test "x$IS_GNU_MAKE" = x; then
20001       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20002 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20003     else
20004       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20005       if test "x$IS_MODERN_MAKE" = x; then
20006         { $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
20007 $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;}
20008       else
20009         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20010           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20011             MAKE_EXPECTED_ENV='cygwin'
20012           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20013             MAKE_EXPECTED_ENV='msys'
20014           else
20015             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20016           fi
20017           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20018           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20019         else
20020           # Not relevant for non-Windows
20021           IS_MAKE_CORRECT_ENV=true
20022         fi
20023         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20024           { $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
20025 $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;}
20026         else
20027           FOUND_MAKE=$MAKE_CANDIDATE
20028 
20029   # Only process if variable expands to non-empty
20030 
20031   if test "x$FOUND_MAKE" != x; then
20032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20033 
20034   # First separate the path from the arguments. This will split at the first
20035   # space.
20036   complete="$FOUND_MAKE"
20037   path="${complete%% *}"
20038   tmp="$complete EOL"
20039   arguments="${tmp#* }"
20040 
20041   # Input might be given as Windows format, start by converting to
20042   # unix format.
20043   new_path=`$CYGPATH -u "$path"`
20044 
20045   # Now try to locate executable using which
20046   new_path=`$WHICH "$new_path" 2> /dev/null`
20047   # bat and cmd files are not always considered executable in cygwin causing which
20048   # to not find them
20049   if test "x$new_path" = x \
20050       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20051       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20052     new_path=`$CYGPATH -u "$path"`
20053   fi
20054   if test "x$new_path" = x; then
20055     # Oops. Which didn't find the executable.
20056     # The splitting of arguments from the executable at a space might have been incorrect,
20057     # since paths with space are more likely in Windows. Give it another try with the whole
20058     # argument.
20059     path="$complete"
20060     arguments="EOL"
20061     new_path=`$CYGPATH -u "$path"`
20062     new_path=`$WHICH "$new_path" 2> /dev/null`
20063     # bat and cmd files are not always considered executable in cygwin causing which
20064     # to not find them
20065     if test "x$new_path" = x \
20066         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20067         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20068       new_path=`$CYGPATH -u "$path"`
20069     fi
20070     if test "x$new_path" = x; then
20071       # It's still not found. Now this is an unrecoverable error.
20072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20073 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20074       has_space=`$ECHO "$complete" | $GREP " "`
20075       if test "x$has_space" != x; then
20076         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20078       fi
20079       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20080     fi
20081   fi
20082 
20083   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20084   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20085   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20086   # "foo.exe" is OK but "foo" is an error.
20087   #
20088   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20089   # It is also a way to make sure we got the proper file name for the real test later on.
20090   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20091   if test "x$test_shortpath" = x; then
20092     # Short path failed, file does not exist as specified.
20093     # Try adding .exe or .cmd
20094     if test -f "${new_path}.exe"; then
20095       input_to_shortpath="${new_path}.exe"
20096     elif test -f "${new_path}.cmd"; then
20097       input_to_shortpath="${new_path}.cmd"
20098     else
20099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20100 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20101       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20102 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20103       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20104     fi
20105   else
20106     input_to_shortpath="$new_path"
20107   fi
20108 
20109   # Call helper function which possibly converts this using DOS-style short mode.
20110   # If so, the updated path is stored in $new_path.
20111   new_path="$input_to_shortpath"
20112 
20113   input_path="$input_to_shortpath"
20114   # Check if we need to convert this using DOS-style short mode. If the path
20115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20116   # take no chances and rewrite it.
20117   # Note: m4 eats our [], so we need to use [ and ] instead.
20118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20119   if test "x$has_forbidden_chars" != x; then
20120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20121     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20122     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20123     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20124       # Going to short mode and back again did indeed matter. Since short mode is
20125       # case insensitive, let's make it lowercase to improve readability.
20126       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20127       # Now convert it back to Unix-style (cygpath)
20128       input_path=`$CYGPATH -u "$shortmode_path"`
20129       new_path="$input_path"
20130     fi
20131   fi
20132 
20133   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20134   if test "x$test_cygdrive_prefix" = x; then
20135     # As a simple fix, exclude /usr/bin since it's not a real path.
20136     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20137       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20138       # a path prefixed by /cygdrive for fixpath to work.
20139       new_path="$CYGWIN_ROOT_PATH$input_path"
20140     fi
20141   fi
20142 
20143   # remove trailing .exe if any
20144   new_path="${new_path/%.exe/}"
20145 
20146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20147 
20148   # First separate the path from the arguments. This will split at the first
20149   # space.
20150   complete="$FOUND_MAKE"
20151   path="${complete%% *}"
20152   tmp="$complete EOL"
20153   arguments="${tmp#* }"
20154 
20155   # Input might be given as Windows format, start by converting to
20156   # unix format.
20157   new_path="$path"
20158 
20159   windows_path="$new_path"
20160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20161     unix_path=`$CYGPATH -u "$windows_path"`
20162     new_path="$unix_path"
20163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20165     new_path="$unix_path"
20166   fi
20167 
20168 
20169   # Now try to locate executable using which
20170   new_path=`$WHICH "$new_path" 2> /dev/null`
20171 
20172   if test "x$new_path" = x; then
20173     # Oops. Which didn't find the executable.
20174     # The splitting of arguments from the executable at a space might have been incorrect,
20175     # since paths with space are more likely in Windows. Give it another try with the whole
20176     # argument.
20177     path="$complete"
20178     arguments="EOL"
20179     new_path="$path"
20180 
20181   windows_path="$new_path"
20182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20183     unix_path=`$CYGPATH -u "$windows_path"`
20184     new_path="$unix_path"
20185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20187     new_path="$unix_path"
20188   fi
20189 
20190 
20191     new_path=`$WHICH "$new_path" 2> /dev/null`
20192     # bat and cmd files are not always considered executable in MSYS causing which
20193     # to not find them
20194     if test "x$new_path" = x \
20195         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20196         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20197       new_path="$path"
20198 
20199   windows_path="$new_path"
20200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20201     unix_path=`$CYGPATH -u "$windows_path"`
20202     new_path="$unix_path"
20203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20205     new_path="$unix_path"
20206   fi
20207 
20208     fi
20209 
20210     if test "x$new_path" = x; then
20211       # It's still not found. Now this is an unrecoverable error.
20212       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20213 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20214       has_space=`$ECHO "$complete" | $GREP " "`
20215       if test "x$has_space" != x; then
20216         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20217 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20218       fi
20219       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20220     fi
20221   fi
20222 
20223   # Now new_path has a complete unix path to the binary
20224   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20225     # Keep paths in /bin as-is, but remove trailing .exe if any
20226     new_path="${new_path/%.exe/}"
20227     # Do not save /bin paths to all_fixpath_prefixes!
20228   else
20229     # Not in mixed or Windows style, start by that.
20230     new_path=`cmd //c echo $new_path`
20231 
20232   input_path="$new_path"
20233   # Check if we need to convert this using DOS-style short mode. If the path
20234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20235   # take no chances and rewrite it.
20236   # Note: m4 eats our [], so we need to use [ and ] instead.
20237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20238   if test "x$has_forbidden_chars" != x; then
20239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20240     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20241   fi
20242 
20243     # Output is in $new_path
20244 
20245   windows_path="$new_path"
20246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20247     unix_path=`$CYGPATH -u "$windows_path"`
20248     new_path="$unix_path"
20249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20251     new_path="$unix_path"
20252   fi
20253 
20254     # remove trailing .exe if any
20255     new_path="${new_path/%.exe/}"
20256 
20257     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20258     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20259   fi
20260 
20261     else
20262       # We're on a unix platform. Hooray! :)
20263       # First separate the path from the arguments. This will split at the first
20264       # space.
20265       complete="$FOUND_MAKE"
20266       path="${complete%% *}"
20267       tmp="$complete EOL"
20268       arguments="${tmp#* }"
20269 
20270       # Cannot rely on the command "which" here since it doesn't always work.
20271       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20272       if test -z "$is_absolute_path"; then
20273         # Path to executable is not absolute. Find it.
20274         IFS_save="$IFS"
20275         IFS=:
20276         for p in $PATH; do
20277           if test -f "$p/$path" && test -x "$p/$path"; then
20278             new_path="$p/$path"
20279             break
20280           fi
20281         done
20282         IFS="$IFS_save"
20283       else
20284         # This is an absolute path, we can use it without further modifications.
20285         new_path="$path"
20286       fi
20287 
20288       if test "x$new_path" = x; then
20289         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20290 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20291         has_space=`$ECHO "$complete" | $GREP " "`
20292         if test "x$has_space" != x; then
20293           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20294 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20295         fi
20296         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20297       fi
20298     fi
20299 
20300     # Now join together the path and the arguments once again
20301     if test "x$arguments" != xEOL; then
20302       new_complete="$new_path ${arguments% *}"
20303     else
20304       new_complete="$new_path"
20305     fi
20306 
20307     if test "x$complete" != "x$new_complete"; then
20308       FOUND_MAKE="$new_complete"
20309       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20310 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20311     fi
20312   fi
20313 
20314         fi
20315       fi
20316     fi
20317   fi
20318 
20319         if test "x$FOUND_MAKE" = x; then
20320           for ac_prog in make
20321 do
20322   # Extract the first word of "$ac_prog", so it can be a program name with args.
20323 set dummy $ac_prog; ac_word=$2
20324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20325 $as_echo_n "checking for $ac_word... " >&6; }
20326 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20327   $as_echo_n "(cached) " >&6
20328 else
20329   case $CHECK_TOOLSDIR_MAKE in
20330   [\\/]* | ?:[\\/]*)
20331   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20332   ;;
20333   *)
20334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20335 for as_dir in $PATH
20336 do
20337   IFS=$as_save_IFS
20338   test -z "$as_dir" && as_dir=.
20339     for ac_exec_ext in '' $ac_executable_extensions; do
20340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20341     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20343     break 2
20344   fi
20345 done
20346   done
20347 IFS=$as_save_IFS
20348 
20349   ;;
20350 esac
20351 fi
20352 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20353 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20355 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20356 else
20357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20358 $as_echo "no" >&6; }
20359 fi
20360 
20361 
20362   test -n "$CHECK_TOOLSDIR_MAKE" && break
20363 done
20364 
20365 
20366   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20367   DESCRIPTION="make in tools-dir"
20368 
20369   # On Cygwin, we require a newer version of make than on other platforms
20370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371     MAKE_VERSION_EXPR="-e 4\."
20372     MAKE_REQUIRED_VERSION="4.0"
20373    else
20374     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20375     MAKE_REQUIRED_VERSION="3.81"
20376   fi
20377 
20378   if test "x$MAKE_CANDIDATE" != x; then
20379     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20380 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20381     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20382     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20383     if test "x$IS_GNU_MAKE" = x; then
20384       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20385 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20386     else
20387       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20388       if test "x$IS_MODERN_MAKE" = x; then
20389         { $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
20390 $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;}
20391       else
20392         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20393           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20394             MAKE_EXPECTED_ENV='cygwin'
20395           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20396             MAKE_EXPECTED_ENV='msys'
20397           else
20398             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20399           fi
20400           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20401           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20402         else
20403           # Not relevant for non-Windows
20404           IS_MAKE_CORRECT_ENV=true
20405         fi
20406         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20407           { $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
20408 $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;}
20409         else
20410           FOUND_MAKE=$MAKE_CANDIDATE
20411 
20412   # Only process if variable expands to non-empty
20413 
20414   if test "x$FOUND_MAKE" != x; then
20415     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20416 
20417   # First separate the path from the arguments. This will split at the first
20418   # space.
20419   complete="$FOUND_MAKE"
20420   path="${complete%% *}"
20421   tmp="$complete EOL"
20422   arguments="${tmp#* }"
20423 
20424   # Input might be given as Windows format, start by converting to
20425   # unix format.
20426   new_path=`$CYGPATH -u "$path"`
20427 
20428   # Now try to locate executable using which
20429   new_path=`$WHICH "$new_path" 2> /dev/null`
20430   # bat and cmd files are not always considered executable in cygwin causing which
20431   # to not find them
20432   if test "x$new_path" = x \
20433       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20434       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20435     new_path=`$CYGPATH -u "$path"`
20436   fi
20437   if test "x$new_path" = x; then
20438     # Oops. Which didn't find the executable.
20439     # The splitting of arguments from the executable at a space might have been incorrect,
20440     # since paths with space are more likely in Windows. Give it another try with the whole
20441     # argument.
20442     path="$complete"
20443     arguments="EOL"
20444     new_path=`$CYGPATH -u "$path"`
20445     new_path=`$WHICH "$new_path" 2> /dev/null`
20446     # bat and cmd files are not always considered executable in cygwin causing which
20447     # to not find them
20448     if test "x$new_path" = x \
20449         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20450         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20451       new_path=`$CYGPATH -u "$path"`
20452     fi
20453     if test "x$new_path" = x; then
20454       # It's still not found. Now this is an unrecoverable error.
20455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20456 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20457       has_space=`$ECHO "$complete" | $GREP " "`
20458       if test "x$has_space" != x; then
20459         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20460 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20461       fi
20462       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20463     fi
20464   fi
20465 
20466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20469   # "foo.exe" is OK but "foo" is an error.
20470   #
20471   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20472   # It is also a way to make sure we got the proper file name for the real test later on.
20473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20474   if test "x$test_shortpath" = x; then
20475     # Short path failed, file does not exist as specified.
20476     # Try adding .exe or .cmd
20477     if test -f "${new_path}.exe"; then
20478       input_to_shortpath="${new_path}.exe"
20479     elif test -f "${new_path}.cmd"; then
20480       input_to_shortpath="${new_path}.cmd"
20481     else
20482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20483 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20484       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20485 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20486       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20487     fi
20488   else
20489     input_to_shortpath="$new_path"
20490   fi
20491 
20492   # Call helper function which possibly converts this using DOS-style short mode.
20493   # If so, the updated path is stored in $new_path.
20494   new_path="$input_to_shortpath"
20495 
20496   input_path="$input_to_shortpath"
20497   # Check if we need to convert this using DOS-style short mode. If the path
20498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20499   # take no chances and rewrite it.
20500   # Note: m4 eats our [], so we need to use [ and ] instead.
20501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20502   if test "x$has_forbidden_chars" != x; then
20503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20507       # Going to short mode and back again did indeed matter. Since short mode is
20508       # case insensitive, let's make it lowercase to improve readability.
20509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20510       # Now convert it back to Unix-style (cygpath)
20511       input_path=`$CYGPATH -u "$shortmode_path"`
20512       new_path="$input_path"
20513     fi
20514   fi
20515 
20516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20517   if test "x$test_cygdrive_prefix" = x; then
20518     # As a simple fix, exclude /usr/bin since it's not a real path.
20519     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20521       # a path prefixed by /cygdrive for fixpath to work.
20522       new_path="$CYGWIN_ROOT_PATH$input_path"
20523     fi
20524   fi
20525 
20526   # remove trailing .exe if any
20527   new_path="${new_path/%.exe/}"
20528 
20529     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20530 
20531   # First separate the path from the arguments. This will split at the first
20532   # space.
20533   complete="$FOUND_MAKE"
20534   path="${complete%% *}"
20535   tmp="$complete EOL"
20536   arguments="${tmp#* }"
20537 
20538   # Input might be given as Windows format, start by converting to
20539   # unix format.
20540   new_path="$path"
20541 
20542   windows_path="$new_path"
20543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20544     unix_path=`$CYGPATH -u "$windows_path"`
20545     new_path="$unix_path"
20546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20548     new_path="$unix_path"
20549   fi
20550 
20551 
20552   # Now try to locate executable using which
20553   new_path=`$WHICH "$new_path" 2> /dev/null`
20554 
20555   if test "x$new_path" = x; then
20556     # Oops. Which didn't find the executable.
20557     # The splitting of arguments from the executable at a space might have been incorrect,
20558     # since paths with space are more likely in Windows. Give it another try with the whole
20559     # argument.
20560     path="$complete"
20561     arguments="EOL"
20562     new_path="$path"
20563 
20564   windows_path="$new_path"
20565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20566     unix_path=`$CYGPATH -u "$windows_path"`
20567     new_path="$unix_path"
20568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20570     new_path="$unix_path"
20571   fi
20572 
20573 
20574     new_path=`$WHICH "$new_path" 2> /dev/null`
20575     # bat and cmd files are not always considered executable in MSYS causing which
20576     # to not find them
20577     if test "x$new_path" = x \
20578         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20579         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20580       new_path="$path"
20581 
20582   windows_path="$new_path"
20583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20584     unix_path=`$CYGPATH -u "$windows_path"`
20585     new_path="$unix_path"
20586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20588     new_path="$unix_path"
20589   fi
20590 
20591     fi
20592 
20593     if test "x$new_path" = x; then
20594       # It's still not found. Now this is an unrecoverable error.
20595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20596 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20597       has_space=`$ECHO "$complete" | $GREP " "`
20598       if test "x$has_space" != x; then
20599         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20600 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20601       fi
20602       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20603     fi
20604   fi
20605 
20606   # Now new_path has a complete unix path to the binary
20607   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20608     # Keep paths in /bin as-is, but remove trailing .exe if any
20609     new_path="${new_path/%.exe/}"
20610     # Do not save /bin paths to all_fixpath_prefixes!
20611   else
20612     # Not in mixed or Windows style, start by that.
20613     new_path=`cmd //c echo $new_path`
20614 
20615   input_path="$new_path"
20616   # Check if we need to convert this using DOS-style short mode. If the path
20617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20618   # take no chances and rewrite it.
20619   # Note: m4 eats our [], so we need to use [ and ] instead.
20620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20621   if test "x$has_forbidden_chars" != x; then
20622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20624   fi
20625 
20626     # Output is in $new_path
20627 
20628   windows_path="$new_path"
20629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20630     unix_path=`$CYGPATH -u "$windows_path"`
20631     new_path="$unix_path"
20632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20633     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20634     new_path="$unix_path"
20635   fi
20636 
20637     # remove trailing .exe if any
20638     new_path="${new_path/%.exe/}"
20639 
20640     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20641     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20642   fi
20643 
20644     else
20645       # We're on a unix platform. Hooray! :)
20646       # First separate the path from the arguments. This will split at the first
20647       # space.
20648       complete="$FOUND_MAKE"
20649       path="${complete%% *}"
20650       tmp="$complete EOL"
20651       arguments="${tmp#* }"
20652 
20653       # Cannot rely on the command "which" here since it doesn't always work.
20654       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20655       if test -z "$is_absolute_path"; then
20656         # Path to executable is not absolute. Find it.
20657         IFS_save="$IFS"
20658         IFS=:
20659         for p in $PATH; do
20660           if test -f "$p/$path" && test -x "$p/$path"; then
20661             new_path="$p/$path"
20662             break
20663           fi
20664         done
20665         IFS="$IFS_save"
20666       else
20667         # This is an absolute path, we can use it without further modifications.
20668         new_path="$path"
20669       fi
20670 
20671       if test "x$new_path" = x; then
20672         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20674         has_space=`$ECHO "$complete" | $GREP " "`
20675         if test "x$has_space" != x; then
20676           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20677 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20678         fi
20679         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20680       fi
20681     fi
20682 
20683     # Now join together the path and the arguments once again
20684     if test "x$arguments" != xEOL; then
20685       new_complete="$new_path ${arguments% *}"
20686     else
20687       new_complete="$new_path"
20688     fi
20689 
20690     if test "x$complete" != "x$new_complete"; then
20691       FOUND_MAKE="$new_complete"
20692       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20693 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20694     fi
20695   fi
20696 
20697         fi
20698       fi
20699     fi
20700   fi
20701 
20702         fi
20703         PATH=$OLD_PATH
20704       fi
20705     fi
20706 
20707     if test "x$FOUND_MAKE" = x; then
20708       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
20709     fi
20710 
20711     else
20712       # If it succeeded, then it was overridden by the user. We will use it
20713       # for the tool.
20714 
20715       # First remove it from the list of overridden variables, so we can test
20716       # for unknown variables in the end.
20717       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20718 
20719       # Check if we try to supply an empty value
20720       if test "x$MAKE" = x; then
20721         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20722 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20723         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20724 $as_echo_n "checking for MAKE... " >&6; }
20725         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20726 $as_echo "disabled" >&6; }
20727       else
20728         # Check if the provided tool contains a complete path.
20729         tool_specified="$MAKE"
20730         tool_basename="${tool_specified##*/}"
20731         if test "x$tool_basename" = "x$tool_specified"; then
20732           # A command without a complete path is provided, search $PATH.
20733           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20734 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20735           # Extract the first word of "$tool_basename", so it can be a program name with args.
20736 set dummy $tool_basename; ac_word=$2
20737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20738 $as_echo_n "checking for $ac_word... " >&6; }
20739 if ${ac_cv_path_MAKE+:} false; then :
20740   $as_echo_n "(cached) " >&6
20741 else
20742   case $MAKE in
20743   [\\/]* | ?:[\\/]*)
20744   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20745   ;;
20746   *)
20747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20748 for as_dir in $PATH
20749 do
20750   IFS=$as_save_IFS
20751   test -z "$as_dir" && as_dir=.
20752     for ac_exec_ext in '' $ac_executable_extensions; do
20753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20754     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20756     break 2
20757   fi
20758 done
20759   done
20760 IFS=$as_save_IFS
20761 
20762   ;;
20763 esac
20764 fi
20765 MAKE=$ac_cv_path_MAKE
20766 if test -n "$MAKE"; then
20767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20768 $as_echo "$MAKE" >&6; }
20769 else
20770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20771 $as_echo "no" >&6; }
20772 fi
20773 
20774 
20775           if test "x$MAKE" = x; then
20776             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20777           fi
20778         else
20779           # Otherwise we believe it is a complete path. Use it as it is.
20780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20781 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20782           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20783 $as_echo_n "checking for MAKE... " >&6; }
20784           if test ! -x "$tool_specified"; then
20785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20786 $as_echo "not found" >&6; }
20787             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20788           fi
20789           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20790 $as_echo "$tool_specified" >&6; }
20791         fi
20792       fi
20793     fi
20794 
20795     # If MAKE was set by user, verify the version
20796 
20797   MAKE_CANDIDATE=""$MAKE""
20798   DESCRIPTION="user supplied MAKE=$MAKE"
20799 
20800   # On Cygwin, we require a newer version of make than on other platforms
20801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20802     MAKE_VERSION_EXPR="-e 4\."
20803     MAKE_REQUIRED_VERSION="4.0"
20804    else
20805     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20806     MAKE_REQUIRED_VERSION="3.81"
20807   fi
20808 
20809   if test "x$MAKE_CANDIDATE" != x; then
20810     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20811 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20812     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20813     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20814     if test "x$IS_GNU_MAKE" = x; then
20815       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20816 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20817     else
20818       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20819       if test "x$IS_MODERN_MAKE" = x; then
20820         { $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
20821 $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;}
20822       else
20823         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20824           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20825             MAKE_EXPECTED_ENV='cygwin'
20826           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20827             MAKE_EXPECTED_ENV='msys'
20828           else
20829             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20830           fi
20831           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20832           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20833         else
20834           # Not relevant for non-Windows
20835           IS_MAKE_CORRECT_ENV=true
20836         fi
20837         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20838           { $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
20839 $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;}
20840         else
20841           FOUND_MAKE=$MAKE_CANDIDATE
20842 
20843   # Only process if variable expands to non-empty
20844 
20845   if test "x$FOUND_MAKE" != x; then
20846     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20847 
20848   # First separate the path from the arguments. This will split at the first
20849   # space.
20850   complete="$FOUND_MAKE"
20851   path="${complete%% *}"
20852   tmp="$complete EOL"
20853   arguments="${tmp#* }"
20854 
20855   # Input might be given as Windows format, start by converting to
20856   # unix format.
20857   new_path=`$CYGPATH -u "$path"`
20858 
20859   # Now try to locate executable using which
20860   new_path=`$WHICH "$new_path" 2> /dev/null`
20861   # bat and cmd files are not always considered executable in cygwin causing which
20862   # to not find them
20863   if test "x$new_path" = x \
20864       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20865       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20866     new_path=`$CYGPATH -u "$path"`
20867   fi
20868   if test "x$new_path" = x; then
20869     # Oops. Which didn't find the executable.
20870     # The splitting of arguments from the executable at a space might have been incorrect,
20871     # since paths with space are more likely in Windows. Give it another try with the whole
20872     # argument.
20873     path="$complete"
20874     arguments="EOL"
20875     new_path=`$CYGPATH -u "$path"`
20876     new_path=`$WHICH "$new_path" 2> /dev/null`
20877     # bat and cmd files are not always considered executable in cygwin causing which
20878     # to not find them
20879     if test "x$new_path" = x \
20880         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20881         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20882       new_path=`$CYGPATH -u "$path"`
20883     fi
20884     if test "x$new_path" = x; then
20885       # It's still not found. Now this is an unrecoverable error.
20886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20887 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20888       has_space=`$ECHO "$complete" | $GREP " "`
20889       if test "x$has_space" != x; then
20890         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20892       fi
20893       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20894     fi
20895   fi
20896 
20897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20900   # "foo.exe" is OK but "foo" is an error.
20901   #
20902   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20903   # It is also a way to make sure we got the proper file name for the real test later on.
20904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20905   if test "x$test_shortpath" = x; then
20906     # Short path failed, file does not exist as specified.
20907     # Try adding .exe or .cmd
20908     if test -f "${new_path}.exe"; then
20909       input_to_shortpath="${new_path}.exe"
20910     elif test -f "${new_path}.cmd"; then
20911       input_to_shortpath="${new_path}.cmd"
20912     else
20913       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20914 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20915       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20916 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20917       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20918     fi
20919   else
20920     input_to_shortpath="$new_path"
20921   fi
20922 
20923   # Call helper function which possibly converts this using DOS-style short mode.
20924   # If so, the updated path is stored in $new_path.
20925   new_path="$input_to_shortpath"
20926 
20927   input_path="$input_to_shortpath"
20928   # Check if we need to convert this using DOS-style short mode. If the path
20929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20930   # take no chances and rewrite it.
20931   # Note: m4 eats our [], so we need to use [ and ] instead.
20932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20933   if test "x$has_forbidden_chars" != x; then
20934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20935     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20936     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20937     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20938       # Going to short mode and back again did indeed matter. Since short mode is
20939       # case insensitive, let's make it lowercase to improve readability.
20940       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20941       # Now convert it back to Unix-style (cygpath)
20942       input_path=`$CYGPATH -u "$shortmode_path"`
20943       new_path="$input_path"
20944     fi
20945   fi
20946 
20947   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20948   if test "x$test_cygdrive_prefix" = x; then
20949     # As a simple fix, exclude /usr/bin since it's not a real path.
20950     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20951       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20952       # a path prefixed by /cygdrive for fixpath to work.
20953       new_path="$CYGWIN_ROOT_PATH$input_path"
20954     fi
20955   fi
20956 
20957   # remove trailing .exe if any
20958   new_path="${new_path/%.exe/}"
20959 
20960     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20961 
20962   # First separate the path from the arguments. This will split at the first
20963   # space.
20964   complete="$FOUND_MAKE"
20965   path="${complete%% *}"
20966   tmp="$complete EOL"
20967   arguments="${tmp#* }"
20968 
20969   # Input might be given as Windows format, start by converting to
20970   # unix format.
20971   new_path="$path"
20972 
20973   windows_path="$new_path"
20974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975     unix_path=`$CYGPATH -u "$windows_path"`
20976     new_path="$unix_path"
20977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20979     new_path="$unix_path"
20980   fi
20981 
20982 
20983   # Now try to locate executable using which
20984   new_path=`$WHICH "$new_path" 2> /dev/null`
20985 
20986   if test "x$new_path" = x; then
20987     # Oops. Which didn't find the executable.
20988     # The splitting of arguments from the executable at a space might have been incorrect,
20989     # since paths with space are more likely in Windows. Give it another try with the whole
20990     # argument.
20991     path="$complete"
20992     arguments="EOL"
20993     new_path="$path"
20994 
20995   windows_path="$new_path"
20996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20997     unix_path=`$CYGPATH -u "$windows_path"`
20998     new_path="$unix_path"
20999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21001     new_path="$unix_path"
21002   fi
21003 
21004 
21005     new_path=`$WHICH "$new_path" 2> /dev/null`
21006     # bat and cmd files are not always considered executable in MSYS causing which
21007     # to not find them
21008     if test "x$new_path" = x \
21009         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21010         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21011       new_path="$path"
21012 
21013   windows_path="$new_path"
21014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015     unix_path=`$CYGPATH -u "$windows_path"`
21016     new_path="$unix_path"
21017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21019     new_path="$unix_path"
21020   fi
21021 
21022     fi
21023 
21024     if test "x$new_path" = x; then
21025       # It's still not found. Now this is an unrecoverable error.
21026       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21028       has_space=`$ECHO "$complete" | $GREP " "`
21029       if test "x$has_space" != x; then
21030         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21031 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21032       fi
21033       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21034     fi
21035   fi
21036 
21037   # Now new_path has a complete unix path to the binary
21038   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21039     # Keep paths in /bin as-is, but remove trailing .exe if any
21040     new_path="${new_path/%.exe/}"
21041     # Do not save /bin paths to all_fixpath_prefixes!
21042   else
21043     # Not in mixed or Windows style, start by that.
21044     new_path=`cmd //c echo $new_path`
21045 
21046   input_path="$new_path"
21047   # Check if we need to convert this using DOS-style short mode. If the path
21048   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21049   # take no chances and rewrite it.
21050   # Note: m4 eats our [], so we need to use [ and ] instead.
21051   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21052   if test "x$has_forbidden_chars" != x; then
21053     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21054     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21055   fi
21056 
21057     # Output is in $new_path
21058 
21059   windows_path="$new_path"
21060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21061     unix_path=`$CYGPATH -u "$windows_path"`
21062     new_path="$unix_path"
21063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21065     new_path="$unix_path"
21066   fi
21067 
21068     # remove trailing .exe if any
21069     new_path="${new_path/%.exe/}"
21070 
21071     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21072     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21073   fi
21074 
21075     else
21076       # We're on a unix platform. Hooray! :)
21077       # First separate the path from the arguments. This will split at the first
21078       # space.
21079       complete="$FOUND_MAKE"
21080       path="${complete%% *}"
21081       tmp="$complete EOL"
21082       arguments="${tmp#* }"
21083 
21084       # Cannot rely on the command "which" here since it doesn't always work.
21085       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21086       if test -z "$is_absolute_path"; then
21087         # Path to executable is not absolute. Find it.
21088         IFS_save="$IFS"
21089         IFS=:
21090         for p in $PATH; do
21091           if test -f "$p/$path" && test -x "$p/$path"; then
21092             new_path="$p/$path"
21093             break
21094           fi
21095         done
21096         IFS="$IFS_save"
21097       else
21098         # This is an absolute path, we can use it without further modifications.
21099         new_path="$path"
21100       fi
21101 
21102       if test "x$new_path" = x; then
21103         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21104 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21105         has_space=`$ECHO "$complete" | $GREP " "`
21106         if test "x$has_space" != x; then
21107           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21108 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21109         fi
21110         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21111       fi
21112     fi
21113 
21114     # Now join together the path and the arguments once again
21115     if test "x$arguments" != xEOL; then
21116       new_complete="$new_path ${arguments% *}"
21117     else
21118       new_complete="$new_path"
21119     fi
21120 
21121     if test "x$complete" != "x$new_complete"; then
21122       FOUND_MAKE="$new_complete"
21123       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21124 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21125     fi
21126   fi
21127 
21128         fi
21129       fi
21130     fi
21131   fi
21132 
21133     if test "x$FOUND_MAKE" = x; then
21134       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21135     fi
21136 
21137   fi
21138 
21139 
21140   MAKE=$FOUND_MAKE
21141 
21142   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21143 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21144 
21145 
21146   # Check if make supports the output sync option and if so, setup using it.
21147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21148 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21149   if $MAKE --version -O > /dev/null 2>&1; then
21150     OUTPUT_SYNC_SUPPORTED=true
21151     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21152 $as_echo "yes" >&6; }
21153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21154 $as_echo_n "checking for output-sync value... " >&6; }
21155 
21156 # Check whether --with-output-sync was given.
21157 if test "${with_output_sync+set}" = set; then :
21158   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21159 fi
21160 
21161     if test "x$OUTPUT_SYNC" = "x"; then
21162       OUTPUT_SYNC=none
21163     fi
21164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21165 $as_echo "$OUTPUT_SYNC" >&6; }
21166     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21167       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21168     fi
21169   else
21170     OUTPUT_SYNC_SUPPORTED=false
21171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21172 $as_echo "no" >&6; }
21173   fi
21174 
21175 
21176 
21177 
21178 
21179 
21180   # Test if find supports -delete
21181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21182 $as_echo_n "checking if find supports -delete... " >&6; }
21183   FIND_DELETE="-delete"
21184 
21185   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21186 
21187   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21188 
21189   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21190   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21191     # No, it does not.
21192     $RM $DELETEDIR/TestIfFindSupportsDelete
21193     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21194       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21195       FIND_DELETE="-print | $XARGS $RM"
21196     else
21197       FIND_DELETE="-exec $RM \{\} \+"
21198     fi
21199     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21200 $as_echo "no" >&6; }
21201   else
21202     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21203 $as_echo "yes" >&6; }
21204   fi
21205   $RMDIR $DELETEDIR
21206 
21207 
21208 
21209   # Test which kind of tar was found
21210   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21211     TAR_TYPE="gnu"
21212   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21213     TAR_TYPE="bsd"
21214   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21215     TAR_TYPE="solaris"
21216   fi
21217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21218 $as_echo_n "checking what type of tar was found... " >&6; }
21219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21220 $as_echo "$TAR_TYPE" >&6; }
21221 
21222   TAR_CREATE_FILE_PARAM=""
21223 
21224   if test "x$TAR_TYPE" = "xgnu"; then
21225     TAR_INCLUDE_PARAM="T"
21226     TAR_SUPPORTS_TRANSFORM="true"
21227     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21228       # When using gnu tar for Solaris targets, need to use compatibility mode
21229       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21230     fi
21231   else
21232     TAR_INCLUDE_PARAM="I"
21233     TAR_SUPPORTS_TRANSFORM="false"
21234   fi
21235 
21236 
21237 
21238 
21239 
21240 
21241   # These tools might not be installed by default,
21242   # need hint on how to install them.
21243 
21244 
21245 
21246   # Publish this variable in the help.
21247 
21248 
21249   if [ -z "${UNZIP+x}" ]; then
21250     # The variable is not set by user, try to locate tool using the code snippet
21251     for ac_prog in unzip
21252 do
21253   # Extract the first word of "$ac_prog", so it can be a program name with args.
21254 set dummy $ac_prog; ac_word=$2
21255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21256 $as_echo_n "checking for $ac_word... " >&6; }
21257 if ${ac_cv_path_UNZIP+:} false; then :
21258   $as_echo_n "(cached) " >&6
21259 else
21260   case $UNZIP in
21261   [\\/]* | ?:[\\/]*)
21262   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21263   ;;
21264   *)
21265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21266 for as_dir in $PATH
21267 do
21268   IFS=$as_save_IFS
21269   test -z "$as_dir" && as_dir=.
21270     for ac_exec_ext in '' $ac_executable_extensions; do
21271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21272     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21274     break 2
21275   fi
21276 done
21277   done
21278 IFS=$as_save_IFS
21279 
21280   ;;
21281 esac
21282 fi
21283 UNZIP=$ac_cv_path_UNZIP
21284 if test -n "$UNZIP"; then
21285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21286 $as_echo "$UNZIP" >&6; }
21287 else
21288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21289 $as_echo "no" >&6; }
21290 fi
21291 
21292 
21293   test -n "$UNZIP" && break
21294 done
21295 
21296   else
21297     # The variable is set, but is it from the command line or the environment?
21298 
21299     # Try to remove the string !UNZIP! from our list.
21300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21302       # If it failed, the variable was not from the command line. Ignore it,
21303       # but warn the user (except for BASH, which is always set by the calling BASH).
21304       if test "xUNZIP" != xBASH; then
21305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21306 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21307       fi
21308       # Try to locate tool using the code snippet
21309       for ac_prog in unzip
21310 do
21311   # Extract the first word of "$ac_prog", so it can be a program name with args.
21312 set dummy $ac_prog; ac_word=$2
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21314 $as_echo_n "checking for $ac_word... " >&6; }
21315 if ${ac_cv_path_UNZIP+:} false; then :
21316   $as_echo_n "(cached) " >&6
21317 else
21318   case $UNZIP in
21319   [\\/]* | ?:[\\/]*)
21320   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21321   ;;
21322   *)
21323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21324 for as_dir in $PATH
21325 do
21326   IFS=$as_save_IFS
21327   test -z "$as_dir" && as_dir=.
21328     for ac_exec_ext in '' $ac_executable_extensions; do
21329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21330     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21332     break 2
21333   fi
21334 done
21335   done
21336 IFS=$as_save_IFS
21337 
21338   ;;
21339 esac
21340 fi
21341 UNZIP=$ac_cv_path_UNZIP
21342 if test -n "$UNZIP"; then
21343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21344 $as_echo "$UNZIP" >&6; }
21345 else
21346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21347 $as_echo "no" >&6; }
21348 fi
21349 
21350 
21351   test -n "$UNZIP" && break
21352 done
21353 
21354     else
21355       # If it succeeded, then it was overridden by the user. We will use it
21356       # for the tool.
21357 
21358       # First remove it from the list of overridden variables, so we can test
21359       # for unknown variables in the end.
21360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21361 
21362       # Check if we try to supply an empty value
21363       if test "x$UNZIP" = x; then
21364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21365 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21367 $as_echo_n "checking for UNZIP... " >&6; }
21368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21369 $as_echo "disabled" >&6; }
21370       else
21371         # Check if the provided tool contains a complete path.
21372         tool_specified="$UNZIP"
21373         tool_basename="${tool_specified##*/}"
21374         if test "x$tool_basename" = "x$tool_specified"; then
21375           # A command without a complete path is provided, search $PATH.
21376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21377 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21378           # Extract the first word of "$tool_basename", so it can be a program name with args.
21379 set dummy $tool_basename; ac_word=$2
21380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21381 $as_echo_n "checking for $ac_word... " >&6; }
21382 if ${ac_cv_path_UNZIP+:} false; then :
21383   $as_echo_n "(cached) " >&6
21384 else
21385   case $UNZIP in
21386   [\\/]* | ?:[\\/]*)
21387   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21388   ;;
21389   *)
21390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21391 for as_dir in $PATH
21392 do
21393   IFS=$as_save_IFS
21394   test -z "$as_dir" && as_dir=.
21395     for ac_exec_ext in '' $ac_executable_extensions; do
21396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21397     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21399     break 2
21400   fi
21401 done
21402   done
21403 IFS=$as_save_IFS
21404 
21405   ;;
21406 esac
21407 fi
21408 UNZIP=$ac_cv_path_UNZIP
21409 if test -n "$UNZIP"; then
21410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21411 $as_echo "$UNZIP" >&6; }
21412 else
21413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21414 $as_echo "no" >&6; }
21415 fi
21416 
21417 
21418           if test "x$UNZIP" = x; then
21419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21420           fi
21421         else
21422           # Otherwise we believe it is a complete path. Use it as it is.
21423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21424 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21426 $as_echo_n "checking for UNZIP... " >&6; }
21427           if test ! -x "$tool_specified"; then
21428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21429 $as_echo "not found" >&6; }
21430             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21431           fi
21432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21433 $as_echo "$tool_specified" >&6; }
21434         fi
21435       fi
21436     fi
21437 
21438   fi
21439 
21440 
21441 
21442   if test "x$UNZIP" = x; then
21443     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21444   fi
21445 
21446 
21447   # Since zip uses "ZIP" as a environment variable for passing options, we need
21448   # to name our variable differently, hence ZIPEXE.
21449 
21450 
21451 
21452   # Publish this variable in the help.
21453 
21454 
21455   if [ -z "${ZIPEXE+x}" ]; then
21456     # The variable is not set by user, try to locate tool using the code snippet
21457     for ac_prog in zip
21458 do
21459   # Extract the first word of "$ac_prog", so it can be a program name with args.
21460 set dummy $ac_prog; ac_word=$2
21461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21462 $as_echo_n "checking for $ac_word... " >&6; }
21463 if ${ac_cv_path_ZIPEXE+:} false; then :
21464   $as_echo_n "(cached) " >&6
21465 else
21466   case $ZIPEXE in
21467   [\\/]* | ?:[\\/]*)
21468   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21469   ;;
21470   *)
21471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21472 for as_dir in $PATH
21473 do
21474   IFS=$as_save_IFS
21475   test -z "$as_dir" && as_dir=.
21476     for ac_exec_ext in '' $ac_executable_extensions; do
21477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21478     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21480     break 2
21481   fi
21482 done
21483   done
21484 IFS=$as_save_IFS
21485 
21486   ;;
21487 esac
21488 fi
21489 ZIPEXE=$ac_cv_path_ZIPEXE
21490 if test -n "$ZIPEXE"; then
21491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21492 $as_echo "$ZIPEXE" >&6; }
21493 else
21494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21495 $as_echo "no" >&6; }
21496 fi
21497 
21498 
21499   test -n "$ZIPEXE" && break
21500 done
21501 
21502   else
21503     # The variable is set, but is it from the command line or the environment?
21504 
21505     # Try to remove the string !ZIPEXE! from our list.
21506     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21507     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21508       # If it failed, the variable was not from the command line. Ignore it,
21509       # but warn the user (except for BASH, which is always set by the calling BASH).
21510       if test "xZIPEXE" != xBASH; then
21511         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21512 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21513       fi
21514       # Try to locate tool using the code snippet
21515       for ac_prog in zip
21516 do
21517   # Extract the first word of "$ac_prog", so it can be a program name with args.
21518 set dummy $ac_prog; ac_word=$2
21519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21520 $as_echo_n "checking for $ac_word... " >&6; }
21521 if ${ac_cv_path_ZIPEXE+:} false; then :
21522   $as_echo_n "(cached) " >&6
21523 else
21524   case $ZIPEXE in
21525   [\\/]* | ?:[\\/]*)
21526   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21527   ;;
21528   *)
21529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21530 for as_dir in $PATH
21531 do
21532   IFS=$as_save_IFS
21533   test -z "$as_dir" && as_dir=.
21534     for ac_exec_ext in '' $ac_executable_extensions; do
21535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21536     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21538     break 2
21539   fi
21540 done
21541   done
21542 IFS=$as_save_IFS
21543 
21544   ;;
21545 esac
21546 fi
21547 ZIPEXE=$ac_cv_path_ZIPEXE
21548 if test -n "$ZIPEXE"; then
21549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21550 $as_echo "$ZIPEXE" >&6; }
21551 else
21552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21553 $as_echo "no" >&6; }
21554 fi
21555 
21556 
21557   test -n "$ZIPEXE" && break
21558 done
21559 
21560     else
21561       # If it succeeded, then it was overridden by the user. We will use it
21562       # for the tool.
21563 
21564       # First remove it from the list of overridden variables, so we can test
21565       # for unknown variables in the end.
21566       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21567 
21568       # Check if we try to supply an empty value
21569       if test "x$ZIPEXE" = x; then
21570         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21571 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21572         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21573 $as_echo_n "checking for ZIPEXE... " >&6; }
21574         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21575 $as_echo "disabled" >&6; }
21576       else
21577         # Check if the provided tool contains a complete path.
21578         tool_specified="$ZIPEXE"
21579         tool_basename="${tool_specified##*/}"
21580         if test "x$tool_basename" = "x$tool_specified"; then
21581           # A command without a complete path is provided, search $PATH.
21582           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21583 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21584           # Extract the first word of "$tool_basename", so it can be a program name with args.
21585 set dummy $tool_basename; ac_word=$2
21586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21587 $as_echo_n "checking for $ac_word... " >&6; }
21588 if ${ac_cv_path_ZIPEXE+:} false; then :
21589   $as_echo_n "(cached) " >&6
21590 else
21591   case $ZIPEXE in
21592   [\\/]* | ?:[\\/]*)
21593   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21594   ;;
21595   *)
21596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21597 for as_dir in $PATH
21598 do
21599   IFS=$as_save_IFS
21600   test -z "$as_dir" && as_dir=.
21601     for ac_exec_ext in '' $ac_executable_extensions; do
21602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21603     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21605     break 2
21606   fi
21607 done
21608   done
21609 IFS=$as_save_IFS
21610 
21611   ;;
21612 esac
21613 fi
21614 ZIPEXE=$ac_cv_path_ZIPEXE
21615 if test -n "$ZIPEXE"; then
21616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21617 $as_echo "$ZIPEXE" >&6; }
21618 else
21619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21620 $as_echo "no" >&6; }
21621 fi
21622 
21623 
21624           if test "x$ZIPEXE" = x; then
21625             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21626           fi
21627         else
21628           # Otherwise we believe it is a complete path. Use it as it is.
21629           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21630 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21631           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21632 $as_echo_n "checking for ZIPEXE... " >&6; }
21633           if test ! -x "$tool_specified"; then
21634             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21635 $as_echo "not found" >&6; }
21636             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21637           fi
21638           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21639 $as_echo "$tool_specified" >&6; }
21640         fi
21641       fi
21642     fi
21643 
21644   fi
21645 
21646 
21647 
21648   if test "x$ZIPEXE" = x; then
21649     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21650   fi
21651 
21652 
21653 
21654   # Non-required basic tools
21655 
21656 
21657 
21658   # Publish this variable in the help.
21659 
21660 
21661   if [ -z "${LDD+x}" ]; then
21662     # The variable is not set by user, try to locate tool using the code snippet
21663     for ac_prog in ldd
21664 do
21665   # Extract the first word of "$ac_prog", so it can be a program name with args.
21666 set dummy $ac_prog; ac_word=$2
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21668 $as_echo_n "checking for $ac_word... " >&6; }
21669 if ${ac_cv_path_LDD+:} false; then :
21670   $as_echo_n "(cached) " >&6
21671 else
21672   case $LDD in
21673   [\\/]* | ?:[\\/]*)
21674   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21675   ;;
21676   *)
21677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21678 for as_dir in $PATH
21679 do
21680   IFS=$as_save_IFS
21681   test -z "$as_dir" && as_dir=.
21682     for ac_exec_ext in '' $ac_executable_extensions; do
21683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21684     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21686     break 2
21687   fi
21688 done
21689   done
21690 IFS=$as_save_IFS
21691 
21692   ;;
21693 esac
21694 fi
21695 LDD=$ac_cv_path_LDD
21696 if test -n "$LDD"; then
21697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21698 $as_echo "$LDD" >&6; }
21699 else
21700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21701 $as_echo "no" >&6; }
21702 fi
21703 
21704 
21705   test -n "$LDD" && break
21706 done
21707 
21708   else
21709     # The variable is set, but is it from the command line or the environment?
21710 
21711     # Try to remove the string !LDD! from our list.
21712     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21713     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21714       # If it failed, the variable was not from the command line. Ignore it,
21715       # but warn the user (except for BASH, which is always set by the calling BASH).
21716       if test "xLDD" != xBASH; then
21717         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21718 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21719       fi
21720       # Try to locate tool using the code snippet
21721       for ac_prog in ldd
21722 do
21723   # Extract the first word of "$ac_prog", so it can be a program name with args.
21724 set dummy $ac_prog; ac_word=$2
21725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21726 $as_echo_n "checking for $ac_word... " >&6; }
21727 if ${ac_cv_path_LDD+:} false; then :
21728   $as_echo_n "(cached) " >&6
21729 else
21730   case $LDD in
21731   [\\/]* | ?:[\\/]*)
21732   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21733   ;;
21734   *)
21735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21736 for as_dir in $PATH
21737 do
21738   IFS=$as_save_IFS
21739   test -z "$as_dir" && as_dir=.
21740     for ac_exec_ext in '' $ac_executable_extensions; do
21741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21742     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21744     break 2
21745   fi
21746 done
21747   done
21748 IFS=$as_save_IFS
21749 
21750   ;;
21751 esac
21752 fi
21753 LDD=$ac_cv_path_LDD
21754 if test -n "$LDD"; then
21755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21756 $as_echo "$LDD" >&6; }
21757 else
21758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21759 $as_echo "no" >&6; }
21760 fi
21761 
21762 
21763   test -n "$LDD" && break
21764 done
21765 
21766     else
21767       # If it succeeded, then it was overridden by the user. We will use it
21768       # for the tool.
21769 
21770       # First remove it from the list of overridden variables, so we can test
21771       # for unknown variables in the end.
21772       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21773 
21774       # Check if we try to supply an empty value
21775       if test "x$LDD" = x; then
21776         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21777 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21778         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21779 $as_echo_n "checking for LDD... " >&6; }
21780         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21781 $as_echo "disabled" >&6; }
21782       else
21783         # Check if the provided tool contains a complete path.
21784         tool_specified="$LDD"
21785         tool_basename="${tool_specified##*/}"
21786         if test "x$tool_basename" = "x$tool_specified"; then
21787           # A command without a complete path is provided, search $PATH.
21788           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21789 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21790           # Extract the first word of "$tool_basename", so it can be a program name with args.
21791 set dummy $tool_basename; ac_word=$2
21792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21793 $as_echo_n "checking for $ac_word... " >&6; }
21794 if ${ac_cv_path_LDD+:} false; then :
21795   $as_echo_n "(cached) " >&6
21796 else
21797   case $LDD in
21798   [\\/]* | ?:[\\/]*)
21799   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21800   ;;
21801   *)
21802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21803 for as_dir in $PATH
21804 do
21805   IFS=$as_save_IFS
21806   test -z "$as_dir" && as_dir=.
21807     for ac_exec_ext in '' $ac_executable_extensions; do
21808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21809     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21811     break 2
21812   fi
21813 done
21814   done
21815 IFS=$as_save_IFS
21816 
21817   ;;
21818 esac
21819 fi
21820 LDD=$ac_cv_path_LDD
21821 if test -n "$LDD"; then
21822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21823 $as_echo "$LDD" >&6; }
21824 else
21825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21826 $as_echo "no" >&6; }
21827 fi
21828 
21829 
21830           if test "x$LDD" = x; then
21831             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21832           fi
21833         else
21834           # Otherwise we believe it is a complete path. Use it as it is.
21835           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21836 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21837           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21838 $as_echo_n "checking for LDD... " >&6; }
21839           if test ! -x "$tool_specified"; then
21840             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21841 $as_echo "not found" >&6; }
21842             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21843           fi
21844           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21845 $as_echo "$tool_specified" >&6; }
21846         fi
21847       fi
21848     fi
21849 
21850   fi
21851 
21852 
21853   if test "x$LDD" = "x"; then
21854     # List shared lib dependencies is used for
21855     # debug output and checking for forbidden dependencies.
21856     # We can build without it.
21857     LDD="true"
21858   fi
21859 
21860 
21861   # Publish this variable in the help.
21862 
21863 
21864   if [ -z "${OTOOL+x}" ]; then
21865     # The variable is not set by user, try to locate tool using the code snippet
21866     for ac_prog in otool
21867 do
21868   # Extract the first word of "$ac_prog", so it can be a program name with args.
21869 set dummy $ac_prog; ac_word=$2
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21871 $as_echo_n "checking for $ac_word... " >&6; }
21872 if ${ac_cv_path_OTOOL+:} false; then :
21873   $as_echo_n "(cached) " >&6
21874 else
21875   case $OTOOL in
21876   [\\/]* | ?:[\\/]*)
21877   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21878   ;;
21879   *)
21880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21881 for as_dir in $PATH
21882 do
21883   IFS=$as_save_IFS
21884   test -z "$as_dir" && as_dir=.
21885     for ac_exec_ext in '' $ac_executable_extensions; do
21886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21887     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21889     break 2
21890   fi
21891 done
21892   done
21893 IFS=$as_save_IFS
21894 
21895   ;;
21896 esac
21897 fi
21898 OTOOL=$ac_cv_path_OTOOL
21899 if test -n "$OTOOL"; then
21900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21901 $as_echo "$OTOOL" >&6; }
21902 else
21903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21904 $as_echo "no" >&6; }
21905 fi
21906 
21907 
21908   test -n "$OTOOL" && break
21909 done
21910 
21911   else
21912     # The variable is set, but is it from the command line or the environment?
21913 
21914     # Try to remove the string !OTOOL! from our list.
21915     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21916     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21917       # If it failed, the variable was not from the command line. Ignore it,
21918       # but warn the user (except for BASH, which is always set by the calling BASH).
21919       if test "xOTOOL" != xBASH; then
21920         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21921 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21922       fi
21923       # Try to locate tool using the code snippet
21924       for ac_prog in otool
21925 do
21926   # Extract the first word of "$ac_prog", so it can be a program name with args.
21927 set dummy $ac_prog; ac_word=$2
21928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21929 $as_echo_n "checking for $ac_word... " >&6; }
21930 if ${ac_cv_path_OTOOL+:} false; then :
21931   $as_echo_n "(cached) " >&6
21932 else
21933   case $OTOOL in
21934   [\\/]* | ?:[\\/]*)
21935   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21936   ;;
21937   *)
21938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21939 for as_dir in $PATH
21940 do
21941   IFS=$as_save_IFS
21942   test -z "$as_dir" && as_dir=.
21943     for ac_exec_ext in '' $ac_executable_extensions; do
21944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21945     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21947     break 2
21948   fi
21949 done
21950   done
21951 IFS=$as_save_IFS
21952 
21953   ;;
21954 esac
21955 fi
21956 OTOOL=$ac_cv_path_OTOOL
21957 if test -n "$OTOOL"; then
21958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21959 $as_echo "$OTOOL" >&6; }
21960 else
21961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21962 $as_echo "no" >&6; }
21963 fi
21964 
21965 
21966   test -n "$OTOOL" && break
21967 done
21968 
21969     else
21970       # If it succeeded, then it was overridden by the user. We will use it
21971       # for the tool.
21972 
21973       # First remove it from the list of overridden variables, so we can test
21974       # for unknown variables in the end.
21975       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21976 
21977       # Check if we try to supply an empty value
21978       if test "x$OTOOL" = x; then
21979         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21980 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21981         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21982 $as_echo_n "checking for OTOOL... " >&6; }
21983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21984 $as_echo "disabled" >&6; }
21985       else
21986         # Check if the provided tool contains a complete path.
21987         tool_specified="$OTOOL"
21988         tool_basename="${tool_specified##*/}"
21989         if test "x$tool_basename" = "x$tool_specified"; then
21990           # A command without a complete path is provided, search $PATH.
21991           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21992 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21993           # Extract the first word of "$tool_basename", so it can be a program name with args.
21994 set dummy $tool_basename; ac_word=$2
21995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21996 $as_echo_n "checking for $ac_word... " >&6; }
21997 if ${ac_cv_path_OTOOL+:} false; then :
21998   $as_echo_n "(cached) " >&6
21999 else
22000   case $OTOOL in
22001   [\\/]* | ?:[\\/]*)
22002   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22003   ;;
22004   *)
22005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22006 for as_dir in $PATH
22007 do
22008   IFS=$as_save_IFS
22009   test -z "$as_dir" && as_dir=.
22010     for ac_exec_ext in '' $ac_executable_extensions; do
22011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22012     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22014     break 2
22015   fi
22016 done
22017   done
22018 IFS=$as_save_IFS
22019 
22020   ;;
22021 esac
22022 fi
22023 OTOOL=$ac_cv_path_OTOOL
22024 if test -n "$OTOOL"; then
22025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22026 $as_echo "$OTOOL" >&6; }
22027 else
22028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22029 $as_echo "no" >&6; }
22030 fi
22031 
22032 
22033           if test "x$OTOOL" = x; then
22034             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22035           fi
22036         else
22037           # Otherwise we believe it is a complete path. Use it as it is.
22038           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22039 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22040           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22041 $as_echo_n "checking for OTOOL... " >&6; }
22042           if test ! -x "$tool_specified"; then
22043             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22044 $as_echo "not found" >&6; }
22045             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22046           fi
22047           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22048 $as_echo "$tool_specified" >&6; }
22049         fi
22050       fi
22051     fi
22052 
22053   fi
22054 
22055 
22056   if test "x$OTOOL" = "x"; then
22057     OTOOL="true"
22058   fi
22059 
22060 
22061   # Publish this variable in the help.
22062 
22063 
22064   if [ -z "${READELF+x}" ]; then
22065     # The variable is not set by user, try to locate tool using the code snippet
22066     for ac_prog in greadelf readelf
22067 do
22068   # Extract the first word of "$ac_prog", so it can be a program name with args.
22069 set dummy $ac_prog; ac_word=$2
22070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22071 $as_echo_n "checking for $ac_word... " >&6; }
22072 if ${ac_cv_path_READELF+:} false; then :
22073   $as_echo_n "(cached) " >&6
22074 else
22075   case $READELF in
22076   [\\/]* | ?:[\\/]*)
22077   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22078   ;;
22079   *)
22080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22081 for as_dir in $PATH
22082 do
22083   IFS=$as_save_IFS
22084   test -z "$as_dir" && as_dir=.
22085     for ac_exec_ext in '' $ac_executable_extensions; do
22086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22087     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22089     break 2
22090   fi
22091 done
22092   done
22093 IFS=$as_save_IFS
22094 
22095   ;;
22096 esac
22097 fi
22098 READELF=$ac_cv_path_READELF
22099 if test -n "$READELF"; then
22100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22101 $as_echo "$READELF" >&6; }
22102 else
22103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22104 $as_echo "no" >&6; }
22105 fi
22106 
22107 
22108   test -n "$READELF" && break
22109 done
22110 
22111   else
22112     # The variable is set, but is it from the command line or the environment?
22113 
22114     # Try to remove the string !READELF! from our list.
22115     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22116     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22117       # If it failed, the variable was not from the command line. Ignore it,
22118       # but warn the user (except for BASH, which is always set by the calling BASH).
22119       if test "xREADELF" != xBASH; then
22120         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22121 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22122       fi
22123       # Try to locate tool using the code snippet
22124       for ac_prog in greadelf readelf
22125 do
22126   # Extract the first word of "$ac_prog", so it can be a program name with args.
22127 set dummy $ac_prog; ac_word=$2
22128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22129 $as_echo_n "checking for $ac_word... " >&6; }
22130 if ${ac_cv_path_READELF+:} false; then :
22131   $as_echo_n "(cached) " >&6
22132 else
22133   case $READELF in
22134   [\\/]* | ?:[\\/]*)
22135   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22136   ;;
22137   *)
22138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22139 for as_dir in $PATH
22140 do
22141   IFS=$as_save_IFS
22142   test -z "$as_dir" && as_dir=.
22143     for ac_exec_ext in '' $ac_executable_extensions; do
22144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22145     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22147     break 2
22148   fi
22149 done
22150   done
22151 IFS=$as_save_IFS
22152 
22153   ;;
22154 esac
22155 fi
22156 READELF=$ac_cv_path_READELF
22157 if test -n "$READELF"; then
22158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22159 $as_echo "$READELF" >&6; }
22160 else
22161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22162 $as_echo "no" >&6; }
22163 fi
22164 
22165 
22166   test -n "$READELF" && break
22167 done
22168 
22169     else
22170       # If it succeeded, then it was overridden by the user. We will use it
22171       # for the tool.
22172 
22173       # First remove it from the list of overridden variables, so we can test
22174       # for unknown variables in the end.
22175       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22176 
22177       # Check if we try to supply an empty value
22178       if test "x$READELF" = x; then
22179         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22180 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22182 $as_echo_n "checking for READELF... " >&6; }
22183         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22184 $as_echo "disabled" >&6; }
22185       else
22186         # Check if the provided tool contains a complete path.
22187         tool_specified="$READELF"
22188         tool_basename="${tool_specified##*/}"
22189         if test "x$tool_basename" = "x$tool_specified"; then
22190           # A command without a complete path is provided, search $PATH.
22191           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22192 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22193           # Extract the first word of "$tool_basename", so it can be a program name with args.
22194 set dummy $tool_basename; ac_word=$2
22195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22196 $as_echo_n "checking for $ac_word... " >&6; }
22197 if ${ac_cv_path_READELF+:} false; then :
22198   $as_echo_n "(cached) " >&6
22199 else
22200   case $READELF in
22201   [\\/]* | ?:[\\/]*)
22202   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22203   ;;
22204   *)
22205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22206 for as_dir in $PATH
22207 do
22208   IFS=$as_save_IFS
22209   test -z "$as_dir" && as_dir=.
22210     for ac_exec_ext in '' $ac_executable_extensions; do
22211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22212     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22214     break 2
22215   fi
22216 done
22217   done
22218 IFS=$as_save_IFS
22219 
22220   ;;
22221 esac
22222 fi
22223 READELF=$ac_cv_path_READELF
22224 if test -n "$READELF"; then
22225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22226 $as_echo "$READELF" >&6; }
22227 else
22228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22229 $as_echo "no" >&6; }
22230 fi
22231 
22232 
22233           if test "x$READELF" = x; then
22234             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22235           fi
22236         else
22237           # Otherwise we believe it is a complete path. Use it as it is.
22238           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22239 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22240           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22241 $as_echo_n "checking for READELF... " >&6; }
22242           if test ! -x "$tool_specified"; then
22243             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22244 $as_echo "not found" >&6; }
22245             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22246           fi
22247           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22248 $as_echo "$tool_specified" >&6; }
22249         fi
22250       fi
22251     fi
22252 
22253   fi
22254 
22255 
22256 
22257 
22258   # Publish this variable in the help.
22259 
22260 
22261   if [ -z "${HG+x}" ]; then
22262     # The variable is not set by user, try to locate tool using the code snippet
22263     for ac_prog in hg
22264 do
22265   # Extract the first word of "$ac_prog", so it can be a program name with args.
22266 set dummy $ac_prog; ac_word=$2
22267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22268 $as_echo_n "checking for $ac_word... " >&6; }
22269 if ${ac_cv_path_HG+:} false; then :
22270   $as_echo_n "(cached) " >&6
22271 else
22272   case $HG in
22273   [\\/]* | ?:[\\/]*)
22274   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22275   ;;
22276   *)
22277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22278 for as_dir in $PATH
22279 do
22280   IFS=$as_save_IFS
22281   test -z "$as_dir" && as_dir=.
22282     for ac_exec_ext in '' $ac_executable_extensions; do
22283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22284     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22286     break 2
22287   fi
22288 done
22289   done
22290 IFS=$as_save_IFS
22291 
22292   ;;
22293 esac
22294 fi
22295 HG=$ac_cv_path_HG
22296 if test -n "$HG"; then
22297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22298 $as_echo "$HG" >&6; }
22299 else
22300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22301 $as_echo "no" >&6; }
22302 fi
22303 
22304 
22305   test -n "$HG" && break
22306 done
22307 
22308   else
22309     # The variable is set, but is it from the command line or the environment?
22310 
22311     # Try to remove the string !HG! from our list.
22312     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22313     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22314       # If it failed, the variable was not from the command line. Ignore it,
22315       # but warn the user (except for BASH, which is always set by the calling BASH).
22316       if test "xHG" != xBASH; then
22317         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22318 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22319       fi
22320       # Try to locate tool using the code snippet
22321       for ac_prog in hg
22322 do
22323   # Extract the first word of "$ac_prog", so it can be a program name with args.
22324 set dummy $ac_prog; ac_word=$2
22325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22326 $as_echo_n "checking for $ac_word... " >&6; }
22327 if ${ac_cv_path_HG+:} false; then :
22328   $as_echo_n "(cached) " >&6
22329 else
22330   case $HG in
22331   [\\/]* | ?:[\\/]*)
22332   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22333   ;;
22334   *)
22335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22336 for as_dir in $PATH
22337 do
22338   IFS=$as_save_IFS
22339   test -z "$as_dir" && as_dir=.
22340     for ac_exec_ext in '' $ac_executable_extensions; do
22341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22342     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22344     break 2
22345   fi
22346 done
22347   done
22348 IFS=$as_save_IFS
22349 
22350   ;;
22351 esac
22352 fi
22353 HG=$ac_cv_path_HG
22354 if test -n "$HG"; then
22355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22356 $as_echo "$HG" >&6; }
22357 else
22358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22359 $as_echo "no" >&6; }
22360 fi
22361 
22362 
22363   test -n "$HG" && break
22364 done
22365 
22366     else
22367       # If it succeeded, then it was overridden by the user. We will use it
22368       # for the tool.
22369 
22370       # First remove it from the list of overridden variables, so we can test
22371       # for unknown variables in the end.
22372       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22373 
22374       # Check if we try to supply an empty value
22375       if test "x$HG" = x; then
22376         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22377 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22378         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22379 $as_echo_n "checking for HG... " >&6; }
22380         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22381 $as_echo "disabled" >&6; }
22382       else
22383         # Check if the provided tool contains a complete path.
22384         tool_specified="$HG"
22385         tool_basename="${tool_specified##*/}"
22386         if test "x$tool_basename" = "x$tool_specified"; then
22387           # A command without a complete path is provided, search $PATH.
22388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22389 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22390           # Extract the first word of "$tool_basename", so it can be a program name with args.
22391 set dummy $tool_basename; ac_word=$2
22392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22393 $as_echo_n "checking for $ac_word... " >&6; }
22394 if ${ac_cv_path_HG+:} false; then :
22395   $as_echo_n "(cached) " >&6
22396 else
22397   case $HG in
22398   [\\/]* | ?:[\\/]*)
22399   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22400   ;;
22401   *)
22402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22403 for as_dir in $PATH
22404 do
22405   IFS=$as_save_IFS
22406   test -z "$as_dir" && as_dir=.
22407     for ac_exec_ext in '' $ac_executable_extensions; do
22408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22409     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22411     break 2
22412   fi
22413 done
22414   done
22415 IFS=$as_save_IFS
22416 
22417   ;;
22418 esac
22419 fi
22420 HG=$ac_cv_path_HG
22421 if test -n "$HG"; then
22422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22423 $as_echo "$HG" >&6; }
22424 else
22425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22426 $as_echo "no" >&6; }
22427 fi
22428 
22429 
22430           if test "x$HG" = x; then
22431             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22432           fi
22433         else
22434           # Otherwise we believe it is a complete path. Use it as it is.
22435           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22436 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22437           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22438 $as_echo_n "checking for HG... " >&6; }
22439           if test ! -x "$tool_specified"; then
22440             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22441 $as_echo "not found" >&6; }
22442             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22443           fi
22444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22445 $as_echo "$tool_specified" >&6; }
22446         fi
22447       fi
22448     fi
22449 
22450   fi
22451 
22452 
22453 
22454 
22455   # Publish this variable in the help.
22456 
22457 
22458   if [ -z "${STAT+x}" ]; then
22459     # The variable is not set by user, try to locate tool using the code snippet
22460     for ac_prog in stat
22461 do
22462   # Extract the first word of "$ac_prog", so it can be a program name with args.
22463 set dummy $ac_prog; ac_word=$2
22464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22465 $as_echo_n "checking for $ac_word... " >&6; }
22466 if ${ac_cv_path_STAT+:} false; then :
22467   $as_echo_n "(cached) " >&6
22468 else
22469   case $STAT in
22470   [\\/]* | ?:[\\/]*)
22471   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22472   ;;
22473   *)
22474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22475 for as_dir in $PATH
22476 do
22477   IFS=$as_save_IFS
22478   test -z "$as_dir" && as_dir=.
22479     for ac_exec_ext in '' $ac_executable_extensions; do
22480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22481     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22483     break 2
22484   fi
22485 done
22486   done
22487 IFS=$as_save_IFS
22488 
22489   ;;
22490 esac
22491 fi
22492 STAT=$ac_cv_path_STAT
22493 if test -n "$STAT"; then
22494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22495 $as_echo "$STAT" >&6; }
22496 else
22497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22498 $as_echo "no" >&6; }
22499 fi
22500 
22501 
22502   test -n "$STAT" && break
22503 done
22504 
22505   else
22506     # The variable is set, but is it from the command line or the environment?
22507 
22508     # Try to remove the string !STAT! from our list.
22509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22511       # If it failed, the variable was not from the command line. Ignore it,
22512       # but warn the user (except for BASH, which is always set by the calling BASH).
22513       if test "xSTAT" != xBASH; then
22514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22515 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22516       fi
22517       # Try to locate tool using the code snippet
22518       for ac_prog in stat
22519 do
22520   # Extract the first word of "$ac_prog", so it can be a program name with args.
22521 set dummy $ac_prog; ac_word=$2
22522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22523 $as_echo_n "checking for $ac_word... " >&6; }
22524 if ${ac_cv_path_STAT+:} false; then :
22525   $as_echo_n "(cached) " >&6
22526 else
22527   case $STAT in
22528   [\\/]* | ?:[\\/]*)
22529   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22530   ;;
22531   *)
22532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22533 for as_dir in $PATH
22534 do
22535   IFS=$as_save_IFS
22536   test -z "$as_dir" && as_dir=.
22537     for ac_exec_ext in '' $ac_executable_extensions; do
22538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22539     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22541     break 2
22542   fi
22543 done
22544   done
22545 IFS=$as_save_IFS
22546 
22547   ;;
22548 esac
22549 fi
22550 STAT=$ac_cv_path_STAT
22551 if test -n "$STAT"; then
22552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22553 $as_echo "$STAT" >&6; }
22554 else
22555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22556 $as_echo "no" >&6; }
22557 fi
22558 
22559 
22560   test -n "$STAT" && break
22561 done
22562 
22563     else
22564       # If it succeeded, then it was overridden by the user. We will use it
22565       # for the tool.
22566 
22567       # First remove it from the list of overridden variables, so we can test
22568       # for unknown variables in the end.
22569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22570 
22571       # Check if we try to supply an empty value
22572       if test "x$STAT" = x; then
22573         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22574 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22576 $as_echo_n "checking for STAT... " >&6; }
22577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22578 $as_echo "disabled" >&6; }
22579       else
22580         # Check if the provided tool contains a complete path.
22581         tool_specified="$STAT"
22582         tool_basename="${tool_specified##*/}"
22583         if test "x$tool_basename" = "x$tool_specified"; then
22584           # A command without a complete path is provided, search $PATH.
22585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22586 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22587           # Extract the first word of "$tool_basename", so it can be a program name with args.
22588 set dummy $tool_basename; ac_word=$2
22589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22590 $as_echo_n "checking for $ac_word... " >&6; }
22591 if ${ac_cv_path_STAT+:} false; then :
22592   $as_echo_n "(cached) " >&6
22593 else
22594   case $STAT in
22595   [\\/]* | ?:[\\/]*)
22596   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22597   ;;
22598   *)
22599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22600 for as_dir in $PATH
22601 do
22602   IFS=$as_save_IFS
22603   test -z "$as_dir" && as_dir=.
22604     for ac_exec_ext in '' $ac_executable_extensions; do
22605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22606     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22608     break 2
22609   fi
22610 done
22611   done
22612 IFS=$as_save_IFS
22613 
22614   ;;
22615 esac
22616 fi
22617 STAT=$ac_cv_path_STAT
22618 if test -n "$STAT"; then
22619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22620 $as_echo "$STAT" >&6; }
22621 else
22622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22623 $as_echo "no" >&6; }
22624 fi
22625 
22626 
22627           if test "x$STAT" = x; then
22628             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22629           fi
22630         else
22631           # Otherwise we believe it is a complete path. Use it as it is.
22632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22633 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22634           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22635 $as_echo_n "checking for STAT... " >&6; }
22636           if test ! -x "$tool_specified"; then
22637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22638 $as_echo "not found" >&6; }
22639             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22640           fi
22641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22642 $as_echo "$tool_specified" >&6; }
22643         fi
22644       fi
22645     fi
22646 
22647   fi
22648 
22649 
22650 
22651 
22652   # Publish this variable in the help.
22653 
22654 
22655   if [ -z "${TIME+x}" ]; then
22656     # The variable is not set by user, try to locate tool using the code snippet
22657     for ac_prog in time
22658 do
22659   # Extract the first word of "$ac_prog", so it can be a program name with args.
22660 set dummy $ac_prog; ac_word=$2
22661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22662 $as_echo_n "checking for $ac_word... " >&6; }
22663 if ${ac_cv_path_TIME+:} false; then :
22664   $as_echo_n "(cached) " >&6
22665 else
22666   case $TIME in
22667   [\\/]* | ?:[\\/]*)
22668   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22669   ;;
22670   *)
22671   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22672 for as_dir in $PATH
22673 do
22674   IFS=$as_save_IFS
22675   test -z "$as_dir" && as_dir=.
22676     for ac_exec_ext in '' $ac_executable_extensions; do
22677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22678     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22680     break 2
22681   fi
22682 done
22683   done
22684 IFS=$as_save_IFS
22685 
22686   ;;
22687 esac
22688 fi
22689 TIME=$ac_cv_path_TIME
22690 if test -n "$TIME"; then
22691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22692 $as_echo "$TIME" >&6; }
22693 else
22694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22695 $as_echo "no" >&6; }
22696 fi
22697 
22698 
22699   test -n "$TIME" && break
22700 done
22701 
22702   else
22703     # The variable is set, but is it from the command line or the environment?
22704 
22705     # Try to remove the string !TIME! from our list.
22706     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22707     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22708       # If it failed, the variable was not from the command line. Ignore it,
22709       # but warn the user (except for BASH, which is always set by the calling BASH).
22710       if test "xTIME" != xBASH; then
22711         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22712 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22713       fi
22714       # Try to locate tool using the code snippet
22715       for ac_prog in time
22716 do
22717   # Extract the first word of "$ac_prog", so it can be a program name with args.
22718 set dummy $ac_prog; ac_word=$2
22719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22720 $as_echo_n "checking for $ac_word... " >&6; }
22721 if ${ac_cv_path_TIME+:} false; then :
22722   $as_echo_n "(cached) " >&6
22723 else
22724   case $TIME in
22725   [\\/]* | ?:[\\/]*)
22726   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22727   ;;
22728   *)
22729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22730 for as_dir in $PATH
22731 do
22732   IFS=$as_save_IFS
22733   test -z "$as_dir" && as_dir=.
22734     for ac_exec_ext in '' $ac_executable_extensions; do
22735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22736     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22738     break 2
22739   fi
22740 done
22741   done
22742 IFS=$as_save_IFS
22743 
22744   ;;
22745 esac
22746 fi
22747 TIME=$ac_cv_path_TIME
22748 if test -n "$TIME"; then
22749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22750 $as_echo "$TIME" >&6; }
22751 else
22752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22753 $as_echo "no" >&6; }
22754 fi
22755 
22756 
22757   test -n "$TIME" && break
22758 done
22759 
22760     else
22761       # If it succeeded, then it was overridden by the user. We will use it
22762       # for the tool.
22763 
22764       # First remove it from the list of overridden variables, so we can test
22765       # for unknown variables in the end.
22766       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22767 
22768       # Check if we try to supply an empty value
22769       if test "x$TIME" = x; then
22770         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22771 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22772         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22773 $as_echo_n "checking for TIME... " >&6; }
22774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22775 $as_echo "disabled" >&6; }
22776       else
22777         # Check if the provided tool contains a complete path.
22778         tool_specified="$TIME"
22779         tool_basename="${tool_specified##*/}"
22780         if test "x$tool_basename" = "x$tool_specified"; then
22781           # A command without a complete path is provided, search $PATH.
22782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22783 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22784           # Extract the first word of "$tool_basename", so it can be a program name with args.
22785 set dummy $tool_basename; ac_word=$2
22786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22787 $as_echo_n "checking for $ac_word... " >&6; }
22788 if ${ac_cv_path_TIME+:} false; then :
22789   $as_echo_n "(cached) " >&6
22790 else
22791   case $TIME in
22792   [\\/]* | ?:[\\/]*)
22793   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22794   ;;
22795   *)
22796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22797 for as_dir in $PATH
22798 do
22799   IFS=$as_save_IFS
22800   test -z "$as_dir" && as_dir=.
22801     for ac_exec_ext in '' $ac_executable_extensions; do
22802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22803     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22805     break 2
22806   fi
22807 done
22808   done
22809 IFS=$as_save_IFS
22810 
22811   ;;
22812 esac
22813 fi
22814 TIME=$ac_cv_path_TIME
22815 if test -n "$TIME"; then
22816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22817 $as_echo "$TIME" >&6; }
22818 else
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22820 $as_echo "no" >&6; }
22821 fi
22822 
22823 
22824           if test "x$TIME" = x; then
22825             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22826           fi
22827         else
22828           # Otherwise we believe it is a complete path. Use it as it is.
22829           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22830 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22831           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22832 $as_echo_n "checking for TIME... " >&6; }
22833           if test ! -x "$tool_specified"; then
22834             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22835 $as_echo "not found" >&6; }
22836             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22837           fi
22838           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22839 $as_echo "$tool_specified" >&6; }
22840         fi
22841       fi
22842     fi
22843 
22844   fi
22845 
22846 
22847   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22848   # be in the user path.
22849 
22850 
22851   # Publish this variable in the help.
22852 
22853 
22854   if [ -z "${DTRACE+x}" ]; then
22855     # The variable is not set by user, try to locate tool using the code snippet
22856     for ac_prog in dtrace
22857 do
22858   # Extract the first word of "$ac_prog", so it can be a program name with args.
22859 set dummy $ac_prog; ac_word=$2
22860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22861 $as_echo_n "checking for $ac_word... " >&6; }
22862 if ${ac_cv_path_DTRACE+:} false; then :
22863   $as_echo_n "(cached) " >&6
22864 else
22865   case $DTRACE in
22866   [\\/]* | ?:[\\/]*)
22867   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22868   ;;
22869   *)
22870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22871 as_dummy="$PATH:/usr/sbin"
22872 for as_dir in $as_dummy
22873 do
22874   IFS=$as_save_IFS
22875   test -z "$as_dir" && as_dir=.
22876     for ac_exec_ext in '' $ac_executable_extensions; do
22877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22878     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22880     break 2
22881   fi
22882 done
22883   done
22884 IFS=$as_save_IFS
22885 
22886   ;;
22887 esac
22888 fi
22889 DTRACE=$ac_cv_path_DTRACE
22890 if test -n "$DTRACE"; then
22891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22892 $as_echo "$DTRACE" >&6; }
22893 else
22894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22895 $as_echo "no" >&6; }
22896 fi
22897 
22898 
22899   test -n "$DTRACE" && break
22900 done
22901 
22902   else
22903     # The variable is set, but is it from the command line or the environment?
22904 
22905     # Try to remove the string !DTRACE! from our list.
22906     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22907     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22908       # If it failed, the variable was not from the command line. Ignore it,
22909       # but warn the user (except for BASH, which is always set by the calling BASH).
22910       if test "xDTRACE" != xBASH; then
22911         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22912 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22913       fi
22914       # Try to locate tool using the code snippet
22915       for ac_prog in dtrace
22916 do
22917   # Extract the first word of "$ac_prog", so it can be a program name with args.
22918 set dummy $ac_prog; ac_word=$2
22919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22920 $as_echo_n "checking for $ac_word... " >&6; }
22921 if ${ac_cv_path_DTRACE+:} false; then :
22922   $as_echo_n "(cached) " >&6
22923 else
22924   case $DTRACE in
22925   [\\/]* | ?:[\\/]*)
22926   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22927   ;;
22928   *)
22929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22930 as_dummy="$PATH:/usr/sbin"
22931 for as_dir in $as_dummy
22932 do
22933   IFS=$as_save_IFS
22934   test -z "$as_dir" && as_dir=.
22935     for ac_exec_ext in '' $ac_executable_extensions; do
22936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22937     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22939     break 2
22940   fi
22941 done
22942   done
22943 IFS=$as_save_IFS
22944 
22945   ;;
22946 esac
22947 fi
22948 DTRACE=$ac_cv_path_DTRACE
22949 if test -n "$DTRACE"; then
22950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22951 $as_echo "$DTRACE" >&6; }
22952 else
22953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22954 $as_echo "no" >&6; }
22955 fi
22956 
22957 
22958   test -n "$DTRACE" && break
22959 done
22960 
22961     else
22962       # If it succeeded, then it was overridden by the user. We will use it
22963       # for the tool.
22964 
22965       # First remove it from the list of overridden variables, so we can test
22966       # for unknown variables in the end.
22967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22968 
22969       # Check if we try to supply an empty value
22970       if test "x$DTRACE" = x; then
22971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22972 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22974 $as_echo_n "checking for DTRACE... " >&6; }
22975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22976 $as_echo "disabled" >&6; }
22977       else
22978         # Check if the provided tool contains a complete path.
22979         tool_specified="$DTRACE"
22980         tool_basename="${tool_specified##*/}"
22981         if test "x$tool_basename" = "x$tool_specified"; then
22982           # A command without a complete path is provided, search $PATH.
22983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22984 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22985           # Extract the first word of "$tool_basename", so it can be a program name with args.
22986 set dummy $tool_basename; ac_word=$2
22987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22988 $as_echo_n "checking for $ac_word... " >&6; }
22989 if ${ac_cv_path_DTRACE+:} false; then :
22990   $as_echo_n "(cached) " >&6
22991 else
22992   case $DTRACE in
22993   [\\/]* | ?:[\\/]*)
22994   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22995   ;;
22996   *)
22997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22998 for as_dir in $PATH
22999 do
23000   IFS=$as_save_IFS
23001   test -z "$as_dir" && as_dir=.
23002     for ac_exec_ext in '' $ac_executable_extensions; do
23003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23004     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23006     break 2
23007   fi
23008 done
23009   done
23010 IFS=$as_save_IFS
23011 
23012   ;;
23013 esac
23014 fi
23015 DTRACE=$ac_cv_path_DTRACE
23016 if test -n "$DTRACE"; then
23017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23018 $as_echo "$DTRACE" >&6; }
23019 else
23020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23021 $as_echo "no" >&6; }
23022 fi
23023 
23024 
23025           if test "x$DTRACE" = x; then
23026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23027           fi
23028         else
23029           # Otherwise we believe it is a complete path. Use it as it is.
23030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23031 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23033 $as_echo_n "checking for DTRACE... " >&6; }
23034           if test ! -x "$tool_specified"; then
23035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23036 $as_echo "not found" >&6; }
23037             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23038           fi
23039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23040 $as_echo "$tool_specified" >&6; }
23041         fi
23042       fi
23043     fi
23044 
23045   fi
23046 
23047 
23048 
23049 
23050   # Publish this variable in the help.
23051 
23052 
23053   if [ -z "${PATCH+x}" ]; then
23054     # The variable is not set by user, try to locate tool using the code snippet
23055     for ac_prog in gpatch patch
23056 do
23057   # Extract the first word of "$ac_prog", so it can be a program name with args.
23058 set dummy $ac_prog; ac_word=$2
23059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23060 $as_echo_n "checking for $ac_word... " >&6; }
23061 if ${ac_cv_path_PATCH+:} false; then :
23062   $as_echo_n "(cached) " >&6
23063 else
23064   case $PATCH in
23065   [\\/]* | ?:[\\/]*)
23066   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23067   ;;
23068   *)
23069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23070 for as_dir in $PATH
23071 do
23072   IFS=$as_save_IFS
23073   test -z "$as_dir" && as_dir=.
23074     for ac_exec_ext in '' $ac_executable_extensions; do
23075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23076     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23078     break 2
23079   fi
23080 done
23081   done
23082 IFS=$as_save_IFS
23083 
23084   ;;
23085 esac
23086 fi
23087 PATCH=$ac_cv_path_PATCH
23088 if test -n "$PATCH"; then
23089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23090 $as_echo "$PATCH" >&6; }
23091 else
23092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23093 $as_echo "no" >&6; }
23094 fi
23095 
23096 
23097   test -n "$PATCH" && break
23098 done
23099 
23100   else
23101     # The variable is set, but is it from the command line or the environment?
23102 
23103     # Try to remove the string !PATCH! from our list.
23104     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23105     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23106       # If it failed, the variable was not from the command line. Ignore it,
23107       # but warn the user (except for BASH, which is always set by the calling BASH).
23108       if test "xPATCH" != xBASH; then
23109         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23110 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23111       fi
23112       # Try to locate tool using the code snippet
23113       for ac_prog in gpatch patch
23114 do
23115   # Extract the first word of "$ac_prog", so it can be a program name with args.
23116 set dummy $ac_prog; ac_word=$2
23117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23118 $as_echo_n "checking for $ac_word... " >&6; }
23119 if ${ac_cv_path_PATCH+:} false; then :
23120   $as_echo_n "(cached) " >&6
23121 else
23122   case $PATCH in
23123   [\\/]* | ?:[\\/]*)
23124   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23125   ;;
23126   *)
23127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23128 for as_dir in $PATH
23129 do
23130   IFS=$as_save_IFS
23131   test -z "$as_dir" && as_dir=.
23132     for ac_exec_ext in '' $ac_executable_extensions; do
23133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23134     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23136     break 2
23137   fi
23138 done
23139   done
23140 IFS=$as_save_IFS
23141 
23142   ;;
23143 esac
23144 fi
23145 PATCH=$ac_cv_path_PATCH
23146 if test -n "$PATCH"; then
23147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23148 $as_echo "$PATCH" >&6; }
23149 else
23150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23151 $as_echo "no" >&6; }
23152 fi
23153 
23154 
23155   test -n "$PATCH" && break
23156 done
23157 
23158     else
23159       # If it succeeded, then it was overridden by the user. We will use it
23160       # for the tool.
23161 
23162       # First remove it from the list of overridden variables, so we can test
23163       # for unknown variables in the end.
23164       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23165 
23166       # Check if we try to supply an empty value
23167       if test "x$PATCH" = x; then
23168         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23169 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23171 $as_echo_n "checking for PATCH... " >&6; }
23172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23173 $as_echo "disabled" >&6; }
23174       else
23175         # Check if the provided tool contains a complete path.
23176         tool_specified="$PATCH"
23177         tool_basename="${tool_specified##*/}"
23178         if test "x$tool_basename" = "x$tool_specified"; then
23179           # A command without a complete path is provided, search $PATH.
23180           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23181 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23182           # Extract the first word of "$tool_basename", so it can be a program name with args.
23183 set dummy $tool_basename; ac_word=$2
23184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23185 $as_echo_n "checking for $ac_word... " >&6; }
23186 if ${ac_cv_path_PATCH+:} false; then :
23187   $as_echo_n "(cached) " >&6
23188 else
23189   case $PATCH in
23190   [\\/]* | ?:[\\/]*)
23191   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23192   ;;
23193   *)
23194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23195 for as_dir in $PATH
23196 do
23197   IFS=$as_save_IFS
23198   test -z "$as_dir" && as_dir=.
23199     for ac_exec_ext in '' $ac_executable_extensions; do
23200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23201     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23203     break 2
23204   fi
23205 done
23206   done
23207 IFS=$as_save_IFS
23208 
23209   ;;
23210 esac
23211 fi
23212 PATCH=$ac_cv_path_PATCH
23213 if test -n "$PATCH"; then
23214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23215 $as_echo "$PATCH" >&6; }
23216 else
23217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23218 $as_echo "no" >&6; }
23219 fi
23220 
23221 
23222           if test "x$PATCH" = x; then
23223             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23224           fi
23225         else
23226           # Otherwise we believe it is a complete path. Use it as it is.
23227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23228 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23229           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23230 $as_echo_n "checking for PATCH... " >&6; }
23231           if test ! -x "$tool_specified"; then
23232             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23233 $as_echo "not found" >&6; }
23234             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23235           fi
23236           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23237 $as_echo "$tool_specified" >&6; }
23238         fi
23239       fi
23240     fi
23241 
23242   fi
23243 
23244 
23245   # Check if it's GNU time
23246   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23247   if test "x$IS_GNU_TIME" != x; then
23248     IS_GNU_TIME=yes
23249   else
23250     IS_GNU_TIME=no
23251   fi
23252 
23253 
23254   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23255 
23256 
23257 
23258   # Publish this variable in the help.
23259 
23260 
23261   if [ -z "${DSYMUTIL+x}" ]; then
23262     # The variable is not set by user, try to locate tool using the code snippet
23263     for ac_prog in dsymutil
23264 do
23265   # Extract the first word of "$ac_prog", so it can be a program name with args.
23266 set dummy $ac_prog; ac_word=$2
23267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23268 $as_echo_n "checking for $ac_word... " >&6; }
23269 if ${ac_cv_path_DSYMUTIL+:} false; then :
23270   $as_echo_n "(cached) " >&6
23271 else
23272   case $DSYMUTIL in
23273   [\\/]* | ?:[\\/]*)
23274   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23275   ;;
23276   *)
23277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23278 for as_dir in $PATH
23279 do
23280   IFS=$as_save_IFS
23281   test -z "$as_dir" && as_dir=.
23282     for ac_exec_ext in '' $ac_executable_extensions; do
23283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23284     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23286     break 2
23287   fi
23288 done
23289   done
23290 IFS=$as_save_IFS
23291 
23292   ;;
23293 esac
23294 fi
23295 DSYMUTIL=$ac_cv_path_DSYMUTIL
23296 if test -n "$DSYMUTIL"; then
23297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23298 $as_echo "$DSYMUTIL" >&6; }
23299 else
23300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23301 $as_echo "no" >&6; }
23302 fi
23303 
23304 
23305   test -n "$DSYMUTIL" && break
23306 done
23307 
23308   else
23309     # The variable is set, but is it from the command line or the environment?
23310 
23311     # Try to remove the string !DSYMUTIL! from our list.
23312     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23313     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23314       # If it failed, the variable was not from the command line. Ignore it,
23315       # but warn the user (except for BASH, which is always set by the calling BASH).
23316       if test "xDSYMUTIL" != xBASH; then
23317         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23318 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23319       fi
23320       # Try to locate tool using the code snippet
23321       for ac_prog in dsymutil
23322 do
23323   # Extract the first word of "$ac_prog", so it can be a program name with args.
23324 set dummy $ac_prog; ac_word=$2
23325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23326 $as_echo_n "checking for $ac_word... " >&6; }
23327 if ${ac_cv_path_DSYMUTIL+:} false; then :
23328   $as_echo_n "(cached) " >&6
23329 else
23330   case $DSYMUTIL in
23331   [\\/]* | ?:[\\/]*)
23332   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23333   ;;
23334   *)
23335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23336 for as_dir in $PATH
23337 do
23338   IFS=$as_save_IFS
23339   test -z "$as_dir" && as_dir=.
23340     for ac_exec_ext in '' $ac_executable_extensions; do
23341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23342     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23344     break 2
23345   fi
23346 done
23347   done
23348 IFS=$as_save_IFS
23349 
23350   ;;
23351 esac
23352 fi
23353 DSYMUTIL=$ac_cv_path_DSYMUTIL
23354 if test -n "$DSYMUTIL"; then
23355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23356 $as_echo "$DSYMUTIL" >&6; }
23357 else
23358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23359 $as_echo "no" >&6; }
23360 fi
23361 
23362 
23363   test -n "$DSYMUTIL" && break
23364 done
23365 
23366     else
23367       # If it succeeded, then it was overridden by the user. We will use it
23368       # for the tool.
23369 
23370       # First remove it from the list of overridden variables, so we can test
23371       # for unknown variables in the end.
23372       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23373 
23374       # Check if we try to supply an empty value
23375       if test "x$DSYMUTIL" = x; then
23376         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23377 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23378         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23379 $as_echo_n "checking for DSYMUTIL... " >&6; }
23380         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23381 $as_echo "disabled" >&6; }
23382       else
23383         # Check if the provided tool contains a complete path.
23384         tool_specified="$DSYMUTIL"
23385         tool_basename="${tool_specified##*/}"
23386         if test "x$tool_basename" = "x$tool_specified"; then
23387           # A command without a complete path is provided, search $PATH.
23388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23389 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23390           # Extract the first word of "$tool_basename", so it can be a program name with args.
23391 set dummy $tool_basename; ac_word=$2
23392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23393 $as_echo_n "checking for $ac_word... " >&6; }
23394 if ${ac_cv_path_DSYMUTIL+:} false; then :
23395   $as_echo_n "(cached) " >&6
23396 else
23397   case $DSYMUTIL in
23398   [\\/]* | ?:[\\/]*)
23399   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23400   ;;
23401   *)
23402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23403 for as_dir in $PATH
23404 do
23405   IFS=$as_save_IFS
23406   test -z "$as_dir" && as_dir=.
23407     for ac_exec_ext in '' $ac_executable_extensions; do
23408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23409     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23411     break 2
23412   fi
23413 done
23414   done
23415 IFS=$as_save_IFS
23416 
23417   ;;
23418 esac
23419 fi
23420 DSYMUTIL=$ac_cv_path_DSYMUTIL
23421 if test -n "$DSYMUTIL"; then
23422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23423 $as_echo "$DSYMUTIL" >&6; }
23424 else
23425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23426 $as_echo "no" >&6; }
23427 fi
23428 
23429 
23430           if test "x$DSYMUTIL" = x; then
23431             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23432           fi
23433         else
23434           # Otherwise we believe it is a complete path. Use it as it is.
23435           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23436 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23437           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23438 $as_echo_n "checking for DSYMUTIL... " >&6; }
23439           if test ! -x "$tool_specified"; then
23440             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23441 $as_echo "not found" >&6; }
23442             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23443           fi
23444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23445 $as_echo "$tool_specified" >&6; }
23446         fi
23447       fi
23448     fi
23449 
23450   fi
23451 
23452 
23453 
23454   if test "x$DSYMUTIL" = x; then
23455     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23456   fi
23457 
23458 
23459 
23460 
23461 
23462   # Publish this variable in the help.
23463 
23464 
23465   if [ -z "${XATTR+x}" ]; then
23466     # The variable is not set by user, try to locate tool using the code snippet
23467     for ac_prog in xattr
23468 do
23469   # Extract the first word of "$ac_prog", so it can be a program name with args.
23470 set dummy $ac_prog; ac_word=$2
23471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23472 $as_echo_n "checking for $ac_word... " >&6; }
23473 if ${ac_cv_path_XATTR+:} false; then :
23474   $as_echo_n "(cached) " >&6
23475 else
23476   case $XATTR in
23477   [\\/]* | ?:[\\/]*)
23478   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23479   ;;
23480   *)
23481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23482 for as_dir in $PATH
23483 do
23484   IFS=$as_save_IFS
23485   test -z "$as_dir" && as_dir=.
23486     for ac_exec_ext in '' $ac_executable_extensions; do
23487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23488     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23490     break 2
23491   fi
23492 done
23493   done
23494 IFS=$as_save_IFS
23495 
23496   ;;
23497 esac
23498 fi
23499 XATTR=$ac_cv_path_XATTR
23500 if test -n "$XATTR"; then
23501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23502 $as_echo "$XATTR" >&6; }
23503 else
23504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23505 $as_echo "no" >&6; }
23506 fi
23507 
23508 
23509   test -n "$XATTR" && break
23510 done
23511 
23512   else
23513     # The variable is set, but is it from the command line or the environment?
23514 
23515     # Try to remove the string !XATTR! from our list.
23516     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23517     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23518       # If it failed, the variable was not from the command line. Ignore it,
23519       # but warn the user (except for BASH, which is always set by the calling BASH).
23520       if test "xXATTR" != xBASH; then
23521         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23522 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23523       fi
23524       # Try to locate tool using the code snippet
23525       for ac_prog in xattr
23526 do
23527   # Extract the first word of "$ac_prog", so it can be a program name with args.
23528 set dummy $ac_prog; ac_word=$2
23529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23530 $as_echo_n "checking for $ac_word... " >&6; }
23531 if ${ac_cv_path_XATTR+:} false; then :
23532   $as_echo_n "(cached) " >&6
23533 else
23534   case $XATTR in
23535   [\\/]* | ?:[\\/]*)
23536   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23537   ;;
23538   *)
23539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23540 for as_dir in $PATH
23541 do
23542   IFS=$as_save_IFS
23543   test -z "$as_dir" && as_dir=.
23544     for ac_exec_ext in '' $ac_executable_extensions; do
23545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23546     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23548     break 2
23549   fi
23550 done
23551   done
23552 IFS=$as_save_IFS
23553 
23554   ;;
23555 esac
23556 fi
23557 XATTR=$ac_cv_path_XATTR
23558 if test -n "$XATTR"; then
23559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23560 $as_echo "$XATTR" >&6; }
23561 else
23562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23563 $as_echo "no" >&6; }
23564 fi
23565 
23566 
23567   test -n "$XATTR" && break
23568 done
23569 
23570     else
23571       # If it succeeded, then it was overridden by the user. We will use it
23572       # for the tool.
23573 
23574       # First remove it from the list of overridden variables, so we can test
23575       # for unknown variables in the end.
23576       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23577 
23578       # Check if we try to supply an empty value
23579       if test "x$XATTR" = x; then
23580         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23581 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23583 $as_echo_n "checking for XATTR... " >&6; }
23584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23585 $as_echo "disabled" >&6; }
23586       else
23587         # Check if the provided tool contains a complete path.
23588         tool_specified="$XATTR"
23589         tool_basename="${tool_specified##*/}"
23590         if test "x$tool_basename" = "x$tool_specified"; then
23591           # A command without a complete path is provided, search $PATH.
23592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23593 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23594           # Extract the first word of "$tool_basename", so it can be a program name with args.
23595 set dummy $tool_basename; ac_word=$2
23596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23597 $as_echo_n "checking for $ac_word... " >&6; }
23598 if ${ac_cv_path_XATTR+:} false; then :
23599   $as_echo_n "(cached) " >&6
23600 else
23601   case $XATTR in
23602   [\\/]* | ?:[\\/]*)
23603   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23604   ;;
23605   *)
23606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23607 for as_dir in $PATH
23608 do
23609   IFS=$as_save_IFS
23610   test -z "$as_dir" && as_dir=.
23611     for ac_exec_ext in '' $ac_executable_extensions; do
23612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23613     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23615     break 2
23616   fi
23617 done
23618   done
23619 IFS=$as_save_IFS
23620 
23621   ;;
23622 esac
23623 fi
23624 XATTR=$ac_cv_path_XATTR
23625 if test -n "$XATTR"; then
23626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23627 $as_echo "$XATTR" >&6; }
23628 else
23629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23630 $as_echo "no" >&6; }
23631 fi
23632 
23633 
23634           if test "x$XATTR" = x; then
23635             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23636           fi
23637         else
23638           # Otherwise we believe it is a complete path. Use it as it is.
23639           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23640 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23641           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23642 $as_echo_n "checking for XATTR... " >&6; }
23643           if test ! -x "$tool_specified"; then
23644             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23645 $as_echo "not found" >&6; }
23646             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23647           fi
23648           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23649 $as_echo "$tool_specified" >&6; }
23650         fi
23651       fi
23652     fi
23653 
23654   fi
23655 
23656 
23657 
23658   if test "x$XATTR" = x; then
23659     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23660   fi
23661 
23662 
23663 
23664 
23665   # Publish this variable in the help.
23666 
23667 
23668   if [ -z "${CODESIGN+x}" ]; then
23669     # The variable is not set by user, try to locate tool using the code snippet
23670     for ac_prog in codesign
23671 do
23672   # Extract the first word of "$ac_prog", so it can be a program name with args.
23673 set dummy $ac_prog; ac_word=$2
23674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23675 $as_echo_n "checking for $ac_word... " >&6; }
23676 if ${ac_cv_path_CODESIGN+:} false; then :
23677   $as_echo_n "(cached) " >&6
23678 else
23679   case $CODESIGN in
23680   [\\/]* | ?:[\\/]*)
23681   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23682   ;;
23683   *)
23684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23685 for as_dir in $PATH
23686 do
23687   IFS=$as_save_IFS
23688   test -z "$as_dir" && as_dir=.
23689     for ac_exec_ext in '' $ac_executable_extensions; do
23690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23691     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23693     break 2
23694   fi
23695 done
23696   done
23697 IFS=$as_save_IFS
23698 
23699   ;;
23700 esac
23701 fi
23702 CODESIGN=$ac_cv_path_CODESIGN
23703 if test -n "$CODESIGN"; then
23704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23705 $as_echo "$CODESIGN" >&6; }
23706 else
23707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23708 $as_echo "no" >&6; }
23709 fi
23710 
23711 
23712   test -n "$CODESIGN" && break
23713 done
23714 
23715   else
23716     # The variable is set, but is it from the command line or the environment?
23717 
23718     # Try to remove the string !CODESIGN! from our list.
23719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23721       # If it failed, the variable was not from the command line. Ignore it,
23722       # but warn the user (except for BASH, which is always set by the calling BASH).
23723       if test "xCODESIGN" != xBASH; then
23724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23725 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23726       fi
23727       # Try to locate tool using the code snippet
23728       for ac_prog in codesign
23729 do
23730   # Extract the first word of "$ac_prog", so it can be a program name with args.
23731 set dummy $ac_prog; ac_word=$2
23732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23733 $as_echo_n "checking for $ac_word... " >&6; }
23734 if ${ac_cv_path_CODESIGN+:} false; then :
23735   $as_echo_n "(cached) " >&6
23736 else
23737   case $CODESIGN in
23738   [\\/]* | ?:[\\/]*)
23739   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23740   ;;
23741   *)
23742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23743 for as_dir in $PATH
23744 do
23745   IFS=$as_save_IFS
23746   test -z "$as_dir" && as_dir=.
23747     for ac_exec_ext in '' $ac_executable_extensions; do
23748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23749     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23751     break 2
23752   fi
23753 done
23754   done
23755 IFS=$as_save_IFS
23756 
23757   ;;
23758 esac
23759 fi
23760 CODESIGN=$ac_cv_path_CODESIGN
23761 if test -n "$CODESIGN"; then
23762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23763 $as_echo "$CODESIGN" >&6; }
23764 else
23765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23766 $as_echo "no" >&6; }
23767 fi
23768 
23769 
23770   test -n "$CODESIGN" && break
23771 done
23772 
23773     else
23774       # If it succeeded, then it was overridden by the user. We will use it
23775       # for the tool.
23776 
23777       # First remove it from the list of overridden variables, so we can test
23778       # for unknown variables in the end.
23779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23780 
23781       # Check if we try to supply an empty value
23782       if test "x$CODESIGN" = x; then
23783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23784 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23786 $as_echo_n "checking for CODESIGN... " >&6; }
23787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23788 $as_echo "disabled" >&6; }
23789       else
23790         # Check if the provided tool contains a complete path.
23791         tool_specified="$CODESIGN"
23792         tool_basename="${tool_specified##*/}"
23793         if test "x$tool_basename" = "x$tool_specified"; then
23794           # A command without a complete path is provided, search $PATH.
23795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23796 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23797           # Extract the first word of "$tool_basename", so it can be a program name with args.
23798 set dummy $tool_basename; ac_word=$2
23799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23800 $as_echo_n "checking for $ac_word... " >&6; }
23801 if ${ac_cv_path_CODESIGN+:} false; then :
23802   $as_echo_n "(cached) " >&6
23803 else
23804   case $CODESIGN in
23805   [\\/]* | ?:[\\/]*)
23806   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23807   ;;
23808   *)
23809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23810 for as_dir in $PATH
23811 do
23812   IFS=$as_save_IFS
23813   test -z "$as_dir" && as_dir=.
23814     for ac_exec_ext in '' $ac_executable_extensions; do
23815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23816     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23818     break 2
23819   fi
23820 done
23821   done
23822 IFS=$as_save_IFS
23823 
23824   ;;
23825 esac
23826 fi
23827 CODESIGN=$ac_cv_path_CODESIGN
23828 if test -n "$CODESIGN"; then
23829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23830 $as_echo "$CODESIGN" >&6; }
23831 else
23832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23833 $as_echo "no" >&6; }
23834 fi
23835 
23836 
23837           if test "x$CODESIGN" = x; then
23838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23839           fi
23840         else
23841           # Otherwise we believe it is a complete path. Use it as it is.
23842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23843 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23845 $as_echo_n "checking for CODESIGN... " >&6; }
23846           if test ! -x "$tool_specified"; then
23847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23848 $as_echo "not found" >&6; }
23849             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23850           fi
23851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23852 $as_echo "$tool_specified" >&6; }
23853         fi
23854       fi
23855     fi
23856 
23857   fi
23858 
23859 
23860     if test "x$CODESIGN" != "x"; then
23861       # Verify that the openjdk_codesign certificate is present
23862       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23863 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23864       $RM codesign-testfile
23865       $TOUCH codesign-testfile
23866       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23867       $RM codesign-testfile
23868       if test "x$CODESIGN" = x; then
23869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23870 $as_echo "no" >&6; }
23871       else
23872         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23873 $as_echo "yes" >&6; }
23874       fi
23875     fi
23876 
23877 
23878 
23879   # Publish this variable in the help.
23880 
23881 
23882   if [ -z "${SETFILE+x}" ]; then
23883     # The variable is not set by user, try to locate tool using the code snippet
23884     for ac_prog in SetFile
23885 do
23886   # Extract the first word of "$ac_prog", so it can be a program name with args.
23887 set dummy $ac_prog; ac_word=$2
23888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23889 $as_echo_n "checking for $ac_word... " >&6; }
23890 if ${ac_cv_path_SETFILE+:} false; then :
23891   $as_echo_n "(cached) " >&6
23892 else
23893   case $SETFILE in
23894   [\\/]* | ?:[\\/]*)
23895   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23896   ;;
23897   *)
23898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23899 for as_dir in $PATH
23900 do
23901   IFS=$as_save_IFS
23902   test -z "$as_dir" && as_dir=.
23903     for ac_exec_ext in '' $ac_executable_extensions; do
23904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23905     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23907     break 2
23908   fi
23909 done
23910   done
23911 IFS=$as_save_IFS
23912 
23913   ;;
23914 esac
23915 fi
23916 SETFILE=$ac_cv_path_SETFILE
23917 if test -n "$SETFILE"; then
23918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23919 $as_echo "$SETFILE" >&6; }
23920 else
23921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23922 $as_echo "no" >&6; }
23923 fi
23924 
23925 
23926   test -n "$SETFILE" && break
23927 done
23928 
23929   else
23930     # The variable is set, but is it from the command line or the environment?
23931 
23932     # Try to remove the string !SETFILE! from our list.
23933     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23934     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23935       # If it failed, the variable was not from the command line. Ignore it,
23936       # but warn the user (except for BASH, which is always set by the calling BASH).
23937       if test "xSETFILE" != xBASH; then
23938         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23939 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23940       fi
23941       # Try to locate tool using the code snippet
23942       for ac_prog in SetFile
23943 do
23944   # Extract the first word of "$ac_prog", so it can be a program name with args.
23945 set dummy $ac_prog; ac_word=$2
23946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23947 $as_echo_n "checking for $ac_word... " >&6; }
23948 if ${ac_cv_path_SETFILE+:} false; then :
23949   $as_echo_n "(cached) " >&6
23950 else
23951   case $SETFILE in
23952   [\\/]* | ?:[\\/]*)
23953   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23954   ;;
23955   *)
23956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23957 for as_dir in $PATH
23958 do
23959   IFS=$as_save_IFS
23960   test -z "$as_dir" && as_dir=.
23961     for ac_exec_ext in '' $ac_executable_extensions; do
23962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23963     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23965     break 2
23966   fi
23967 done
23968   done
23969 IFS=$as_save_IFS
23970 
23971   ;;
23972 esac
23973 fi
23974 SETFILE=$ac_cv_path_SETFILE
23975 if test -n "$SETFILE"; then
23976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23977 $as_echo "$SETFILE" >&6; }
23978 else
23979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23980 $as_echo "no" >&6; }
23981 fi
23982 
23983 
23984   test -n "$SETFILE" && break
23985 done
23986 
23987     else
23988       # If it succeeded, then it was overridden by the user. We will use it
23989       # for the tool.
23990 
23991       # First remove it from the list of overridden variables, so we can test
23992       # for unknown variables in the end.
23993       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23994 
23995       # Check if we try to supply an empty value
23996       if test "x$SETFILE" = x; then
23997         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23998 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23999         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24000 $as_echo_n "checking for SETFILE... " >&6; }
24001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24002 $as_echo "disabled" >&6; }
24003       else
24004         # Check if the provided tool contains a complete path.
24005         tool_specified="$SETFILE"
24006         tool_basename="${tool_specified##*/}"
24007         if test "x$tool_basename" = "x$tool_specified"; then
24008           # A command without a complete path is provided, search $PATH.
24009           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24010 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24011           # Extract the first word of "$tool_basename", so it can be a program name with args.
24012 set dummy $tool_basename; ac_word=$2
24013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24014 $as_echo_n "checking for $ac_word... " >&6; }
24015 if ${ac_cv_path_SETFILE+:} false; then :
24016   $as_echo_n "(cached) " >&6
24017 else
24018   case $SETFILE in
24019   [\\/]* | ?:[\\/]*)
24020   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24021   ;;
24022   *)
24023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24024 for as_dir in $PATH
24025 do
24026   IFS=$as_save_IFS
24027   test -z "$as_dir" && as_dir=.
24028     for ac_exec_ext in '' $ac_executable_extensions; do
24029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24030     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24032     break 2
24033   fi
24034 done
24035   done
24036 IFS=$as_save_IFS
24037 
24038   ;;
24039 esac
24040 fi
24041 SETFILE=$ac_cv_path_SETFILE
24042 if test -n "$SETFILE"; then
24043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24044 $as_echo "$SETFILE" >&6; }
24045 else
24046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24047 $as_echo "no" >&6; }
24048 fi
24049 
24050 
24051           if test "x$SETFILE" = x; then
24052             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24053           fi
24054         else
24055           # Otherwise we believe it is a complete path. Use it as it is.
24056           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24057 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24058           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24059 $as_echo_n "checking for SETFILE... " >&6; }
24060           if test ! -x "$tool_specified"; then
24061             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24062 $as_echo "not found" >&6; }
24063             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24064           fi
24065           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24066 $as_echo "$tool_specified" >&6; }
24067         fi
24068       fi
24069     fi
24070 
24071   fi
24072 
24073 
24074 
24075   if test "x$SETFILE" = x; then
24076     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24077   fi
24078 
24079 
24080   fi
24081 
24082 
24083   # Test if bash supports pipefail.
24084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24085 $as_echo_n "checking if bash supports pipefail... " >&6; }
24086   if ${BASH} -c 'set -o pipefail'; then
24087     BASH_ARGS="$BASH_ARGS -o pipefail"
24088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24089 $as_echo "yes" >&6; }
24090   else
24091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24092 $as_echo "no" >&6; }
24093   fi
24094 
24095   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24096 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24097   if ${BASH} -e -c 'true'; then
24098     BASH_ARGS="$BASH_ARGS -e"
24099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24100 $as_echo "yes" >&6; }
24101   else
24102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24103 $as_echo "no" >&6; }
24104   fi
24105 
24106 
24107 
24108 
24109 # Check if pkg-config is available.
24110 
24111 
24112 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24113         if test -n "$ac_tool_prefix"; then
24114   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24115 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24117 $as_echo_n "checking for $ac_word... " >&6; }
24118 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24119   $as_echo_n "(cached) " >&6
24120 else
24121   case $PKG_CONFIG in
24122   [\\/]* | ?:[\\/]*)
24123   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24124   ;;
24125   *)
24126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24127 for as_dir in $PATH
24128 do
24129   IFS=$as_save_IFS
24130   test -z "$as_dir" && as_dir=.
24131     for ac_exec_ext in '' $ac_executable_extensions; do
24132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24133     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24135     break 2
24136   fi
24137 done
24138   done
24139 IFS=$as_save_IFS
24140 
24141   ;;
24142 esac
24143 fi
24144 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24145 if test -n "$PKG_CONFIG"; then
24146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24147 $as_echo "$PKG_CONFIG" >&6; }
24148 else
24149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24150 $as_echo "no" >&6; }
24151 fi
24152 
24153 
24154 fi
24155 if test -z "$ac_cv_path_PKG_CONFIG"; then
24156   ac_pt_PKG_CONFIG=$PKG_CONFIG
24157   # Extract the first word of "pkg-config", so it can be a program name with args.
24158 set dummy pkg-config; ac_word=$2
24159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160 $as_echo_n "checking for $ac_word... " >&6; }
24161 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24162   $as_echo_n "(cached) " >&6
24163 else
24164   case $ac_pt_PKG_CONFIG in
24165   [\\/]* | ?:[\\/]*)
24166   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24167   ;;
24168   *)
24169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170 for as_dir in $PATH
24171 do
24172   IFS=$as_save_IFS
24173   test -z "$as_dir" && as_dir=.
24174     for ac_exec_ext in '' $ac_executable_extensions; do
24175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24176     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178     break 2
24179   fi
24180 done
24181   done
24182 IFS=$as_save_IFS
24183 
24184   ;;
24185 esac
24186 fi
24187 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24188 if test -n "$ac_pt_PKG_CONFIG"; then
24189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24190 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24191 else
24192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193 $as_echo "no" >&6; }
24194 fi
24195 
24196   if test "x$ac_pt_PKG_CONFIG" = x; then
24197     PKG_CONFIG=""
24198   else
24199     case $cross_compiling:$ac_tool_warned in
24200 yes:)
24201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24202 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24203 ac_tool_warned=yes ;;
24204 esac
24205     PKG_CONFIG=$ac_pt_PKG_CONFIG
24206   fi
24207 else
24208   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24209 fi
24210 
24211 fi
24212 if test -n "$PKG_CONFIG"; then
24213         _pkg_min_version=0.9.0
24214         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24215 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24216         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24217                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24218 $as_echo "yes" >&6; }
24219         else
24220                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24221 $as_echo "no" >&6; }
24222                 PKG_CONFIG=""
24223         fi
24224 
24225 fi
24226 
24227 # After basic tools have been setup, we can check build os specific details.
24228 
24229   ###############################################################################
24230 
24231   # Note that this is the build platform OS version!
24232 
24233   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24234   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24235   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24236   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24237 
24238 
24239 
24240 
24241 
24242 # Misc basic settings
24243 
24244 
24245 # Check whether --with-default-make-target was given.
24246 if test "${with_default_make_target+set}" = set; then :
24247   withval=$with_default_make_target;
24248 fi
24249 
24250   if test "x$with_default_make_target" = "x" \
24251       || test "x$with_default_make_target" = "xyes"; then
24252     DEFAULT_MAKE_TARGET="exploded-image"
24253   elif test "x$with_default_make_target" = "xno"; then
24254     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24255   else
24256     DEFAULT_MAKE_TARGET="$with_default_make_target"
24257   fi
24258 
24259 
24260 
24261 
24262 ###############################################################################
24263 #
24264 # Determine OpenJDK variants, options and version numbers.
24265 #
24266 ###############################################################################
24267 
24268 # We need build & target for this.
24269 
24270   # Should we build a JDK without a graphical UI?
24271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24272 $as_echo_n "checking headless only... " >&6; }
24273   # Check whether --enable-headless-only was given.
24274 if test "${enable_headless_only+set}" = set; then :
24275   enableval=$enable_headless_only;
24276 fi
24277 
24278 
24279   if test "x$enable_headless_only" = "xyes"; then
24280     ENABLE_HEADLESS_ONLY="true"
24281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24282 $as_echo "yes" >&6; }
24283   elif test "x$enable_headless_only" = "xno"; then
24284     ENABLE_HEADLESS_ONLY="false"
24285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24286 $as_echo "no" >&6; }
24287   elif test "x$enable_headless_only" = "x"; then
24288     ENABLE_HEADLESS_ONLY="false"
24289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24290 $as_echo "no" >&6; }
24291   else
24292     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24293   fi
24294 
24295 
24296 
24297   # Choose cacerts source file
24298 
24299 # Check whether --with-cacerts-file was given.
24300 if test "${with_cacerts_file+set}" = set; then :
24301   withval=$with_cacerts_file;
24302 fi
24303 
24304   if test "x$with_cacerts_file" != x; then
24305     CACERTS_FILE=$with_cacerts_file
24306   fi
24307 
24308 
24309   # Enable or disable unlimited crypto
24310   # Check whether --enable-unlimited-crypto was given.
24311 if test "${enable_unlimited_crypto+set}" = set; then :
24312   enableval=$enable_unlimited_crypto;
24313 else
24314   enable_unlimited_crypto=yes
24315 fi
24316 
24317   if test "x$enable_unlimited_crypto" = "xyes"; then
24318     UNLIMITED_CRYPTO=true
24319   else
24320     UNLIMITED_CRYPTO=false
24321   fi
24322 
24323 
24324   # Should we build the serviceability agent (SA)?
24325   INCLUDE_SA=true
24326   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24327     INCLUDE_SA=false
24328   fi
24329   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24330     INCLUDE_SA=false
24331   fi
24332 
24333 
24334   # Compress jars
24335   COMPRESS_JARS=false
24336 
24337 
24338 
24339   # Setup default copyright year. Mostly overridden when building close to a new year.
24340 
24341 # Check whether --with-copyright-year was given.
24342 if test "${with_copyright_year+set}" = set; then :
24343   withval=$with_copyright_year;
24344 fi
24345 
24346   if test "x$with_copyright_year" = xyes; then
24347     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24348   elif test "x$with_copyright_year" != x; then
24349     COPYRIGHT_YEAR="$with_copyright_year"
24350   else
24351     COPYRIGHT_YEAR=`$DATE +'%Y'`
24352   fi
24353 
24354 
24355 
24356   # Check whether --enable-keep-packaged-modules was given.
24357 if test "${enable_keep_packaged_modules+set}" = set; then :
24358   enableval=$enable_keep_packaged_modules;
24359 fi
24360 
24361 
24362   if test "x$enable_keep_packaged_modules" = "xyes"; then
24363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24364 $as_echo_n "checking if packaged modules are kept... " >&6; }
24365     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24366 $as_echo "yes" >&6; }
24367     JLINK_KEEP_PACKAGED_MODULES=true
24368   elif test "x$enable_keep_packaged_modules" = "xno"; then
24369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24370 $as_echo_n "checking if packaged modules are kept... " >&6; }
24371     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24372 $as_echo "no" >&6; }
24373     JLINK_KEEP_PACKAGED_MODULES=false
24374   elif test "x$enable_keep_packaged_modules" = "x"; then
24375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24376 $as_echo "yes (default)" >&6; }
24377     JLINK_KEEP_PACKAGED_MODULES=true
24378   else
24379     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24380   fi
24381 
24382 
24383 
24384 
24385   # Warn user that old version arguments are deprecated.
24386 
24387 
24388 # Check whether --with-milestone was given.
24389 if test "${with_milestone+set}" = set; then :
24390   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24391 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24392 fi
24393 
24394 
24395 
24396 
24397 # Check whether --with-update-version was given.
24398 if test "${with_update_version+set}" = set; then :
24399   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24400 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24401 fi
24402 
24403 
24404 
24405 
24406 # Check whether --with-user-release-suffix was given.
24407 if test "${with_user_release_suffix+set}" = set; then :
24408   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
24409 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24410 fi
24411 
24412 
24413 
24414 
24415 # Check whether --with-build-number was given.
24416 if test "${with_build_number+set}" = set; then :
24417   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24418 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24419 fi
24420 
24421 
24422 
24423   # Source the version numbers file
24424   . $AUTOCONF_DIR/version-numbers
24425 
24426   # Some non-version number information is set in that file
24427 
24428 
24429 
24430 
24431 
24432 
24433 
24434 
24435 
24436   # Override version from arguments
24437 
24438   # If --with-version-string is set, process it first. It is possible to
24439   # override parts with more specific flags, since these are processed later.
24440 
24441 # Check whether --with-version-string was given.
24442 if test "${with_version_string+set}" = set; then :
24443   withval=$with_version_string;
24444 fi
24445 
24446   if test "x$with_version_string" = xyes; then
24447     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24448   elif test "x$with_version_string" != x; then
24449     # Additional [] needed to keep m4 from mangling shell constructs.
24450     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24451       VERSION_MAJOR=${BASH_REMATCH[1]}
24452       VERSION_MINOR=${BASH_REMATCH[3]}
24453       VERSION_SECURITY=${BASH_REMATCH[5]}
24454       VERSION_PATCH=${BASH_REMATCH[7]}
24455       VERSION_PRE=${BASH_REMATCH[9]}
24456       version_plus_separator=${BASH_REMATCH[11]}
24457       VERSION_BUILD=${BASH_REMATCH[12]}
24458       VERSION_OPT=${BASH_REMATCH[14]}
24459       # Unspecified numerical fields are interpreted as 0.
24460       if test "x$VERSION_MINOR" = x; then
24461         VERSION_MINOR=0
24462       fi
24463       if test "x$VERSION_SECURITY" = x; then
24464         VERSION_SECURITY=0
24465       fi
24466       if test "x$VERSION_PATCH" = x; then
24467         VERSION_PATCH=0
24468       fi
24469       if test "x$version_plus_separator" != x \
24470           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24471         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24472       fi
24473       # Stop the version part process from setting default values.
24474       # We still allow them to explicitly override though.
24475       NO_DEFAULT_VERSION_PARTS=true
24476     else
24477       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24478     fi
24479   fi
24480 
24481 
24482 # Check whether --with-version-pre was given.
24483 if test "${with_version_pre+set}" = set; then :
24484   withval=$with_version_pre; with_version_pre_present=true
24485 else
24486   with_version_pre_present=false
24487 fi
24488 
24489 
24490   if test "x$with_version_pre_present" = xtrue; then
24491     if test "x$with_version_pre" = xyes; then
24492       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24493     elif test "x$with_version_pre" = xno; then
24494       # Interpret --without-* as empty string instead of the literal "no"
24495       VERSION_PRE=
24496     else
24497       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24498        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24499       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24501 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24502       fi
24503     fi
24504   else
24505     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24506       # Default is to use "internal" as pre
24507       VERSION_PRE="internal"
24508     fi
24509   fi
24510 
24511 
24512 # Check whether --with-version-opt was given.
24513 if test "${with_version_opt+set}" = set; then :
24514   withval=$with_version_opt; with_version_opt_present=true
24515 else
24516   with_version_opt_present=false
24517 fi
24518 
24519 
24520   if test "x$with_version_opt_present" = xtrue; then
24521     if test "x$with_version_opt" = xyes; then
24522       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24523     elif test "x$with_version_opt" = xno; then
24524       # Interpret --without-* as empty string instead of the literal "no"
24525       VERSION_OPT=
24526     else
24527       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24528        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24529       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24531 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24532       fi
24533     fi
24534   else
24535     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24536       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24537       # Outer [ ] to quote m4.
24538        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24539       VERSION_OPT="adhoc.$USERNAME.$basedirname"
24540     fi
24541   fi
24542 
24543 
24544 # Check whether --with-version-build was given.
24545 if test "${with_version_build+set}" = set; then :
24546   withval=$with_version_build; with_version_build_present=true
24547 else
24548   with_version_build_present=false
24549 fi
24550 
24551 
24552   if test "x$with_version_build_present" = xtrue; then
24553     if test "x$with_version_build" = xyes; then
24554       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24555     elif test "x$with_version_build" = xno; then
24556       # Interpret --without-* as empty string instead of the literal "no"
24557       VERSION_BUILD=
24558     elif test "x$with_version_build" = x; then
24559       VERSION_BUILD=
24560     else
24561 
24562   # Additional [] needed to keep m4 from mangling shell constructs.
24563   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24564     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24565   fi
24566   # Extract the version number without leading zeros.
24567   cleaned_value=${BASH_REMATCH[1]}
24568   if test "x$cleaned_value" = x; then
24569     # Special case for zero
24570     cleaned_value=${BASH_REMATCH[2]}
24571   fi
24572 
24573   if test $cleaned_value -gt 255; then
24574     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24575   fi
24576   if test "x$cleaned_value" != "x$with_version_build"; then
24577     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24578 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24579   fi
24580   VERSION_BUILD=$cleaned_value
24581 
24582     fi
24583   else
24584     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24585       # Default is to not have a build number.
24586       VERSION_BUILD=""
24587       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24588       VERSION_BUILD=0
24589     fi
24590   fi
24591 
24592 
24593 # Check whether --with-version-major was given.
24594 if test "${with_version_major+set}" = set; then :
24595   withval=$with_version_major; with_version_major_present=true
24596 else
24597   with_version_major_present=false
24598 fi
24599 
24600 
24601   if test "x$with_version_major_present" = xtrue; then
24602     if test "x$with_version_major" = xyes; then
24603       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24604     else
24605 
24606   # Additional [] needed to keep m4 from mangling shell constructs.
24607   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24608     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24609   fi
24610   # Extract the version number without leading zeros.
24611   cleaned_value=${BASH_REMATCH[1]}
24612   if test "x$cleaned_value" = x; then
24613     # Special case for zero
24614     cleaned_value=${BASH_REMATCH[2]}
24615   fi
24616 
24617   if test $cleaned_value -gt 255; then
24618     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24619   fi
24620   if test "x$cleaned_value" != "x$with_version_major"; then
24621     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24622 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24623   fi
24624   VERSION_MAJOR=$cleaned_value
24625 
24626     fi
24627   else
24628     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24629       # Default is to get value from version-numbers
24630       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24631     fi
24632   fi
24633 
24634 
24635 # Check whether --with-version-minor was given.
24636 if test "${with_version_minor+set}" = set; then :
24637   withval=$with_version_minor; with_version_minor_present=true
24638 else
24639   with_version_minor_present=false
24640 fi
24641 
24642 
24643   if test "x$with_version_minor_present" = xtrue; then
24644     if test "x$with_version_minor" = xyes; then
24645       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24646     elif test "x$with_version_minor" = xno; then
24647       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24648       VERSION_MINOR=0
24649     elif test "x$with_version_minor" = x; then
24650       VERSION_MINOR=0
24651     else
24652 
24653   # Additional [] needed to keep m4 from mangling shell constructs.
24654   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24655     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24656   fi
24657   # Extract the version number without leading zeros.
24658   cleaned_value=${BASH_REMATCH[1]}
24659   if test "x$cleaned_value" = x; then
24660     # Special case for zero
24661     cleaned_value=${BASH_REMATCH[2]}
24662   fi
24663 
24664   if test $cleaned_value -gt 255; then
24665     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24666   fi
24667   if test "x$cleaned_value" != "x$with_version_minor"; then
24668     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24669 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24670   fi
24671   VERSION_MINOR=$cleaned_value
24672 
24673     fi
24674   else
24675     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24676       # Default is 0, if unspecified
24677       VERSION_MINOR=$DEFAULT_VERSION_MINOR
24678     fi
24679   fi
24680 
24681 
24682 # Check whether --with-version-security was given.
24683 if test "${with_version_security+set}" = set; then :
24684   withval=$with_version_security; with_version_security_present=true
24685 else
24686   with_version_security_present=false
24687 fi
24688 
24689 
24690   if test "x$with_version_security_present" = xtrue; then
24691     if test "x$with_version_security" = xyes; then
24692       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24693     elif test "x$with_version_security" = xno; then
24694       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24695       VERSION_SECURITY=0
24696     elif test "x$with_version_security" = x; then
24697       VERSION_SECURITY=0
24698     else
24699 
24700   # Additional [] needed to keep m4 from mangling shell constructs.
24701   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24702     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24703   fi
24704   # Extract the version number without leading zeros.
24705   cleaned_value=${BASH_REMATCH[1]}
24706   if test "x$cleaned_value" = x; then
24707     # Special case for zero
24708     cleaned_value=${BASH_REMATCH[2]}
24709   fi
24710 
24711   if test $cleaned_value -gt 255; then
24712     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24713   fi
24714   if test "x$cleaned_value" != "x$with_version_security"; then
24715     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24716 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24717   fi
24718   VERSION_SECURITY=$cleaned_value
24719 
24720     fi
24721   else
24722     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24723       # Default is 0, if unspecified
24724       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24725     fi
24726   fi
24727 
24728 
24729 # Check whether --with-version-patch was given.
24730 if test "${with_version_patch+set}" = set; then :
24731   withval=$with_version_patch; with_version_patch_present=true
24732 else
24733   with_version_patch_present=false
24734 fi
24735 
24736 
24737   if test "x$with_version_patch_present" = xtrue; then
24738     if test "x$with_version_patch" = xyes; then
24739       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24740     elif test "x$with_version_patch" = xno; then
24741       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24742       VERSION_PATCH=0
24743     elif test "x$with_version_patch" = x; then
24744       VERSION_PATCH=0
24745     else
24746 
24747   # Additional [] needed to keep m4 from mangling shell constructs.
24748   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24749     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24750   fi
24751   # Extract the version number without leading zeros.
24752   cleaned_value=${BASH_REMATCH[1]}
24753   if test "x$cleaned_value" = x; then
24754     # Special case for zero
24755     cleaned_value=${BASH_REMATCH[2]}
24756   fi
24757 
24758   if test $cleaned_value -gt 255; then
24759     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24760   fi
24761   if test "x$cleaned_value" != "x$with_version_patch"; then
24762     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24763 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24764   fi
24765   VERSION_PATCH=$cleaned_value
24766 
24767     fi
24768   else
24769     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24770       # Default is 0, if unspecified
24771       VERSION_PATCH=$DEFAULT_VERSION_PATCH
24772     fi
24773   fi
24774 
24775   # Calculate derived version properties
24776 
24777   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24778   if test "x$VERSION_PRE" = x; then
24779     VERSION_IS_GA=true
24780   else
24781     VERSION_IS_GA=false
24782   fi
24783 
24784   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24785   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24786 
24787   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24788   # Strip trailing zeroes from stripped_version_number
24789   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24790   VERSION_NUMBER=$stripped_version_number
24791 
24792   # The complete version string, with additional build information
24793   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24794     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24795   else
24796     # If either build or opt is set, we need a + separator
24797     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24798   fi
24799 
24800   # The short version string, just VERSION_NUMBER and PRE, if present.
24801   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24802 
24803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24804 $as_echo_n "checking for version string... " >&6; }
24805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24806 $as_echo "$VERSION_STRING" >&6; }
24807 
24808 
24809 
24810 
24811 
24812 
24813 
24814 
24815 
24816 
24817 
24818 
24819 
24820 
24821 
24822 ###############################################################################
24823 #
24824 # Setup BootJDK, used to bootstrap the build.
24825 #
24826 ###############################################################################
24827 
24828 
24829   BOOT_JDK_FOUND=no
24830 
24831 # Check whether --with-boot-jdk was given.
24832 if test "${with_boot_jdk+set}" = set; then :
24833   withval=$with_boot_jdk;
24834 fi
24835 
24836 
24837   # We look for the Boot JDK through various means, going from more certain to
24838   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24839   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24840   # must check if this is indeed valid; otherwise we'll continue looking.
24841 
24842   # Test: Is bootjdk explicitly set by command line arguments?
24843 
24844   if test "x$BOOT_JDK_FOUND" = xno; then
24845     # Now execute the test
24846 
24847   if test "x$with_boot_jdk" != x; then
24848     BOOT_JDK=$with_boot_jdk
24849     BOOT_JDK_FOUND=maybe
24850     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24851 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24852   fi
24853 
24854 
24855     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24856     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24857       # Do we have a bin/java?
24858       if test ! -x "$BOOT_JDK/bin/java"; then
24859         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24861         BOOT_JDK_FOUND=no
24862       else
24863         # Do we have a bin/javac?
24864         if test ! -x "$BOOT_JDK/bin/javac"; then
24865           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24867           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24868 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24869           BOOT_JDK_FOUND=no
24870         else
24871           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24872           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24873 
24874           # Extra M4 quote needed to protect [] in grep expression.
24875           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24876           if test "x$FOUND_CORRECT_VERSION" = x; then
24877             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24879             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24880 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24881             BOOT_JDK_FOUND=no
24882           else
24883             # We're done! :-)
24884             BOOT_JDK_FOUND=yes
24885 
24886   # Only process if variable expands to non-empty
24887 
24888   if test "x$BOOT_JDK" != x; then
24889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24890 
24891   # Input might be given as Windows format, start by converting to
24892   # unix format.
24893   path="$BOOT_JDK"
24894   new_path=`$CYGPATH -u "$path"`
24895 
24896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24899   # "foo.exe" is OK but "foo" is an error.
24900   #
24901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24902   # It is also a way to make sure we got the proper file name for the real test later on.
24903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24904   if test "x$test_shortpath" = x; then
24905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24907     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24908   fi
24909 
24910   # Call helper function which possibly converts this using DOS-style short mode.
24911   # If so, the updated path is stored in $new_path.
24912 
24913   input_path="$new_path"
24914   # Check if we need to convert this using DOS-style short mode. If the path
24915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24916   # take no chances and rewrite it.
24917   # Note: m4 eats our [], so we need to use [ and ] instead.
24918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24919   if test "x$has_forbidden_chars" != x; then
24920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24924       # Going to short mode and back again did indeed matter. Since short mode is
24925       # case insensitive, let's make it lowercase to improve readability.
24926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24927       # Now convert it back to Unix-style (cygpath)
24928       input_path=`$CYGPATH -u "$shortmode_path"`
24929       new_path="$input_path"
24930     fi
24931   fi
24932 
24933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24934   if test "x$test_cygdrive_prefix" = x; then
24935     # As a simple fix, exclude /usr/bin since it's not a real path.
24936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24938       # a path prefixed by /cygdrive for fixpath to work.
24939       new_path="$CYGWIN_ROOT_PATH$input_path"
24940     fi
24941   fi
24942 
24943 
24944   if test "x$path" != "x$new_path"; then
24945     BOOT_JDK="$new_path"
24946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24948   fi
24949 
24950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951 
24952   path="$BOOT_JDK"
24953   has_colon=`$ECHO $path | $GREP ^.:`
24954   new_path="$path"
24955   if test "x$has_colon" = x; then
24956     # Not in mixed or Windows style, start by that.
24957     new_path=`cmd //c echo $path`
24958   fi
24959 
24960 
24961   input_path="$new_path"
24962   # Check if we need to convert this using DOS-style short mode. If the path
24963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24964   # take no chances and rewrite it.
24965   # Note: m4 eats our [], so we need to use [ and ] instead.
24966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24967   if test "x$has_forbidden_chars" != x; then
24968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24970   fi
24971 
24972 
24973   windows_path="$new_path"
24974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24975     unix_path=`$CYGPATH -u "$windows_path"`
24976     new_path="$unix_path"
24977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24979     new_path="$unix_path"
24980   fi
24981 
24982   if test "x$path" != "x$new_path"; then
24983     BOOT_JDK="$new_path"
24984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24986   fi
24987 
24988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24990 
24991     else
24992       # We're on a unix platform. Hooray! :)
24993       path="$BOOT_JDK"
24994       has_space=`$ECHO "$path" | $GREP " "`
24995       if test "x$has_space" != x; then
24996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24997 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24998         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24999       fi
25000 
25001       # Use eval to expand a potential ~
25002       eval path="$path"
25003       if test ! -f "$path" && test ! -d "$path"; then
25004         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25005       fi
25006 
25007       if test -d "$path"; then
25008         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25009       else
25010         dir="`$DIRNAME "$path"`"
25011         base="`$BASENAME "$path"`"
25012         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25013       fi
25014     fi
25015   fi
25016 
25017             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25018 $as_echo_n "checking for Boot JDK... " >&6; }
25019             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25020 $as_echo "$BOOT_JDK" >&6; }
25021             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25022 $as_echo_n "checking Boot JDK version... " >&6; }
25023             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25024             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25025 $as_echo "$BOOT_JDK_VERSION" >&6; }
25026           fi # end check jdk version
25027         fi # end check javac
25028       fi # end check java
25029     fi # end check boot jdk found
25030   fi
25031 
25032   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25033     # Having specified an argument which is incorrect will produce an instant failure;
25034     # we should not go on looking
25035     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25036   fi
25037 
25038   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25039 
25040   if test "x$BOOT_JDK_FOUND" = xno; then
25041     # Now execute the test
25042 
25043   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25044     # First check at user selected default
25045 
25046   if test "x$BOOT_JDK_FOUND" = xno; then
25047     # Now execute the test
25048 
25049   if test -x /usr/libexec/java_home; then
25050     BOOT_JDK=`/usr/libexec/java_home `
25051     BOOT_JDK_FOUND=maybe
25052     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25053 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25054   fi
25055 
25056 
25057     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25058     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25059       # Do we have a bin/java?
25060       if test ! -x "$BOOT_JDK/bin/java"; then
25061         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25063         BOOT_JDK_FOUND=no
25064       else
25065         # Do we have a bin/javac?
25066         if test ! -x "$BOOT_JDK/bin/javac"; then
25067           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25069           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25070 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25071           BOOT_JDK_FOUND=no
25072         else
25073           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25074           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25075 
25076           # Extra M4 quote needed to protect [] in grep expression.
25077           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25078           if test "x$FOUND_CORRECT_VERSION" = x; then
25079             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25081             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25082 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25083             BOOT_JDK_FOUND=no
25084           else
25085             # We're done! :-)
25086             BOOT_JDK_FOUND=yes
25087 
25088   # Only process if variable expands to non-empty
25089 
25090   if test "x$BOOT_JDK" != x; then
25091     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092 
25093   # Input might be given as Windows format, start by converting to
25094   # unix format.
25095   path="$BOOT_JDK"
25096   new_path=`$CYGPATH -u "$path"`
25097 
25098   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25099   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25100   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25101   # "foo.exe" is OK but "foo" is an error.
25102   #
25103   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25104   # It is also a way to make sure we got the proper file name for the real test later on.
25105   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25106   if test "x$test_shortpath" = x; then
25107     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25108 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25109     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25110   fi
25111 
25112   # Call helper function which possibly converts this using DOS-style short mode.
25113   # If so, the updated path is stored in $new_path.
25114 
25115   input_path="$new_path"
25116   # Check if we need to convert this using DOS-style short mode. If the path
25117   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25118   # take no chances and rewrite it.
25119   # Note: m4 eats our [], so we need to use [ and ] instead.
25120   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25121   if test "x$has_forbidden_chars" != x; then
25122     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25123     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25124     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25125     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25126       # Going to short mode and back again did indeed matter. Since short mode is
25127       # case insensitive, let's make it lowercase to improve readability.
25128       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25129       # Now convert it back to Unix-style (cygpath)
25130       input_path=`$CYGPATH -u "$shortmode_path"`
25131       new_path="$input_path"
25132     fi
25133   fi
25134 
25135   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25136   if test "x$test_cygdrive_prefix" = x; then
25137     # As a simple fix, exclude /usr/bin since it's not a real path.
25138     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25139       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25140       # a path prefixed by /cygdrive for fixpath to work.
25141       new_path="$CYGWIN_ROOT_PATH$input_path"
25142     fi
25143   fi
25144 
25145 
25146   if test "x$path" != "x$new_path"; then
25147     BOOT_JDK="$new_path"
25148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25149 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25150   fi
25151 
25152     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25153 
25154   path="$BOOT_JDK"
25155   has_colon=`$ECHO $path | $GREP ^.:`
25156   new_path="$path"
25157   if test "x$has_colon" = x; then
25158     # Not in mixed or Windows style, start by that.
25159     new_path=`cmd //c echo $path`
25160   fi
25161 
25162 
25163   input_path="$new_path"
25164   # Check if we need to convert this using DOS-style short mode. If the path
25165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25166   # take no chances and rewrite it.
25167   # Note: m4 eats our [], so we need to use [ and ] instead.
25168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25169   if test "x$has_forbidden_chars" != x; then
25170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25171     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25172   fi
25173 
25174 
25175   windows_path="$new_path"
25176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25177     unix_path=`$CYGPATH -u "$windows_path"`
25178     new_path="$unix_path"
25179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25180     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25181     new_path="$unix_path"
25182   fi
25183 
25184   if test "x$path" != "x$new_path"; then
25185     BOOT_JDK="$new_path"
25186     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25187 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25188   fi
25189 
25190   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25191   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25192 
25193     else
25194       # We're on a unix platform. Hooray! :)
25195       path="$BOOT_JDK"
25196       has_space=`$ECHO "$path" | $GREP " "`
25197       if test "x$has_space" != x; then
25198         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25199 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25200         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25201       fi
25202 
25203       # Use eval to expand a potential ~
25204       eval path="$path"
25205       if test ! -f "$path" && test ! -d "$path"; then
25206         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25207       fi
25208 
25209       if test -d "$path"; then
25210         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25211       else
25212         dir="`$DIRNAME "$path"`"
25213         base="`$BASENAME "$path"`"
25214         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25215       fi
25216     fi
25217   fi
25218 
25219             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25220 $as_echo_n "checking for Boot JDK... " >&6; }
25221             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25222 $as_echo "$BOOT_JDK" >&6; }
25223             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25224 $as_echo_n "checking Boot JDK version... " >&6; }
25225             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25226             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25227 $as_echo "$BOOT_JDK_VERSION" >&6; }
25228           fi # end check jdk version
25229         fi # end check javac
25230       fi # end check java
25231     fi # end check boot jdk found
25232   fi
25233 
25234     # If that did not work out (e.g. too old), try explicit versions instead
25235 
25236   if test "x$BOOT_JDK_FOUND" = xno; then
25237     # Now execute the test
25238 
25239   if test -x /usr/libexec/java_home; then
25240     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25241     BOOT_JDK_FOUND=maybe
25242     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25243 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25244   fi
25245 
25246 
25247     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25248     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25249       # Do we have a bin/java?
25250       if test ! -x "$BOOT_JDK/bin/java"; then
25251         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25253         BOOT_JDK_FOUND=no
25254       else
25255         # Do we have a bin/javac?
25256         if test ! -x "$BOOT_JDK/bin/javac"; then
25257           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25259           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25260 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25261           BOOT_JDK_FOUND=no
25262         else
25263           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25264           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25265 
25266           # Extra M4 quote needed to protect [] in grep expression.
25267           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25268           if test "x$FOUND_CORRECT_VERSION" = x; then
25269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25271             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25272 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25273             BOOT_JDK_FOUND=no
25274           else
25275             # We're done! :-)
25276             BOOT_JDK_FOUND=yes
25277 
25278   # Only process if variable expands to non-empty
25279 
25280   if test "x$BOOT_JDK" != x; then
25281     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25282 
25283   # Input might be given as Windows format, start by converting to
25284   # unix format.
25285   path="$BOOT_JDK"
25286   new_path=`$CYGPATH -u "$path"`
25287 
25288   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25289   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25290   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25291   # "foo.exe" is OK but "foo" is an error.
25292   #
25293   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25294   # It is also a way to make sure we got the proper file name for the real test later on.
25295   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25296   if test "x$test_shortpath" = x; then
25297     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25298 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25299     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25300   fi
25301 
25302   # Call helper function which possibly converts this using DOS-style short mode.
25303   # If so, the updated path is stored in $new_path.
25304 
25305   input_path="$new_path"
25306   # Check if we need to convert this using DOS-style short mode. If the path
25307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25308   # take no chances and rewrite it.
25309   # Note: m4 eats our [], so we need to use [ and ] instead.
25310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25311   if test "x$has_forbidden_chars" != x; then
25312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25316       # Going to short mode and back again did indeed matter. Since short mode is
25317       # case insensitive, let's make it lowercase to improve readability.
25318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25319       # Now convert it back to Unix-style (cygpath)
25320       input_path=`$CYGPATH -u "$shortmode_path"`
25321       new_path="$input_path"
25322     fi
25323   fi
25324 
25325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25326   if test "x$test_cygdrive_prefix" = x; then
25327     # As a simple fix, exclude /usr/bin since it's not a real path.
25328     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25330       # a path prefixed by /cygdrive for fixpath to work.
25331       new_path="$CYGWIN_ROOT_PATH$input_path"
25332     fi
25333   fi
25334 
25335 
25336   if test "x$path" != "x$new_path"; then
25337     BOOT_JDK="$new_path"
25338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25340   fi
25341 
25342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25343 
25344   path="$BOOT_JDK"
25345   has_colon=`$ECHO $path | $GREP ^.:`
25346   new_path="$path"
25347   if test "x$has_colon" = x; then
25348     # Not in mixed or Windows style, start by that.
25349     new_path=`cmd //c echo $path`
25350   fi
25351 
25352 
25353   input_path="$new_path"
25354   # Check if we need to convert this using DOS-style short mode. If the path
25355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25356   # take no chances and rewrite it.
25357   # Note: m4 eats our [], so we need to use [ and ] instead.
25358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25359   if test "x$has_forbidden_chars" != x; then
25360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25362   fi
25363 
25364 
25365   windows_path="$new_path"
25366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25367     unix_path=`$CYGPATH -u "$windows_path"`
25368     new_path="$unix_path"
25369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25371     new_path="$unix_path"
25372   fi
25373 
25374   if test "x$path" != "x$new_path"; then
25375     BOOT_JDK="$new_path"
25376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25377 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25378   fi
25379 
25380   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25381   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25382 
25383     else
25384       # We're on a unix platform. Hooray! :)
25385       path="$BOOT_JDK"
25386       has_space=`$ECHO "$path" | $GREP " "`
25387       if test "x$has_space" != x; then
25388         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25389 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25390         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25391       fi
25392 
25393       # Use eval to expand a potential ~
25394       eval path="$path"
25395       if test ! -f "$path" && test ! -d "$path"; then
25396         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25397       fi
25398 
25399       if test -d "$path"; then
25400         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25401       else
25402         dir="`$DIRNAME "$path"`"
25403         base="`$BASENAME "$path"`"
25404         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25405       fi
25406     fi
25407   fi
25408 
25409             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25410 $as_echo_n "checking for Boot JDK... " >&6; }
25411             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25412 $as_echo "$BOOT_JDK" >&6; }
25413             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25414 $as_echo_n "checking Boot JDK version... " >&6; }
25415             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25416             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25417 $as_echo "$BOOT_JDK_VERSION" >&6; }
25418           fi # end check jdk version
25419         fi # end check javac
25420       fi # end check java
25421     fi # end check boot jdk found
25422   fi
25423 
25424 
25425   if test "x$BOOT_JDK_FOUND" = xno; then
25426     # Now execute the test
25427 
25428   if test -x /usr/libexec/java_home; then
25429     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25430     BOOT_JDK_FOUND=maybe
25431     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25432 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25433   fi
25434 
25435 
25436     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25437     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25438       # Do we have a bin/java?
25439       if test ! -x "$BOOT_JDK/bin/java"; then
25440         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25441 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25442         BOOT_JDK_FOUND=no
25443       else
25444         # Do we have a bin/javac?
25445         if test ! -x "$BOOT_JDK/bin/javac"; then
25446           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25448           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25449 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25450           BOOT_JDK_FOUND=no
25451         else
25452           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25453           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25454 
25455           # Extra M4 quote needed to protect [] in grep expression.
25456           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25457           if test "x$FOUND_CORRECT_VERSION" = x; then
25458             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25460             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25461 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25462             BOOT_JDK_FOUND=no
25463           else
25464             # We're done! :-)
25465             BOOT_JDK_FOUND=yes
25466 
25467   # Only process if variable expands to non-empty
25468 
25469   if test "x$BOOT_JDK" != x; then
25470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25471 
25472   # Input might be given as Windows format, start by converting to
25473   # unix format.
25474   path="$BOOT_JDK"
25475   new_path=`$CYGPATH -u "$path"`
25476 
25477   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25478   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25479   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25480   # "foo.exe" is OK but "foo" is an error.
25481   #
25482   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25483   # It is also a way to make sure we got the proper file name for the real test later on.
25484   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25485   if test "x$test_shortpath" = x; then
25486     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25488     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25489   fi
25490 
25491   # Call helper function which possibly converts this using DOS-style short mode.
25492   # If so, the updated path is stored in $new_path.
25493 
25494   input_path="$new_path"
25495   # Check if we need to convert this using DOS-style short mode. If the path
25496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25497   # take no chances and rewrite it.
25498   # Note: m4 eats our [], so we need to use [ and ] instead.
25499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25500   if test "x$has_forbidden_chars" != x; then
25501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25505       # Going to short mode and back again did indeed matter. Since short mode is
25506       # case insensitive, let's make it lowercase to improve readability.
25507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25508       # Now convert it back to Unix-style (cygpath)
25509       input_path=`$CYGPATH -u "$shortmode_path"`
25510       new_path="$input_path"
25511     fi
25512   fi
25513 
25514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25515   if test "x$test_cygdrive_prefix" = x; then
25516     # As a simple fix, exclude /usr/bin since it's not a real path.
25517     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25519       # a path prefixed by /cygdrive for fixpath to work.
25520       new_path="$CYGWIN_ROOT_PATH$input_path"
25521     fi
25522   fi
25523 
25524 
25525   if test "x$path" != "x$new_path"; then
25526     BOOT_JDK="$new_path"
25527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25528 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25529   fi
25530 
25531     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25532 
25533   path="$BOOT_JDK"
25534   has_colon=`$ECHO $path | $GREP ^.:`
25535   new_path="$path"
25536   if test "x$has_colon" = x; then
25537     # Not in mixed or Windows style, start by that.
25538     new_path=`cmd //c echo $path`
25539   fi
25540 
25541 
25542   input_path="$new_path"
25543   # Check if we need to convert this using DOS-style short mode. If the path
25544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25545   # take no chances and rewrite it.
25546   # Note: m4 eats our [], so we need to use [ and ] instead.
25547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25548   if test "x$has_forbidden_chars" != x; then
25549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25550     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25551   fi
25552 
25553 
25554   windows_path="$new_path"
25555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25556     unix_path=`$CYGPATH -u "$windows_path"`
25557     new_path="$unix_path"
25558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25560     new_path="$unix_path"
25561   fi
25562 
25563   if test "x$path" != "x$new_path"; then
25564     BOOT_JDK="$new_path"
25565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25566 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25567   fi
25568 
25569   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25570   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25571 
25572     else
25573       # We're on a unix platform. Hooray! :)
25574       path="$BOOT_JDK"
25575       has_space=`$ECHO "$path" | $GREP " "`
25576       if test "x$has_space" != x; then
25577         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25578 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25579         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25580       fi
25581 
25582       # Use eval to expand a potential ~
25583       eval path="$path"
25584       if test ! -f "$path" && test ! -d "$path"; then
25585         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25586       fi
25587 
25588       if test -d "$path"; then
25589         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25590       else
25591         dir="`$DIRNAME "$path"`"
25592         base="`$BASENAME "$path"`"
25593         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25594       fi
25595     fi
25596   fi
25597 
25598             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25599 $as_echo_n "checking for Boot JDK... " >&6; }
25600             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25601 $as_echo "$BOOT_JDK" >&6; }
25602             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25603 $as_echo_n "checking Boot JDK version... " >&6; }
25604             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25605             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25606 $as_echo "$BOOT_JDK_VERSION" >&6; }
25607           fi # end check jdk version
25608         fi # end check javac
25609       fi # end check java
25610     fi # end check boot jdk found
25611   fi
25612 
25613 
25614   if test "x$BOOT_JDK_FOUND" = xno; then
25615     # Now execute the test
25616 
25617   if test -x /usr/libexec/java_home; then
25618     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25619     BOOT_JDK_FOUND=maybe
25620     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25621 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25622   fi
25623 
25624 
25625     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25626     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25627       # Do we have a bin/java?
25628       if test ! -x "$BOOT_JDK/bin/java"; then
25629         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25631         BOOT_JDK_FOUND=no
25632       else
25633         # Do we have a bin/javac?
25634         if test ! -x "$BOOT_JDK/bin/javac"; then
25635           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25637           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25638 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25639           BOOT_JDK_FOUND=no
25640         else
25641           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25642           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25643 
25644           # Extra M4 quote needed to protect [] in grep expression.
25645           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25646           if test "x$FOUND_CORRECT_VERSION" = x; then
25647             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25649             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25650 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25651             BOOT_JDK_FOUND=no
25652           else
25653             # We're done! :-)
25654             BOOT_JDK_FOUND=yes
25655 
25656   # Only process if variable expands to non-empty
25657 
25658   if test "x$BOOT_JDK" != x; then
25659     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25660 
25661   # Input might be given as Windows format, start by converting to
25662   # unix format.
25663   path="$BOOT_JDK"
25664   new_path=`$CYGPATH -u "$path"`
25665 
25666   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25667   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25668   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25669   # "foo.exe" is OK but "foo" is an error.
25670   #
25671   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25672   # It is also a way to make sure we got the proper file name for the real test later on.
25673   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25674   if test "x$test_shortpath" = x; then
25675     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25676 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25677     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25678   fi
25679 
25680   # Call helper function which possibly converts this using DOS-style short mode.
25681   # If so, the updated path is stored in $new_path.
25682 
25683   input_path="$new_path"
25684   # Check if we need to convert this using DOS-style short mode. If the path
25685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25686   # take no chances and rewrite it.
25687   # Note: m4 eats our [], so we need to use [ and ] instead.
25688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25689   if test "x$has_forbidden_chars" != x; then
25690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25691     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25692     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25693     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25694       # Going to short mode and back again did indeed matter. Since short mode is
25695       # case insensitive, let's make it lowercase to improve readability.
25696       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25697       # Now convert it back to Unix-style (cygpath)
25698       input_path=`$CYGPATH -u "$shortmode_path"`
25699       new_path="$input_path"
25700     fi
25701   fi
25702 
25703   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25704   if test "x$test_cygdrive_prefix" = x; then
25705     # As a simple fix, exclude /usr/bin since it's not a real path.
25706     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25707       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25708       # a path prefixed by /cygdrive for fixpath to work.
25709       new_path="$CYGWIN_ROOT_PATH$input_path"
25710     fi
25711   fi
25712 
25713 
25714   if test "x$path" != "x$new_path"; then
25715     BOOT_JDK="$new_path"
25716     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25717 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25718   fi
25719 
25720     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25721 
25722   path="$BOOT_JDK"
25723   has_colon=`$ECHO $path | $GREP ^.:`
25724   new_path="$path"
25725   if test "x$has_colon" = x; then
25726     # Not in mixed or Windows style, start by that.
25727     new_path=`cmd //c echo $path`
25728   fi
25729 
25730 
25731   input_path="$new_path"
25732   # Check if we need to convert this using DOS-style short mode. If the path
25733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25734   # take no chances and rewrite it.
25735   # Note: m4 eats our [], so we need to use [ and ] instead.
25736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25737   if test "x$has_forbidden_chars" != x; then
25738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25739     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25740   fi
25741 
25742 
25743   windows_path="$new_path"
25744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25745     unix_path=`$CYGPATH -u "$windows_path"`
25746     new_path="$unix_path"
25747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25749     new_path="$unix_path"
25750   fi
25751 
25752   if test "x$path" != "x$new_path"; then
25753     BOOT_JDK="$new_path"
25754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25755 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25756   fi
25757 
25758   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25759   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25760 
25761     else
25762       # We're on a unix platform. Hooray! :)
25763       path="$BOOT_JDK"
25764       has_space=`$ECHO "$path" | $GREP " "`
25765       if test "x$has_space" != x; then
25766         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25767 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25768         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25769       fi
25770 
25771       # Use eval to expand a potential ~
25772       eval path="$path"
25773       if test ! -f "$path" && test ! -d "$path"; then
25774         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25775       fi
25776 
25777       if test -d "$path"; then
25778         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25779       else
25780         dir="`$DIRNAME "$path"`"
25781         base="`$BASENAME "$path"`"
25782         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25783       fi
25784     fi
25785   fi
25786 
25787             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25788 $as_echo_n "checking for Boot JDK... " >&6; }
25789             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25790 $as_echo "$BOOT_JDK" >&6; }
25791             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25792 $as_echo_n "checking Boot JDK version... " >&6; }
25793             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25794             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25795 $as_echo "$BOOT_JDK_VERSION" >&6; }
25796           fi # end check jdk version
25797         fi # end check javac
25798       fi # end check java
25799     fi # end check boot jdk found
25800   fi
25801 
25802   fi
25803 
25804 
25805     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25806     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25807       # Do we have a bin/java?
25808       if test ! -x "$BOOT_JDK/bin/java"; then
25809         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25811         BOOT_JDK_FOUND=no
25812       else
25813         # Do we have a bin/javac?
25814         if test ! -x "$BOOT_JDK/bin/javac"; then
25815           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25817           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25818 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25819           BOOT_JDK_FOUND=no
25820         else
25821           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25822           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25823 
25824           # Extra M4 quote needed to protect [] in grep expression.
25825           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25826           if test "x$FOUND_CORRECT_VERSION" = x; then
25827             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25828 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25829             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25830 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25831             BOOT_JDK_FOUND=no
25832           else
25833             # We're done! :-)
25834             BOOT_JDK_FOUND=yes
25835 
25836   # Only process if variable expands to non-empty
25837 
25838   if test "x$BOOT_JDK" != x; then
25839     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25840 
25841   # Input might be given as Windows format, start by converting to
25842   # unix format.
25843   path="$BOOT_JDK"
25844   new_path=`$CYGPATH -u "$path"`
25845 
25846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25849   # "foo.exe" is OK but "foo" is an error.
25850   #
25851   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25852   # It is also a way to make sure we got the proper file name for the real test later on.
25853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25854   if test "x$test_shortpath" = x; then
25855     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25856 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25857     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25858   fi
25859 
25860   # Call helper function which possibly converts this using DOS-style short mode.
25861   # If so, the updated path is stored in $new_path.
25862 
25863   input_path="$new_path"
25864   # Check if we need to convert this using DOS-style short mode. If the path
25865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25866   # take no chances and rewrite it.
25867   # Note: m4 eats our [], so we need to use [ and ] instead.
25868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25869   if test "x$has_forbidden_chars" != x; then
25870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25874       # Going to short mode and back again did indeed matter. Since short mode is
25875       # case insensitive, let's make it lowercase to improve readability.
25876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25877       # Now convert it back to Unix-style (cygpath)
25878       input_path=`$CYGPATH -u "$shortmode_path"`
25879       new_path="$input_path"
25880     fi
25881   fi
25882 
25883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25884   if test "x$test_cygdrive_prefix" = x; then
25885     # As a simple fix, exclude /usr/bin since it's not a real path.
25886     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25888       # a path prefixed by /cygdrive for fixpath to work.
25889       new_path="$CYGWIN_ROOT_PATH$input_path"
25890     fi
25891   fi
25892 
25893 
25894   if test "x$path" != "x$new_path"; then
25895     BOOT_JDK="$new_path"
25896     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25897 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25898   fi
25899 
25900     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25901 
25902   path="$BOOT_JDK"
25903   has_colon=`$ECHO $path | $GREP ^.:`
25904   new_path="$path"
25905   if test "x$has_colon" = x; then
25906     # Not in mixed or Windows style, start by that.
25907     new_path=`cmd //c echo $path`
25908   fi
25909 
25910 
25911   input_path="$new_path"
25912   # Check if we need to convert this using DOS-style short mode. If the path
25913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25914   # take no chances and rewrite it.
25915   # Note: m4 eats our [], so we need to use [ and ] instead.
25916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25917   if test "x$has_forbidden_chars" != x; then
25918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25919     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25920   fi
25921 
25922 
25923   windows_path="$new_path"
25924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25925     unix_path=`$CYGPATH -u "$windows_path"`
25926     new_path="$unix_path"
25927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25929     new_path="$unix_path"
25930   fi
25931 
25932   if test "x$path" != "x$new_path"; then
25933     BOOT_JDK="$new_path"
25934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25935 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25936   fi
25937 
25938   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25939   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25940 
25941     else
25942       # We're on a unix platform. Hooray! :)
25943       path="$BOOT_JDK"
25944       has_space=`$ECHO "$path" | $GREP " "`
25945       if test "x$has_space" != x; then
25946         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25947 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25948         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25949       fi
25950 
25951       # Use eval to expand a potential ~
25952       eval path="$path"
25953       if test ! -f "$path" && test ! -d "$path"; then
25954         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25955       fi
25956 
25957       if test -d "$path"; then
25958         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25959       else
25960         dir="`$DIRNAME "$path"`"
25961         base="`$BASENAME "$path"`"
25962         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25963       fi
25964     fi
25965   fi
25966 
25967             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25968 $as_echo_n "checking for Boot JDK... " >&6; }
25969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25970 $as_echo "$BOOT_JDK" >&6; }
25971             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25972 $as_echo_n "checking Boot JDK version... " >&6; }
25973             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25975 $as_echo "$BOOT_JDK_VERSION" >&6; }
25976           fi # end check jdk version
25977         fi # end check javac
25978       fi # end check java
25979     fi # end check boot jdk found
25980   fi
25981 
25982 
25983   # Test: Is $JAVA_HOME set?
25984 
25985   if test "x$BOOT_JDK_FOUND" = xno; then
25986     # Now execute the test
25987 
25988   if test "x$JAVA_HOME" != x; then
25989     JAVA_HOME_PROCESSED="$JAVA_HOME"
25990 
25991   # Only process if variable expands to non-empty
25992 
25993   if test "x$JAVA_HOME_PROCESSED" != x; then
25994     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25995 
25996   # Input might be given as Windows format, start by converting to
25997   # unix format.
25998   path="$JAVA_HOME_PROCESSED"
25999   new_path=`$CYGPATH -u "$path"`
26000 
26001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26004   # "foo.exe" is OK but "foo" is an error.
26005   #
26006   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26007   # It is also a way to make sure we got the proper file name for the real test later on.
26008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26009   if test "x$test_shortpath" = x; then
26010     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26011 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26012     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26013   fi
26014 
26015   # Call helper function which possibly converts this using DOS-style short mode.
26016   # If so, the updated path is stored in $new_path.
26017 
26018   input_path="$new_path"
26019   # Check if we need to convert this using DOS-style short mode. If the path
26020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26021   # take no chances and rewrite it.
26022   # Note: m4 eats our [], so we need to use [ and ] instead.
26023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26024   if test "x$has_forbidden_chars" != x; then
26025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26029       # Going to short mode and back again did indeed matter. Since short mode is
26030       # case insensitive, let's make it lowercase to improve readability.
26031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26032       # Now convert it back to Unix-style (cygpath)
26033       input_path=`$CYGPATH -u "$shortmode_path"`
26034       new_path="$input_path"
26035     fi
26036   fi
26037 
26038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26039   if test "x$test_cygdrive_prefix" = x; then
26040     # As a simple fix, exclude /usr/bin since it's not a real path.
26041     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26043       # a path prefixed by /cygdrive for fixpath to work.
26044       new_path="$CYGWIN_ROOT_PATH$input_path"
26045     fi
26046   fi
26047 
26048 
26049   if test "x$path" != "x$new_path"; then
26050     JAVA_HOME_PROCESSED="$new_path"
26051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26052 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26053   fi
26054 
26055     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26056 
26057   path="$JAVA_HOME_PROCESSED"
26058   has_colon=`$ECHO $path | $GREP ^.:`
26059   new_path="$path"
26060   if test "x$has_colon" = x; then
26061     # Not in mixed or Windows style, start by that.
26062     new_path=`cmd //c echo $path`
26063   fi
26064 
26065 
26066   input_path="$new_path"
26067   # Check if we need to convert this using DOS-style short mode. If the path
26068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26069   # take no chances and rewrite it.
26070   # Note: m4 eats our [], so we need to use [ and ] instead.
26071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26072   if test "x$has_forbidden_chars" != x; then
26073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26074     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26075   fi
26076 
26077 
26078   windows_path="$new_path"
26079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26080     unix_path=`$CYGPATH -u "$windows_path"`
26081     new_path="$unix_path"
26082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26084     new_path="$unix_path"
26085   fi
26086 
26087   if test "x$path" != "x$new_path"; then
26088     JAVA_HOME_PROCESSED="$new_path"
26089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26090 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26091   fi
26092 
26093   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26094   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26095 
26096     else
26097       # We're on a unix platform. Hooray! :)
26098       path="$JAVA_HOME_PROCESSED"
26099       has_space=`$ECHO "$path" | $GREP " "`
26100       if test "x$has_space" != x; then
26101         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26102 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26103         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26104       fi
26105 
26106       # Use eval to expand a potential ~
26107       eval path="$path"
26108       if test ! -f "$path" && test ! -d "$path"; then
26109         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26110       fi
26111 
26112       if test -d "$path"; then
26113         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26114       else
26115         dir="`$DIRNAME "$path"`"
26116         base="`$BASENAME "$path"`"
26117         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26118       fi
26119     fi
26120   fi
26121 
26122     if test ! -d "$JAVA_HOME_PROCESSED"; then
26123       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26124 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26125     else
26126       # Aha, the user has set a JAVA_HOME
26127       # let us use that as the Boot JDK.
26128       BOOT_JDK="$JAVA_HOME_PROCESSED"
26129       BOOT_JDK_FOUND=maybe
26130       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26131 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26132     fi
26133   fi
26134 
26135 
26136     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26137     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26138       # Do we have a bin/java?
26139       if test ! -x "$BOOT_JDK/bin/java"; then
26140         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26142         BOOT_JDK_FOUND=no
26143       else
26144         # Do we have a bin/javac?
26145         if test ! -x "$BOOT_JDK/bin/javac"; then
26146           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26148           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26149 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26150           BOOT_JDK_FOUND=no
26151         else
26152           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26153           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26154 
26155           # Extra M4 quote needed to protect [] in grep expression.
26156           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26157           if test "x$FOUND_CORRECT_VERSION" = x; then
26158             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26160             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26161 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26162             BOOT_JDK_FOUND=no
26163           else
26164             # We're done! :-)
26165             BOOT_JDK_FOUND=yes
26166 
26167   # Only process if variable expands to non-empty
26168 
26169   if test "x$BOOT_JDK" != x; then
26170     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26171 
26172   # Input might be given as Windows format, start by converting to
26173   # unix format.
26174   path="$BOOT_JDK"
26175   new_path=`$CYGPATH -u "$path"`
26176 
26177   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26178   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26179   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26180   # "foo.exe" is OK but "foo" is an error.
26181   #
26182   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26183   # It is also a way to make sure we got the proper file name for the real test later on.
26184   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26185   if test "x$test_shortpath" = x; then
26186     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26188     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26189   fi
26190 
26191   # Call helper function which possibly converts this using DOS-style short mode.
26192   # If so, the updated path is stored in $new_path.
26193 
26194   input_path="$new_path"
26195   # Check if we need to convert this using DOS-style short mode. If the path
26196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26197   # take no chances and rewrite it.
26198   # Note: m4 eats our [], so we need to use [ and ] instead.
26199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26200   if test "x$has_forbidden_chars" != x; then
26201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26202     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26203     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26204     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26205       # Going to short mode and back again did indeed matter. Since short mode is
26206       # case insensitive, let's make it lowercase to improve readability.
26207       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26208       # Now convert it back to Unix-style (cygpath)
26209       input_path=`$CYGPATH -u "$shortmode_path"`
26210       new_path="$input_path"
26211     fi
26212   fi
26213 
26214   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26215   if test "x$test_cygdrive_prefix" = x; then
26216     # As a simple fix, exclude /usr/bin since it's not a real path.
26217     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26218       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26219       # a path prefixed by /cygdrive for fixpath to work.
26220       new_path="$CYGWIN_ROOT_PATH$input_path"
26221     fi
26222   fi
26223 
26224 
26225   if test "x$path" != "x$new_path"; then
26226     BOOT_JDK="$new_path"
26227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26228 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26229   fi
26230 
26231     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26232 
26233   path="$BOOT_JDK"
26234   has_colon=`$ECHO $path | $GREP ^.:`
26235   new_path="$path"
26236   if test "x$has_colon" = x; then
26237     # Not in mixed or Windows style, start by that.
26238     new_path=`cmd //c echo $path`
26239   fi
26240 
26241 
26242   input_path="$new_path"
26243   # Check if we need to convert this using DOS-style short mode. If the path
26244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26245   # take no chances and rewrite it.
26246   # Note: m4 eats our [], so we need to use [ and ] instead.
26247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26248   if test "x$has_forbidden_chars" != x; then
26249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26250     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26251   fi
26252 
26253 
26254   windows_path="$new_path"
26255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26256     unix_path=`$CYGPATH -u "$windows_path"`
26257     new_path="$unix_path"
26258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26260     new_path="$unix_path"
26261   fi
26262 
26263   if test "x$path" != "x$new_path"; then
26264     BOOT_JDK="$new_path"
26265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26267   fi
26268 
26269   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26270   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26271 
26272     else
26273       # We're on a unix platform. Hooray! :)
26274       path="$BOOT_JDK"
26275       has_space=`$ECHO "$path" | $GREP " "`
26276       if test "x$has_space" != x; then
26277         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26278 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26279         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26280       fi
26281 
26282       # Use eval to expand a potential ~
26283       eval path="$path"
26284       if test ! -f "$path" && test ! -d "$path"; then
26285         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26286       fi
26287 
26288       if test -d "$path"; then
26289         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26290       else
26291         dir="`$DIRNAME "$path"`"
26292         base="`$BASENAME "$path"`"
26293         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26294       fi
26295     fi
26296   fi
26297 
26298             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26299 $as_echo_n "checking for Boot JDK... " >&6; }
26300             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26301 $as_echo "$BOOT_JDK" >&6; }
26302             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26303 $as_echo_n "checking Boot JDK version... " >&6; }
26304             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26305             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26306 $as_echo "$BOOT_JDK_VERSION" >&6; }
26307           fi # end check jdk version
26308         fi # end check javac
26309       fi # end check java
26310     fi # end check boot jdk found
26311   fi
26312 
26313 
26314   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26315 
26316   if test "x$BOOT_JDK_FOUND" = xno; then
26317     # Now execute the test
26318 
26319   # Extract the first word of "javac", so it can be a program name with args.
26320 set dummy javac; ac_word=$2
26321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26322 $as_echo_n "checking for $ac_word... " >&6; }
26323 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26324   $as_echo_n "(cached) " >&6
26325 else
26326   case $JAVAC_CHECK in
26327   [\\/]* | ?:[\\/]*)
26328   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26329   ;;
26330   *)
26331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26332 for as_dir in $PATH
26333 do
26334   IFS=$as_save_IFS
26335   test -z "$as_dir" && as_dir=.
26336     for ac_exec_ext in '' $ac_executable_extensions; do
26337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26338     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26340     break 2
26341   fi
26342 done
26343   done
26344 IFS=$as_save_IFS
26345 
26346   ;;
26347 esac
26348 fi
26349 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26350 if test -n "$JAVAC_CHECK"; then
26351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26352 $as_echo "$JAVAC_CHECK" >&6; }
26353 else
26354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26355 $as_echo "no" >&6; }
26356 fi
26357 
26358 
26359   # Extract the first word of "java", so it can be a program name with args.
26360 set dummy java; ac_word=$2
26361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26362 $as_echo_n "checking for $ac_word... " >&6; }
26363 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26364   $as_echo_n "(cached) " >&6
26365 else
26366   case $JAVA_CHECK in
26367   [\\/]* | ?:[\\/]*)
26368   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26369   ;;
26370   *)
26371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26372 for as_dir in $PATH
26373 do
26374   IFS=$as_save_IFS
26375   test -z "$as_dir" && as_dir=.
26376     for ac_exec_ext in '' $ac_executable_extensions; do
26377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26378     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26380     break 2
26381   fi
26382 done
26383   done
26384 IFS=$as_save_IFS
26385 
26386   ;;
26387 esac
26388 fi
26389 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26390 if test -n "$JAVA_CHECK"; then
26391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26392 $as_echo "$JAVA_CHECK" >&6; }
26393 else
26394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26395 $as_echo "no" >&6; }
26396 fi
26397 
26398 
26399   BINARY="$JAVAC_CHECK"
26400   if test "x$JAVAC_CHECK" = x; then
26401     BINARY="$JAVA_CHECK"
26402   fi
26403   if test "x$BINARY" != x; then
26404     # So there is a java(c) binary, it might be part of a JDK.
26405     # Lets find the JDK/JRE directory by following symbolic links.
26406     # Linux/GNU systems often have links from /usr/bin/java to
26407     # /etc/alternatives/java to the real JDK binary.
26408 
26409   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26410     # Follow a chain of symbolic links. Use readlink
26411     # where it exists, else fall back to horribly
26412     # complicated shell code.
26413     if test "x$READLINK_TESTED" != yes; then
26414       # On MacOSX there is a readlink tool with a different
26415       # purpose than the GNU readlink tool. Check the found readlink.
26416       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26417       if test "x$ISGNU" = x; then
26418         # A readlink that we do not know how to use.
26419         # Are there other non-GNU readlinks out there?
26420         READLINK_TESTED=yes
26421         READLINK=
26422       fi
26423     fi
26424 
26425     if test "x$READLINK" != x; then
26426       BINARY=`$READLINK -f $BINARY`
26427     else
26428       # Save the current directory for restoring afterwards
26429       STARTDIR=$PWD
26430       COUNTER=0
26431       sym_link_dir=`$DIRNAME $BINARY`
26432       sym_link_file=`$BASENAME $BINARY`
26433       cd $sym_link_dir
26434       # Use -P flag to resolve symlinks in directories.
26435       cd `$THEPWDCMD -P`
26436       sym_link_dir=`$THEPWDCMD -P`
26437       # Resolve file symlinks
26438       while test $COUNTER -lt 20; do
26439         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26440         if test "x$ISLINK" == x; then
26441           # This is not a symbolic link! We are done!
26442           break
26443         fi
26444         # Again resolve directory symlinks since the target of the just found
26445         # link could be in a different directory
26446         cd `$DIRNAME $ISLINK`
26447         sym_link_dir=`$THEPWDCMD -P`
26448         sym_link_file=`$BASENAME $ISLINK`
26449         let COUNTER=COUNTER+1
26450       done
26451       cd $STARTDIR
26452       BINARY=$sym_link_dir/$sym_link_file
26453     fi
26454   fi
26455 
26456     BOOT_JDK=`dirname "$BINARY"`
26457     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26458     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26459       # Looks like we found ourselves an JDK
26460       BOOT_JDK_FOUND=maybe
26461       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26462 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26463     fi
26464   fi
26465 
26466 
26467     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26468     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26469       # Do we have a bin/java?
26470       if test ! -x "$BOOT_JDK/bin/java"; then
26471         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26473         BOOT_JDK_FOUND=no
26474       else
26475         # Do we have a bin/javac?
26476         if test ! -x "$BOOT_JDK/bin/javac"; then
26477           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26479           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26480 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26481           BOOT_JDK_FOUND=no
26482         else
26483           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26484           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26485 
26486           # Extra M4 quote needed to protect [] in grep expression.
26487           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26488           if test "x$FOUND_CORRECT_VERSION" = x; then
26489             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26490 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26491             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26492 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26493             BOOT_JDK_FOUND=no
26494           else
26495             # We're done! :-)
26496             BOOT_JDK_FOUND=yes
26497 
26498   # Only process if variable expands to non-empty
26499 
26500   if test "x$BOOT_JDK" != x; then
26501     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26502 
26503   # Input might be given as Windows format, start by converting to
26504   # unix format.
26505   path="$BOOT_JDK"
26506   new_path=`$CYGPATH -u "$path"`
26507 
26508   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26509   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26510   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26511   # "foo.exe" is OK but "foo" is an error.
26512   #
26513   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26514   # It is also a way to make sure we got the proper file name for the real test later on.
26515   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26516   if test "x$test_shortpath" = x; then
26517     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26518 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26519     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26520   fi
26521 
26522   # Call helper function which possibly converts this using DOS-style short mode.
26523   # If so, the updated path is stored in $new_path.
26524 
26525   input_path="$new_path"
26526   # Check if we need to convert this using DOS-style short mode. If the path
26527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26528   # take no chances and rewrite it.
26529   # Note: m4 eats our [], so we need to use [ and ] instead.
26530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26531   if test "x$has_forbidden_chars" != x; then
26532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26533     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26534     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26535     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26536       # Going to short mode and back again did indeed matter. Since short mode is
26537       # case insensitive, let's make it lowercase to improve readability.
26538       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26539       # Now convert it back to Unix-style (cygpath)
26540       input_path=`$CYGPATH -u "$shortmode_path"`
26541       new_path="$input_path"
26542     fi
26543   fi
26544 
26545   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26546   if test "x$test_cygdrive_prefix" = x; then
26547     # As a simple fix, exclude /usr/bin since it's not a real path.
26548     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26549       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26550       # a path prefixed by /cygdrive for fixpath to work.
26551       new_path="$CYGWIN_ROOT_PATH$input_path"
26552     fi
26553   fi
26554 
26555 
26556   if test "x$path" != "x$new_path"; then
26557     BOOT_JDK="$new_path"
26558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26559 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26560   fi
26561 
26562     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26563 
26564   path="$BOOT_JDK"
26565   has_colon=`$ECHO $path | $GREP ^.:`
26566   new_path="$path"
26567   if test "x$has_colon" = x; then
26568     # Not in mixed or Windows style, start by that.
26569     new_path=`cmd //c echo $path`
26570   fi
26571 
26572 
26573   input_path="$new_path"
26574   # Check if we need to convert this using DOS-style short mode. If the path
26575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26576   # take no chances and rewrite it.
26577   # Note: m4 eats our [], so we need to use [ and ] instead.
26578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26579   if test "x$has_forbidden_chars" != x; then
26580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26581     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26582   fi
26583 
26584 
26585   windows_path="$new_path"
26586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26587     unix_path=`$CYGPATH -u "$windows_path"`
26588     new_path="$unix_path"
26589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26590     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26591     new_path="$unix_path"
26592   fi
26593 
26594   if test "x$path" != "x$new_path"; then
26595     BOOT_JDK="$new_path"
26596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26597 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26598   fi
26599 
26600   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26601   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26602 
26603     else
26604       # We're on a unix platform. Hooray! :)
26605       path="$BOOT_JDK"
26606       has_space=`$ECHO "$path" | $GREP " "`
26607       if test "x$has_space" != x; then
26608         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26609 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26610         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26611       fi
26612 
26613       # Use eval to expand a potential ~
26614       eval path="$path"
26615       if test ! -f "$path" && test ! -d "$path"; then
26616         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26617       fi
26618 
26619       if test -d "$path"; then
26620         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26621       else
26622         dir="`$DIRNAME "$path"`"
26623         base="`$BASENAME "$path"`"
26624         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26625       fi
26626     fi
26627   fi
26628 
26629             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26630 $as_echo_n "checking for Boot JDK... " >&6; }
26631             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26632 $as_echo "$BOOT_JDK" >&6; }
26633             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26634 $as_echo_n "checking Boot JDK version... " >&6; }
26635             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26636             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26637 $as_echo "$BOOT_JDK_VERSION" >&6; }
26638           fi # end check jdk version
26639         fi # end check javac
26640       fi # end check java
26641     fi # end check boot jdk found
26642   fi
26643 
26644 
26645   # Test: Is there a JDK installed in default, well-known locations?
26646 
26647   if test "x$BOOT_JDK_FOUND" = xno; then
26648     # Now execute the test
26649 
26650   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26651 
26652   if test "x$BOOT_JDK_FOUND" = xno; then
26653     # Now execute the test
26654 
26655   if test "x$ProgramW6432" != x; then
26656     VIRTUAL_DIR="$ProgramW6432/Java"
26657 
26658   windows_path="$VIRTUAL_DIR"
26659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26660     unix_path=`$CYGPATH -u "$windows_path"`
26661     VIRTUAL_DIR="$unix_path"
26662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26664     VIRTUAL_DIR="$unix_path"
26665   fi
26666 
26667 
26668   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26669   BOOT_JDK_SUFFIX=""
26670   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26671   if test "x$ALL_JDKS_FOUND" != x; then
26672     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26673 
26674   if test "x$BOOT_JDK_FOUND" = xno; then
26675     # Now execute the test
26676 
26677         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26678         if test -d "$BOOT_JDK"; then
26679           BOOT_JDK_FOUND=maybe
26680           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26681 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26682         fi
26683 
26684 
26685     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26686     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26687       # Do we have a bin/java?
26688       if test ! -x "$BOOT_JDK/bin/java"; then
26689         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26690 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26691         BOOT_JDK_FOUND=no
26692       else
26693         # Do we have a bin/javac?
26694         if test ! -x "$BOOT_JDK/bin/javac"; then
26695           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26697           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26698 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26699           BOOT_JDK_FOUND=no
26700         else
26701           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26702           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26703 
26704           # Extra M4 quote needed to protect [] in grep expression.
26705           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26706           if test "x$FOUND_CORRECT_VERSION" = x; then
26707             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26709             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26710 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26711             BOOT_JDK_FOUND=no
26712           else
26713             # We're done! :-)
26714             BOOT_JDK_FOUND=yes
26715 
26716   # Only process if variable expands to non-empty
26717 
26718   if test "x$BOOT_JDK" != x; then
26719     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26720 
26721   # Input might be given as Windows format, start by converting to
26722   # unix format.
26723   path="$BOOT_JDK"
26724   new_path=`$CYGPATH -u "$path"`
26725 
26726   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26727   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26728   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26729   # "foo.exe" is OK but "foo" is an error.
26730   #
26731   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26732   # It is also a way to make sure we got the proper file name for the real test later on.
26733   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26734   if test "x$test_shortpath" = x; then
26735     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26737     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26738   fi
26739 
26740   # Call helper function which possibly converts this using DOS-style short mode.
26741   # If so, the updated path is stored in $new_path.
26742 
26743   input_path="$new_path"
26744   # Check if we need to convert this using DOS-style short mode. If the path
26745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26746   # take no chances and rewrite it.
26747   # Note: m4 eats our [], so we need to use [ and ] instead.
26748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26749   if test "x$has_forbidden_chars" != x; then
26750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26754       # Going to short mode and back again did indeed matter. Since short mode is
26755       # case insensitive, let's make it lowercase to improve readability.
26756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26757       # Now convert it back to Unix-style (cygpath)
26758       input_path=`$CYGPATH -u "$shortmode_path"`
26759       new_path="$input_path"
26760     fi
26761   fi
26762 
26763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26764   if test "x$test_cygdrive_prefix" = x; then
26765     # As a simple fix, exclude /usr/bin since it's not a real path.
26766     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26768       # a path prefixed by /cygdrive for fixpath to work.
26769       new_path="$CYGWIN_ROOT_PATH$input_path"
26770     fi
26771   fi
26772 
26773 
26774   if test "x$path" != "x$new_path"; then
26775     BOOT_JDK="$new_path"
26776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26778   fi
26779 
26780     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781 
26782   path="$BOOT_JDK"
26783   has_colon=`$ECHO $path | $GREP ^.:`
26784   new_path="$path"
26785   if test "x$has_colon" = x; then
26786     # Not in mixed or Windows style, start by that.
26787     new_path=`cmd //c echo $path`
26788   fi
26789 
26790 
26791   input_path="$new_path"
26792   # Check if we need to convert this using DOS-style short mode. If the path
26793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26794   # take no chances and rewrite it.
26795   # Note: m4 eats our [], so we need to use [ and ] instead.
26796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26797   if test "x$has_forbidden_chars" != x; then
26798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26799     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26800   fi
26801 
26802 
26803   windows_path="$new_path"
26804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26805     unix_path=`$CYGPATH -u "$windows_path"`
26806     new_path="$unix_path"
26807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26809     new_path="$unix_path"
26810   fi
26811 
26812   if test "x$path" != "x$new_path"; then
26813     BOOT_JDK="$new_path"
26814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26815 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26816   fi
26817 
26818   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26819   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26820 
26821     else
26822       # We're on a unix platform. Hooray! :)
26823       path="$BOOT_JDK"
26824       has_space=`$ECHO "$path" | $GREP " "`
26825       if test "x$has_space" != x; then
26826         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26828         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26829       fi
26830 
26831       # Use eval to expand a potential ~
26832       eval path="$path"
26833       if test ! -f "$path" && test ! -d "$path"; then
26834         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26835       fi
26836 
26837       if test -d "$path"; then
26838         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26839       else
26840         dir="`$DIRNAME "$path"`"
26841         base="`$BASENAME "$path"`"
26842         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26843       fi
26844     fi
26845   fi
26846 
26847             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26848 $as_echo_n "checking for Boot JDK... " >&6; }
26849             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26850 $as_echo "$BOOT_JDK" >&6; }
26851             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26852 $as_echo_n "checking Boot JDK version... " >&6; }
26853             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26854             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26855 $as_echo "$BOOT_JDK_VERSION" >&6; }
26856           fi # end check jdk version
26857         fi # end check javac
26858       fi # end check java
26859     fi # end check boot jdk found
26860   fi
26861 
26862     done
26863   fi
26864 
26865   fi
26866 
26867 
26868     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26869     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26870       # Do we have a bin/java?
26871       if test ! -x "$BOOT_JDK/bin/java"; then
26872         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26874         BOOT_JDK_FOUND=no
26875       else
26876         # Do we have a bin/javac?
26877         if test ! -x "$BOOT_JDK/bin/javac"; then
26878           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26879 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26880           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26881 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26882           BOOT_JDK_FOUND=no
26883         else
26884           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26885           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26886 
26887           # Extra M4 quote needed to protect [] in grep expression.
26888           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26889           if test "x$FOUND_CORRECT_VERSION" = x; then
26890             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26892             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26893 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26894             BOOT_JDK_FOUND=no
26895           else
26896             # We're done! :-)
26897             BOOT_JDK_FOUND=yes
26898 
26899   # Only process if variable expands to non-empty
26900 
26901   if test "x$BOOT_JDK" != x; then
26902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26903 
26904   # Input might be given as Windows format, start by converting to
26905   # unix format.
26906   path="$BOOT_JDK"
26907   new_path=`$CYGPATH -u "$path"`
26908 
26909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26912   # "foo.exe" is OK but "foo" is an error.
26913   #
26914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26915   # It is also a way to make sure we got the proper file name for the real test later on.
26916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26917   if test "x$test_shortpath" = x; then
26918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26920     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26921   fi
26922 
26923   # Call helper function which possibly converts this using DOS-style short mode.
26924   # If so, the updated path is stored in $new_path.
26925 
26926   input_path="$new_path"
26927   # Check if we need to convert this using DOS-style short mode. If the path
26928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26929   # take no chances and rewrite it.
26930   # Note: m4 eats our [], so we need to use [ and ] instead.
26931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26932   if test "x$has_forbidden_chars" != x; then
26933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26937       # Going to short mode and back again did indeed matter. Since short mode is
26938       # case insensitive, let's make it lowercase to improve readability.
26939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26940       # Now convert it back to Unix-style (cygpath)
26941       input_path=`$CYGPATH -u "$shortmode_path"`
26942       new_path="$input_path"
26943     fi
26944   fi
26945 
26946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26947   if test "x$test_cygdrive_prefix" = x; then
26948     # As a simple fix, exclude /usr/bin since it's not a real path.
26949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26951       # a path prefixed by /cygdrive for fixpath to work.
26952       new_path="$CYGWIN_ROOT_PATH$input_path"
26953     fi
26954   fi
26955 
26956 
26957   if test "x$path" != "x$new_path"; then
26958     BOOT_JDK="$new_path"
26959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26960 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26961   fi
26962 
26963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26964 
26965   path="$BOOT_JDK"
26966   has_colon=`$ECHO $path | $GREP ^.:`
26967   new_path="$path"
26968   if test "x$has_colon" = x; then
26969     # Not in mixed or Windows style, start by that.
26970     new_path=`cmd //c echo $path`
26971   fi
26972 
26973 
26974   input_path="$new_path"
26975   # Check if we need to convert this using DOS-style short mode. If the path
26976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26977   # take no chances and rewrite it.
26978   # Note: m4 eats our [], so we need to use [ and ] instead.
26979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26980   if test "x$has_forbidden_chars" != x; then
26981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983   fi
26984 
26985 
26986   windows_path="$new_path"
26987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26988     unix_path=`$CYGPATH -u "$windows_path"`
26989     new_path="$unix_path"
26990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26992     new_path="$unix_path"
26993   fi
26994 
26995   if test "x$path" != "x$new_path"; then
26996     BOOT_JDK="$new_path"
26997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999   fi
27000 
27001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27003 
27004     else
27005       # We're on a unix platform. Hooray! :)
27006       path="$BOOT_JDK"
27007       has_space=`$ECHO "$path" | $GREP " "`
27008       if test "x$has_space" != x; then
27009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27010 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27011         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27012       fi
27013 
27014       # Use eval to expand a potential ~
27015       eval path="$path"
27016       if test ! -f "$path" && test ! -d "$path"; then
27017         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27018       fi
27019 
27020       if test -d "$path"; then
27021         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27022       else
27023         dir="`$DIRNAME "$path"`"
27024         base="`$BASENAME "$path"`"
27025         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27026       fi
27027     fi
27028   fi
27029 
27030             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27031 $as_echo_n "checking for Boot JDK... " >&6; }
27032             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27033 $as_echo "$BOOT_JDK" >&6; }
27034             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27035 $as_echo_n "checking Boot JDK version... " >&6; }
27036             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27037             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27038 $as_echo "$BOOT_JDK_VERSION" >&6; }
27039           fi # end check jdk version
27040         fi # end check javac
27041       fi # end check java
27042     fi # end check boot jdk found
27043   fi
27044 
27045 
27046   if test "x$BOOT_JDK_FOUND" = xno; then
27047     # Now execute the test
27048 
27049   if test "x$PROGRAMW6432" != x; then
27050     VIRTUAL_DIR="$PROGRAMW6432/Java"
27051 
27052   windows_path="$VIRTUAL_DIR"
27053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27054     unix_path=`$CYGPATH -u "$windows_path"`
27055     VIRTUAL_DIR="$unix_path"
27056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27058     VIRTUAL_DIR="$unix_path"
27059   fi
27060 
27061 
27062   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27063   BOOT_JDK_SUFFIX=""
27064   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27065   if test "x$ALL_JDKS_FOUND" != x; then
27066     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27067 
27068   if test "x$BOOT_JDK_FOUND" = xno; then
27069     # Now execute the test
27070 
27071         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27072         if test -d "$BOOT_JDK"; then
27073           BOOT_JDK_FOUND=maybe
27074           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27075 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27076         fi
27077 
27078 
27079     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27080     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27081       # Do we have a bin/java?
27082       if test ! -x "$BOOT_JDK/bin/java"; then
27083         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27085         BOOT_JDK_FOUND=no
27086       else
27087         # Do we have a bin/javac?
27088         if test ! -x "$BOOT_JDK/bin/javac"; then
27089           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27091           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27092 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27093           BOOT_JDK_FOUND=no
27094         else
27095           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27096           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27097 
27098           # Extra M4 quote needed to protect [] in grep expression.
27099           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27100           if test "x$FOUND_CORRECT_VERSION" = x; then
27101             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27103             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27104 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27105             BOOT_JDK_FOUND=no
27106           else
27107             # We're done! :-)
27108             BOOT_JDK_FOUND=yes
27109 
27110   # Only process if variable expands to non-empty
27111 
27112   if test "x$BOOT_JDK" != x; then
27113     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114 
27115   # Input might be given as Windows format, start by converting to
27116   # unix format.
27117   path="$BOOT_JDK"
27118   new_path=`$CYGPATH -u "$path"`
27119 
27120   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27121   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27122   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27123   # "foo.exe" is OK but "foo" is an error.
27124   #
27125   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27126   # It is also a way to make sure we got the proper file name for the real test later on.
27127   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27128   if test "x$test_shortpath" = x; then
27129     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27130 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27131     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27132   fi
27133 
27134   # Call helper function which possibly converts this using DOS-style short mode.
27135   # If so, the updated path is stored in $new_path.
27136 
27137   input_path="$new_path"
27138   # Check if we need to convert this using DOS-style short mode. If the path
27139   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27140   # take no chances and rewrite it.
27141   # Note: m4 eats our [], so we need to use [ and ] instead.
27142   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27143   if test "x$has_forbidden_chars" != x; then
27144     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27145     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27146     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27147     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27148       # Going to short mode and back again did indeed matter. Since short mode is
27149       # case insensitive, let's make it lowercase to improve readability.
27150       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27151       # Now convert it back to Unix-style (cygpath)
27152       input_path=`$CYGPATH -u "$shortmode_path"`
27153       new_path="$input_path"
27154     fi
27155   fi
27156 
27157   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27158   if test "x$test_cygdrive_prefix" = x; then
27159     # As a simple fix, exclude /usr/bin since it's not a real path.
27160     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27161       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27162       # a path prefixed by /cygdrive for fixpath to work.
27163       new_path="$CYGWIN_ROOT_PATH$input_path"
27164     fi
27165   fi
27166 
27167 
27168   if test "x$path" != "x$new_path"; then
27169     BOOT_JDK="$new_path"
27170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27172   fi
27173 
27174     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175 
27176   path="$BOOT_JDK"
27177   has_colon=`$ECHO $path | $GREP ^.:`
27178   new_path="$path"
27179   if test "x$has_colon" = x; then
27180     # Not in mixed or Windows style, start by that.
27181     new_path=`cmd //c echo $path`
27182   fi
27183 
27184 
27185   input_path="$new_path"
27186   # Check if we need to convert this using DOS-style short mode. If the path
27187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27188   # take no chances and rewrite it.
27189   # Note: m4 eats our [], so we need to use [ and ] instead.
27190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27191   if test "x$has_forbidden_chars" != x; then
27192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27193     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27194   fi
27195 
27196 
27197   windows_path="$new_path"
27198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27199     unix_path=`$CYGPATH -u "$windows_path"`
27200     new_path="$unix_path"
27201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27203     new_path="$unix_path"
27204   fi
27205 
27206   if test "x$path" != "x$new_path"; then
27207     BOOT_JDK="$new_path"
27208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27209 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27210   fi
27211 
27212   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27213   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27214 
27215     else
27216       # We're on a unix platform. Hooray! :)
27217       path="$BOOT_JDK"
27218       has_space=`$ECHO "$path" | $GREP " "`
27219       if test "x$has_space" != x; then
27220         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27221 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27222         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27223       fi
27224 
27225       # Use eval to expand a potential ~
27226       eval path="$path"
27227       if test ! -f "$path" && test ! -d "$path"; then
27228         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27229       fi
27230 
27231       if test -d "$path"; then
27232         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27233       else
27234         dir="`$DIRNAME "$path"`"
27235         base="`$BASENAME "$path"`"
27236         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27237       fi
27238     fi
27239   fi
27240 
27241             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27242 $as_echo_n "checking for Boot JDK... " >&6; }
27243             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27244 $as_echo "$BOOT_JDK" >&6; }
27245             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27246 $as_echo_n "checking Boot JDK version... " >&6; }
27247             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27249 $as_echo "$BOOT_JDK_VERSION" >&6; }
27250           fi # end check jdk version
27251         fi # end check javac
27252       fi # end check java
27253     fi # end check boot jdk found
27254   fi
27255 
27256     done
27257   fi
27258 
27259   fi
27260 
27261 
27262     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27263     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27264       # Do we have a bin/java?
27265       if test ! -x "$BOOT_JDK/bin/java"; then
27266         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27268         BOOT_JDK_FOUND=no
27269       else
27270         # Do we have a bin/javac?
27271         if test ! -x "$BOOT_JDK/bin/javac"; then
27272           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27274           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27275 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27276           BOOT_JDK_FOUND=no
27277         else
27278           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27279           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27280 
27281           # Extra M4 quote needed to protect [] in grep expression.
27282           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27283           if test "x$FOUND_CORRECT_VERSION" = x; then
27284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27286             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27287 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27288             BOOT_JDK_FOUND=no
27289           else
27290             # We're done! :-)
27291             BOOT_JDK_FOUND=yes
27292 
27293   # Only process if variable expands to non-empty
27294 
27295   if test "x$BOOT_JDK" != x; then
27296     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27297 
27298   # Input might be given as Windows format, start by converting to
27299   # unix format.
27300   path="$BOOT_JDK"
27301   new_path=`$CYGPATH -u "$path"`
27302 
27303   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27304   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27305   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27306   # "foo.exe" is OK but "foo" is an error.
27307   #
27308   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27309   # It is also a way to make sure we got the proper file name for the real test later on.
27310   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27311   if test "x$test_shortpath" = x; then
27312     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27313 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27314     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27315   fi
27316 
27317   # Call helper function which possibly converts this using DOS-style short mode.
27318   # If so, the updated path is stored in $new_path.
27319 
27320   input_path="$new_path"
27321   # Check if we need to convert this using DOS-style short mode. If the path
27322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27323   # take no chances and rewrite it.
27324   # Note: m4 eats our [], so we need to use [ and ] instead.
27325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27326   if test "x$has_forbidden_chars" != x; then
27327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27331       # Going to short mode and back again did indeed matter. Since short mode is
27332       # case insensitive, let's make it lowercase to improve readability.
27333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27334       # Now convert it back to Unix-style (cygpath)
27335       input_path=`$CYGPATH -u "$shortmode_path"`
27336       new_path="$input_path"
27337     fi
27338   fi
27339 
27340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27341   if test "x$test_cygdrive_prefix" = x; then
27342     # As a simple fix, exclude /usr/bin since it's not a real path.
27343     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27345       # a path prefixed by /cygdrive for fixpath to work.
27346       new_path="$CYGWIN_ROOT_PATH$input_path"
27347     fi
27348   fi
27349 
27350 
27351   if test "x$path" != "x$new_path"; then
27352     BOOT_JDK="$new_path"
27353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27354 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27355   fi
27356 
27357     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27358 
27359   path="$BOOT_JDK"
27360   has_colon=`$ECHO $path | $GREP ^.:`
27361   new_path="$path"
27362   if test "x$has_colon" = x; then
27363     # Not in mixed or Windows style, start by that.
27364     new_path=`cmd //c echo $path`
27365   fi
27366 
27367 
27368   input_path="$new_path"
27369   # Check if we need to convert this using DOS-style short mode. If the path
27370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27371   # take no chances and rewrite it.
27372   # Note: m4 eats our [], so we need to use [ and ] instead.
27373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27374   if test "x$has_forbidden_chars" != x; then
27375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27376     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27377   fi
27378 
27379 
27380   windows_path="$new_path"
27381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27382     unix_path=`$CYGPATH -u "$windows_path"`
27383     new_path="$unix_path"
27384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27386     new_path="$unix_path"
27387   fi
27388 
27389   if test "x$path" != "x$new_path"; then
27390     BOOT_JDK="$new_path"
27391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27392 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27393   fi
27394 
27395   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27396   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27397 
27398     else
27399       # We're on a unix platform. Hooray! :)
27400       path="$BOOT_JDK"
27401       has_space=`$ECHO "$path" | $GREP " "`
27402       if test "x$has_space" != x; then
27403         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27404 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27405         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27406       fi
27407 
27408       # Use eval to expand a potential ~
27409       eval path="$path"
27410       if test ! -f "$path" && test ! -d "$path"; then
27411         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27412       fi
27413 
27414       if test -d "$path"; then
27415         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27416       else
27417         dir="`$DIRNAME "$path"`"
27418         base="`$BASENAME "$path"`"
27419         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27420       fi
27421     fi
27422   fi
27423 
27424             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27425 $as_echo_n "checking for Boot JDK... " >&6; }
27426             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27427 $as_echo "$BOOT_JDK" >&6; }
27428             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27429 $as_echo_n "checking Boot JDK version... " >&6; }
27430             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27431             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27432 $as_echo "$BOOT_JDK_VERSION" >&6; }
27433           fi # end check jdk version
27434         fi # end check javac
27435       fi # end check java
27436     fi # end check boot jdk found
27437   fi
27438 
27439 
27440   if test "x$BOOT_JDK_FOUND" = xno; then
27441     # Now execute the test
27442 
27443   if test "x$PROGRAMFILES" != x; then
27444     VIRTUAL_DIR="$PROGRAMFILES/Java"
27445 
27446   windows_path="$VIRTUAL_DIR"
27447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448     unix_path=`$CYGPATH -u "$windows_path"`
27449     VIRTUAL_DIR="$unix_path"
27450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452     VIRTUAL_DIR="$unix_path"
27453   fi
27454 
27455 
27456   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27457   BOOT_JDK_SUFFIX=""
27458   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27459   if test "x$ALL_JDKS_FOUND" != x; then
27460     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27461 
27462   if test "x$BOOT_JDK_FOUND" = xno; then
27463     # Now execute the test
27464 
27465         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27466         if test -d "$BOOT_JDK"; then
27467           BOOT_JDK_FOUND=maybe
27468           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27469 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27470         fi
27471 
27472 
27473     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27474     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27475       # Do we have a bin/java?
27476       if test ! -x "$BOOT_JDK/bin/java"; then
27477         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27479         BOOT_JDK_FOUND=no
27480       else
27481         # Do we have a bin/javac?
27482         if test ! -x "$BOOT_JDK/bin/javac"; then
27483           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27484 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27485           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27486 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27487           BOOT_JDK_FOUND=no
27488         else
27489           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27490           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27491 
27492           # Extra M4 quote needed to protect [] in grep expression.
27493           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27494           if test "x$FOUND_CORRECT_VERSION" = x; then
27495             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27496 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27497             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27498 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27499             BOOT_JDK_FOUND=no
27500           else
27501             # We're done! :-)
27502             BOOT_JDK_FOUND=yes
27503 
27504   # Only process if variable expands to non-empty
27505 
27506   if test "x$BOOT_JDK" != x; then
27507     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27508 
27509   # Input might be given as Windows format, start by converting to
27510   # unix format.
27511   path="$BOOT_JDK"
27512   new_path=`$CYGPATH -u "$path"`
27513 
27514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27517   # "foo.exe" is OK but "foo" is an error.
27518   #
27519   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27520   # It is also a way to make sure we got the proper file name for the real test later on.
27521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27522   if test "x$test_shortpath" = x; then
27523     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27524 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27525     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27526   fi
27527 
27528   # Call helper function which possibly converts this using DOS-style short mode.
27529   # If so, the updated path is stored in $new_path.
27530 
27531   input_path="$new_path"
27532   # Check if we need to convert this using DOS-style short mode. If the path
27533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27534   # take no chances and rewrite it.
27535   # Note: m4 eats our [], so we need to use [ and ] instead.
27536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27537   if test "x$has_forbidden_chars" != x; then
27538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27542       # Going to short mode and back again did indeed matter. Since short mode is
27543       # case insensitive, let's make it lowercase to improve readability.
27544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27545       # Now convert it back to Unix-style (cygpath)
27546       input_path=`$CYGPATH -u "$shortmode_path"`
27547       new_path="$input_path"
27548     fi
27549   fi
27550 
27551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27552   if test "x$test_cygdrive_prefix" = x; then
27553     # As a simple fix, exclude /usr/bin since it's not a real path.
27554     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27556       # a path prefixed by /cygdrive for fixpath to work.
27557       new_path="$CYGWIN_ROOT_PATH$input_path"
27558     fi
27559   fi
27560 
27561 
27562   if test "x$path" != "x$new_path"; then
27563     BOOT_JDK="$new_path"
27564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27565 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27566   fi
27567 
27568     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27569 
27570   path="$BOOT_JDK"
27571   has_colon=`$ECHO $path | $GREP ^.:`
27572   new_path="$path"
27573   if test "x$has_colon" = x; then
27574     # Not in mixed or Windows style, start by that.
27575     new_path=`cmd //c echo $path`
27576   fi
27577 
27578 
27579   input_path="$new_path"
27580   # Check if we need to convert this using DOS-style short mode. If the path
27581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27582   # take no chances and rewrite it.
27583   # Note: m4 eats our [], so we need to use [ and ] instead.
27584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27585   if test "x$has_forbidden_chars" != x; then
27586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27588   fi
27589 
27590 
27591   windows_path="$new_path"
27592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27593     unix_path=`$CYGPATH -u "$windows_path"`
27594     new_path="$unix_path"
27595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27597     new_path="$unix_path"
27598   fi
27599 
27600   if test "x$path" != "x$new_path"; then
27601     BOOT_JDK="$new_path"
27602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27603 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27604   fi
27605 
27606   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27607   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27608 
27609     else
27610       # We're on a unix platform. Hooray! :)
27611       path="$BOOT_JDK"
27612       has_space=`$ECHO "$path" | $GREP " "`
27613       if test "x$has_space" != x; then
27614         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27615 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27616         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27617       fi
27618 
27619       # Use eval to expand a potential ~
27620       eval path="$path"
27621       if test ! -f "$path" && test ! -d "$path"; then
27622         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27623       fi
27624 
27625       if test -d "$path"; then
27626         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27627       else
27628         dir="`$DIRNAME "$path"`"
27629         base="`$BASENAME "$path"`"
27630         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27631       fi
27632     fi
27633   fi
27634 
27635             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27636 $as_echo_n "checking for Boot JDK... " >&6; }
27637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27638 $as_echo "$BOOT_JDK" >&6; }
27639             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27640 $as_echo_n "checking Boot JDK version... " >&6; }
27641             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27642             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27643 $as_echo "$BOOT_JDK_VERSION" >&6; }
27644           fi # end check jdk version
27645         fi # end check javac
27646       fi # end check java
27647     fi # end check boot jdk found
27648   fi
27649 
27650     done
27651   fi
27652 
27653   fi
27654 
27655 
27656     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27657     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27658       # Do we have a bin/java?
27659       if test ! -x "$BOOT_JDK/bin/java"; then
27660         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27662         BOOT_JDK_FOUND=no
27663       else
27664         # Do we have a bin/javac?
27665         if test ! -x "$BOOT_JDK/bin/javac"; then
27666           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27668           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27669 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27670           BOOT_JDK_FOUND=no
27671         else
27672           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27673           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27674 
27675           # Extra M4 quote needed to protect [] in grep expression.
27676           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27677           if test "x$FOUND_CORRECT_VERSION" = x; then
27678             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27680             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27681 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27682             BOOT_JDK_FOUND=no
27683           else
27684             # We're done! :-)
27685             BOOT_JDK_FOUND=yes
27686 
27687   # Only process if variable expands to non-empty
27688 
27689   if test "x$BOOT_JDK" != x; then
27690     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27691 
27692   # Input might be given as Windows format, start by converting to
27693   # unix format.
27694   path="$BOOT_JDK"
27695   new_path=`$CYGPATH -u "$path"`
27696 
27697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27700   # "foo.exe" is OK but "foo" is an error.
27701   #
27702   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27703   # It is also a way to make sure we got the proper file name for the real test later on.
27704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27705   if test "x$test_shortpath" = x; then
27706     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27707 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27708     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27709   fi
27710 
27711   # Call helper function which possibly converts this using DOS-style short mode.
27712   # If so, the updated path is stored in $new_path.
27713 
27714   input_path="$new_path"
27715   # Check if we need to convert this using DOS-style short mode. If the path
27716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27717   # take no chances and rewrite it.
27718   # Note: m4 eats our [], so we need to use [ and ] instead.
27719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27720   if test "x$has_forbidden_chars" != x; then
27721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27725       # Going to short mode and back again did indeed matter. Since short mode is
27726       # case insensitive, let's make it lowercase to improve readability.
27727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27728       # Now convert it back to Unix-style (cygpath)
27729       input_path=`$CYGPATH -u "$shortmode_path"`
27730       new_path="$input_path"
27731     fi
27732   fi
27733 
27734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27735   if test "x$test_cygdrive_prefix" = x; then
27736     # As a simple fix, exclude /usr/bin since it's not a real path.
27737     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27739       # a path prefixed by /cygdrive for fixpath to work.
27740       new_path="$CYGWIN_ROOT_PATH$input_path"
27741     fi
27742   fi
27743 
27744 
27745   if test "x$path" != "x$new_path"; then
27746     BOOT_JDK="$new_path"
27747     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27748 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27749   fi
27750 
27751     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27752 
27753   path="$BOOT_JDK"
27754   has_colon=`$ECHO $path | $GREP ^.:`
27755   new_path="$path"
27756   if test "x$has_colon" = x; then
27757     # Not in mixed or Windows style, start by that.
27758     new_path=`cmd //c echo $path`
27759   fi
27760 
27761 
27762   input_path="$new_path"
27763   # Check if we need to convert this using DOS-style short mode. If the path
27764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27765   # take no chances and rewrite it.
27766   # Note: m4 eats our [], so we need to use [ and ] instead.
27767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27768   if test "x$has_forbidden_chars" != x; then
27769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27771   fi
27772 
27773 
27774   windows_path="$new_path"
27775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27776     unix_path=`$CYGPATH -u "$windows_path"`
27777     new_path="$unix_path"
27778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27780     new_path="$unix_path"
27781   fi
27782 
27783   if test "x$path" != "x$new_path"; then
27784     BOOT_JDK="$new_path"
27785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27786 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27787   fi
27788 
27789   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27790   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27791 
27792     else
27793       # We're on a unix platform. Hooray! :)
27794       path="$BOOT_JDK"
27795       has_space=`$ECHO "$path" | $GREP " "`
27796       if test "x$has_space" != x; then
27797         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27798 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27799         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27800       fi
27801 
27802       # Use eval to expand a potential ~
27803       eval path="$path"
27804       if test ! -f "$path" && test ! -d "$path"; then
27805         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27806       fi
27807 
27808       if test -d "$path"; then
27809         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27810       else
27811         dir="`$DIRNAME "$path"`"
27812         base="`$BASENAME "$path"`"
27813         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27814       fi
27815     fi
27816   fi
27817 
27818             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27819 $as_echo_n "checking for Boot JDK... " >&6; }
27820             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27821 $as_echo "$BOOT_JDK" >&6; }
27822             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27823 $as_echo_n "checking Boot JDK version... " >&6; }
27824             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27826 $as_echo "$BOOT_JDK_VERSION" >&6; }
27827           fi # end check jdk version
27828         fi # end check javac
27829       fi # end check java
27830     fi # end check boot jdk found
27831   fi
27832 
27833 
27834   if test "x$BOOT_JDK_FOUND" = xno; then
27835     # Now execute the test
27836 
27837   if test "x$ProgramFiles" != x; then
27838     VIRTUAL_DIR="$ProgramFiles/Java"
27839 
27840   windows_path="$VIRTUAL_DIR"
27841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27842     unix_path=`$CYGPATH -u "$windows_path"`
27843     VIRTUAL_DIR="$unix_path"
27844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27846     VIRTUAL_DIR="$unix_path"
27847   fi
27848 
27849 
27850   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27851   BOOT_JDK_SUFFIX=""
27852   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27853   if test "x$ALL_JDKS_FOUND" != x; then
27854     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27855 
27856   if test "x$BOOT_JDK_FOUND" = xno; then
27857     # Now execute the test
27858 
27859         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27860         if test -d "$BOOT_JDK"; then
27861           BOOT_JDK_FOUND=maybe
27862           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27863 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27864         fi
27865 
27866 
27867     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27868     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27869       # Do we have a bin/java?
27870       if test ! -x "$BOOT_JDK/bin/java"; then
27871         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27872 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27873         BOOT_JDK_FOUND=no
27874       else
27875         # Do we have a bin/javac?
27876         if test ! -x "$BOOT_JDK/bin/javac"; then
27877           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27879           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27880 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27881           BOOT_JDK_FOUND=no
27882         else
27883           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27884           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27885 
27886           # Extra M4 quote needed to protect [] in grep expression.
27887           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27888           if test "x$FOUND_CORRECT_VERSION" = x; then
27889             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27890 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27891             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27892 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27893             BOOT_JDK_FOUND=no
27894           else
27895             # We're done! :-)
27896             BOOT_JDK_FOUND=yes
27897 
27898   # Only process if variable expands to non-empty
27899 
27900   if test "x$BOOT_JDK" != x; then
27901     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27902 
27903   # Input might be given as Windows format, start by converting to
27904   # unix format.
27905   path="$BOOT_JDK"
27906   new_path=`$CYGPATH -u "$path"`
27907 
27908   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27909   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27910   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27911   # "foo.exe" is OK but "foo" is an error.
27912   #
27913   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27914   # It is also a way to make sure we got the proper file name for the real test later on.
27915   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27916   if test "x$test_shortpath" = x; then
27917     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27918 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27919     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27920   fi
27921 
27922   # Call helper function which possibly converts this using DOS-style short mode.
27923   # If so, the updated path is stored in $new_path.
27924 
27925   input_path="$new_path"
27926   # Check if we need to convert this using DOS-style short mode. If the path
27927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27928   # take no chances and rewrite it.
27929   # Note: m4 eats our [], so we need to use [ and ] instead.
27930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27931   if test "x$has_forbidden_chars" != x; then
27932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27933     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27934     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27935     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27936       # Going to short mode and back again did indeed matter. Since short mode is
27937       # case insensitive, let's make it lowercase to improve readability.
27938       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27939       # Now convert it back to Unix-style (cygpath)
27940       input_path=`$CYGPATH -u "$shortmode_path"`
27941       new_path="$input_path"
27942     fi
27943   fi
27944 
27945   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27946   if test "x$test_cygdrive_prefix" = x; then
27947     # As a simple fix, exclude /usr/bin since it's not a real path.
27948     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27949       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27950       # a path prefixed by /cygdrive for fixpath to work.
27951       new_path="$CYGWIN_ROOT_PATH$input_path"
27952     fi
27953   fi
27954 
27955 
27956   if test "x$path" != "x$new_path"; then
27957     BOOT_JDK="$new_path"
27958     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27959 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27960   fi
27961 
27962     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27963 
27964   path="$BOOT_JDK"
27965   has_colon=`$ECHO $path | $GREP ^.:`
27966   new_path="$path"
27967   if test "x$has_colon" = x; then
27968     # Not in mixed or Windows style, start by that.
27969     new_path=`cmd //c echo $path`
27970   fi
27971 
27972 
27973   input_path="$new_path"
27974   # Check if we need to convert this using DOS-style short mode. If the path
27975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27976   # take no chances and rewrite it.
27977   # Note: m4 eats our [], so we need to use [ and ] instead.
27978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27979   if test "x$has_forbidden_chars" != x; then
27980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982   fi
27983 
27984 
27985   windows_path="$new_path"
27986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27987     unix_path=`$CYGPATH -u "$windows_path"`
27988     new_path="$unix_path"
27989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27991     new_path="$unix_path"
27992   fi
27993 
27994   if test "x$path" != "x$new_path"; then
27995     BOOT_JDK="$new_path"
27996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27997 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27998   fi
27999 
28000   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28001   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28002 
28003     else
28004       # We're on a unix platform. Hooray! :)
28005       path="$BOOT_JDK"
28006       has_space=`$ECHO "$path" | $GREP " "`
28007       if test "x$has_space" != x; then
28008         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28009 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28010         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28011       fi
28012 
28013       # Use eval to expand a potential ~
28014       eval path="$path"
28015       if test ! -f "$path" && test ! -d "$path"; then
28016         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28017       fi
28018 
28019       if test -d "$path"; then
28020         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28021       else
28022         dir="`$DIRNAME "$path"`"
28023         base="`$BASENAME "$path"`"
28024         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28025       fi
28026     fi
28027   fi
28028 
28029             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28030 $as_echo_n "checking for Boot JDK... " >&6; }
28031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28032 $as_echo "$BOOT_JDK" >&6; }
28033             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28034 $as_echo_n "checking Boot JDK version... " >&6; }
28035             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28037 $as_echo "$BOOT_JDK_VERSION" >&6; }
28038           fi # end check jdk version
28039         fi # end check javac
28040       fi # end check java
28041     fi # end check boot jdk found
28042   fi
28043 
28044     done
28045   fi
28046 
28047   fi
28048 
28049 
28050     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28051     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28052       # Do we have a bin/java?
28053       if test ! -x "$BOOT_JDK/bin/java"; then
28054         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28056         BOOT_JDK_FOUND=no
28057       else
28058         # Do we have a bin/javac?
28059         if test ! -x "$BOOT_JDK/bin/javac"; then
28060           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28062           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28063 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28064           BOOT_JDK_FOUND=no
28065         else
28066           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28067           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28068 
28069           # Extra M4 quote needed to protect [] in grep expression.
28070           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28071           if test "x$FOUND_CORRECT_VERSION" = x; then
28072             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28074             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28075 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28076             BOOT_JDK_FOUND=no
28077           else
28078             # We're done! :-)
28079             BOOT_JDK_FOUND=yes
28080 
28081   # Only process if variable expands to non-empty
28082 
28083   if test "x$BOOT_JDK" != x; then
28084     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085 
28086   # Input might be given as Windows format, start by converting to
28087   # unix format.
28088   path="$BOOT_JDK"
28089   new_path=`$CYGPATH -u "$path"`
28090 
28091   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28092   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28093   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28094   # "foo.exe" is OK but "foo" is an error.
28095   #
28096   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28097   # It is also a way to make sure we got the proper file name for the real test later on.
28098   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28099   if test "x$test_shortpath" = x; then
28100     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28101 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28102     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28103   fi
28104 
28105   # Call helper function which possibly converts this using DOS-style short mode.
28106   # If so, the updated path is stored in $new_path.
28107 
28108   input_path="$new_path"
28109   # Check if we need to convert this using DOS-style short mode. If the path
28110   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28111   # take no chances and rewrite it.
28112   # Note: m4 eats our [], so we need to use [ and ] instead.
28113   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28114   if test "x$has_forbidden_chars" != x; then
28115     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28116     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28117     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28118     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28119       # Going to short mode and back again did indeed matter. Since short mode is
28120       # case insensitive, let's make it lowercase to improve readability.
28121       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28122       # Now convert it back to Unix-style (cygpath)
28123       input_path=`$CYGPATH -u "$shortmode_path"`
28124       new_path="$input_path"
28125     fi
28126   fi
28127 
28128   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28129   if test "x$test_cygdrive_prefix" = x; then
28130     # As a simple fix, exclude /usr/bin since it's not a real path.
28131     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28132       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28133       # a path prefixed by /cygdrive for fixpath to work.
28134       new_path="$CYGWIN_ROOT_PATH$input_path"
28135     fi
28136   fi
28137 
28138 
28139   if test "x$path" != "x$new_path"; then
28140     BOOT_JDK="$new_path"
28141     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28142 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28143   fi
28144 
28145     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28146 
28147   path="$BOOT_JDK"
28148   has_colon=`$ECHO $path | $GREP ^.:`
28149   new_path="$path"
28150   if test "x$has_colon" = x; then
28151     # Not in mixed or Windows style, start by that.
28152     new_path=`cmd //c echo $path`
28153   fi
28154 
28155 
28156   input_path="$new_path"
28157   # Check if we need to convert this using DOS-style short mode. If the path
28158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28159   # take no chances and rewrite it.
28160   # Note: m4 eats our [], so we need to use [ and ] instead.
28161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28162   if test "x$has_forbidden_chars" != x; then
28163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28164     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28165   fi
28166 
28167 
28168   windows_path="$new_path"
28169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28170     unix_path=`$CYGPATH -u "$windows_path"`
28171     new_path="$unix_path"
28172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28174     new_path="$unix_path"
28175   fi
28176 
28177   if test "x$path" != "x$new_path"; then
28178     BOOT_JDK="$new_path"
28179     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181   fi
28182 
28183   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28184   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28185 
28186     else
28187       # We're on a unix platform. Hooray! :)
28188       path="$BOOT_JDK"
28189       has_space=`$ECHO "$path" | $GREP " "`
28190       if test "x$has_space" != x; then
28191         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28192 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28193         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28194       fi
28195 
28196       # Use eval to expand a potential ~
28197       eval path="$path"
28198       if test ! -f "$path" && test ! -d "$path"; then
28199         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28200       fi
28201 
28202       if test -d "$path"; then
28203         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28204       else
28205         dir="`$DIRNAME "$path"`"
28206         base="`$BASENAME "$path"`"
28207         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28208       fi
28209     fi
28210   fi
28211 
28212             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28213 $as_echo_n "checking for Boot JDK... " >&6; }
28214             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28215 $as_echo "$BOOT_JDK" >&6; }
28216             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28217 $as_echo_n "checking Boot JDK version... " >&6; }
28218             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28220 $as_echo "$BOOT_JDK_VERSION" >&6; }
28221           fi # end check jdk version
28222         fi # end check javac
28223       fi # end check java
28224     fi # end check boot jdk found
28225   fi
28226 
28227 
28228   if test "x$BOOT_JDK_FOUND" = xno; then
28229     # Now execute the test
28230 
28231   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28232   BOOT_JDK_SUFFIX=""
28233   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28234   if test "x$ALL_JDKS_FOUND" != x; then
28235     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28236 
28237   if test "x$BOOT_JDK_FOUND" = xno; then
28238     # Now execute the test
28239 
28240         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28241         if test -d "$BOOT_JDK"; then
28242           BOOT_JDK_FOUND=maybe
28243           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28244 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28245         fi
28246 
28247 
28248     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28249     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28250       # Do we have a bin/java?
28251       if test ! -x "$BOOT_JDK/bin/java"; then
28252         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28253 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28254         BOOT_JDK_FOUND=no
28255       else
28256         # Do we have a bin/javac?
28257         if test ! -x "$BOOT_JDK/bin/javac"; then
28258           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28259 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28260           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28261 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28262           BOOT_JDK_FOUND=no
28263         else
28264           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28265           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28266 
28267           # Extra M4 quote needed to protect [] in grep expression.
28268           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28269           if test "x$FOUND_CORRECT_VERSION" = x; then
28270             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28272             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28273 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28274             BOOT_JDK_FOUND=no
28275           else
28276             # We're done! :-)
28277             BOOT_JDK_FOUND=yes
28278 
28279   # Only process if variable expands to non-empty
28280 
28281   if test "x$BOOT_JDK" != x; then
28282     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28283 
28284   # Input might be given as Windows format, start by converting to
28285   # unix format.
28286   path="$BOOT_JDK"
28287   new_path=`$CYGPATH -u "$path"`
28288 
28289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28292   # "foo.exe" is OK but "foo" is an error.
28293   #
28294   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28295   # It is also a way to make sure we got the proper file name for the real test later on.
28296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28297   if test "x$test_shortpath" = x; then
28298     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28300     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28301   fi
28302 
28303   # Call helper function which possibly converts this using DOS-style short mode.
28304   # If so, the updated path is stored in $new_path.
28305 
28306   input_path="$new_path"
28307   # Check if we need to convert this using DOS-style short mode. If the path
28308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28309   # take no chances and rewrite it.
28310   # Note: m4 eats our [], so we need to use [ and ] instead.
28311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28312   if test "x$has_forbidden_chars" != x; then
28313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28317       # Going to short mode and back again did indeed matter. Since short mode is
28318       # case insensitive, let's make it lowercase to improve readability.
28319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28320       # Now convert it back to Unix-style (cygpath)
28321       input_path=`$CYGPATH -u "$shortmode_path"`
28322       new_path="$input_path"
28323     fi
28324   fi
28325 
28326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28327   if test "x$test_cygdrive_prefix" = x; then
28328     # As a simple fix, exclude /usr/bin since it's not a real path.
28329     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28331       # a path prefixed by /cygdrive for fixpath to work.
28332       new_path="$CYGWIN_ROOT_PATH$input_path"
28333     fi
28334   fi
28335 
28336 
28337   if test "x$path" != "x$new_path"; then
28338     BOOT_JDK="$new_path"
28339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28341   fi
28342 
28343     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344 
28345   path="$BOOT_JDK"
28346   has_colon=`$ECHO $path | $GREP ^.:`
28347   new_path="$path"
28348   if test "x$has_colon" = x; then
28349     # Not in mixed or Windows style, start by that.
28350     new_path=`cmd //c echo $path`
28351   fi
28352 
28353 
28354   input_path="$new_path"
28355   # Check if we need to convert this using DOS-style short mode. If the path
28356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357   # take no chances and rewrite it.
28358   # Note: m4 eats our [], so we need to use [ and ] instead.
28359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28360   if test "x$has_forbidden_chars" != x; then
28361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28363   fi
28364 
28365 
28366   windows_path="$new_path"
28367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28368     unix_path=`$CYGPATH -u "$windows_path"`
28369     new_path="$unix_path"
28370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28372     new_path="$unix_path"
28373   fi
28374 
28375   if test "x$path" != "x$new_path"; then
28376     BOOT_JDK="$new_path"
28377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379   fi
28380 
28381   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28382   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28383 
28384     else
28385       # We're on a unix platform. Hooray! :)
28386       path="$BOOT_JDK"
28387       has_space=`$ECHO "$path" | $GREP " "`
28388       if test "x$has_space" != x; then
28389         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28390 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28391         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28392       fi
28393 
28394       # Use eval to expand a potential ~
28395       eval path="$path"
28396       if test ! -f "$path" && test ! -d "$path"; then
28397         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28398       fi
28399 
28400       if test -d "$path"; then
28401         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28402       else
28403         dir="`$DIRNAME "$path"`"
28404         base="`$BASENAME "$path"`"
28405         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28406       fi
28407     fi
28408   fi
28409 
28410             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28411 $as_echo_n "checking for Boot JDK... " >&6; }
28412             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28413 $as_echo "$BOOT_JDK" >&6; }
28414             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28415 $as_echo_n "checking Boot JDK version... " >&6; }
28416             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28417             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28418 $as_echo "$BOOT_JDK_VERSION" >&6; }
28419           fi # end check jdk version
28420         fi # end check javac
28421       fi # end check java
28422     fi # end check boot jdk found
28423   fi
28424 
28425     done
28426   fi
28427 
28428 
28429     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28430     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28431       # Do we have a bin/java?
28432       if test ! -x "$BOOT_JDK/bin/java"; then
28433         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28435         BOOT_JDK_FOUND=no
28436       else
28437         # Do we have a bin/javac?
28438         if test ! -x "$BOOT_JDK/bin/javac"; then
28439           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28441           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28442 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28443           BOOT_JDK_FOUND=no
28444         else
28445           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28446           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28447 
28448           # Extra M4 quote needed to protect [] in grep expression.
28449           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28450           if test "x$FOUND_CORRECT_VERSION" = x; then
28451             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28452 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28453             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28454 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28455             BOOT_JDK_FOUND=no
28456           else
28457             # We're done! :-)
28458             BOOT_JDK_FOUND=yes
28459 
28460   # Only process if variable expands to non-empty
28461 
28462   if test "x$BOOT_JDK" != x; then
28463     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464 
28465   # Input might be given as Windows format, start by converting to
28466   # unix format.
28467   path="$BOOT_JDK"
28468   new_path=`$CYGPATH -u "$path"`
28469 
28470   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28471   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28472   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28473   # "foo.exe" is OK but "foo" is an error.
28474   #
28475   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28476   # It is also a way to make sure we got the proper file name for the real test later on.
28477   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28478   if test "x$test_shortpath" = x; then
28479     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28480 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28481     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28482   fi
28483 
28484   # Call helper function which possibly converts this using DOS-style short mode.
28485   # If so, the updated path is stored in $new_path.
28486 
28487   input_path="$new_path"
28488   # Check if we need to convert this using DOS-style short mode. If the path
28489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28490   # take no chances and rewrite it.
28491   # Note: m4 eats our [], so we need to use [ and ] instead.
28492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28493   if test "x$has_forbidden_chars" != x; then
28494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28498       # Going to short mode and back again did indeed matter. Since short mode is
28499       # case insensitive, let's make it lowercase to improve readability.
28500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28501       # Now convert it back to Unix-style (cygpath)
28502       input_path=`$CYGPATH -u "$shortmode_path"`
28503       new_path="$input_path"
28504     fi
28505   fi
28506 
28507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28508   if test "x$test_cygdrive_prefix" = x; then
28509     # As a simple fix, exclude /usr/bin since it's not a real path.
28510     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28512       # a path prefixed by /cygdrive for fixpath to work.
28513       new_path="$CYGWIN_ROOT_PATH$input_path"
28514     fi
28515   fi
28516 
28517 
28518   if test "x$path" != "x$new_path"; then
28519     BOOT_JDK="$new_path"
28520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28521 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28522   fi
28523 
28524     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525 
28526   path="$BOOT_JDK"
28527   has_colon=`$ECHO $path | $GREP ^.:`
28528   new_path="$path"
28529   if test "x$has_colon" = x; then
28530     # Not in mixed or Windows style, start by that.
28531     new_path=`cmd //c echo $path`
28532   fi
28533 
28534 
28535   input_path="$new_path"
28536   # Check if we need to convert this using DOS-style short mode. If the path
28537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28538   # take no chances and rewrite it.
28539   # Note: m4 eats our [], so we need to use [ and ] instead.
28540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28541   if test "x$has_forbidden_chars" != x; then
28542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28544   fi
28545 
28546 
28547   windows_path="$new_path"
28548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28549     unix_path=`$CYGPATH -u "$windows_path"`
28550     new_path="$unix_path"
28551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28553     new_path="$unix_path"
28554   fi
28555 
28556   if test "x$path" != "x$new_path"; then
28557     BOOT_JDK="$new_path"
28558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560   fi
28561 
28562   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28563   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28564 
28565     else
28566       # We're on a unix platform. Hooray! :)
28567       path="$BOOT_JDK"
28568       has_space=`$ECHO "$path" | $GREP " "`
28569       if test "x$has_space" != x; then
28570         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28571 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28572         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28573       fi
28574 
28575       # Use eval to expand a potential ~
28576       eval path="$path"
28577       if test ! -f "$path" && test ! -d "$path"; then
28578         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28579       fi
28580 
28581       if test -d "$path"; then
28582         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28583       else
28584         dir="`$DIRNAME "$path"`"
28585         base="`$BASENAME "$path"`"
28586         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28587       fi
28588     fi
28589   fi
28590 
28591             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28592 $as_echo_n "checking for Boot JDK... " >&6; }
28593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28594 $as_echo "$BOOT_JDK" >&6; }
28595             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28596 $as_echo_n "checking Boot JDK version... " >&6; }
28597             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28599 $as_echo "$BOOT_JDK_VERSION" >&6; }
28600           fi # end check jdk version
28601         fi # end check javac
28602       fi # end check java
28603     fi # end check boot jdk found
28604   fi
28605 
28606   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28607 
28608   if test "x$BOOT_JDK_FOUND" = xno; then
28609     # Now execute the test
28610 
28611   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28612   BOOT_JDK_SUFFIX="/Contents/Home"
28613   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28614   if test "x$ALL_JDKS_FOUND" != x; then
28615     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28616 
28617   if test "x$BOOT_JDK_FOUND" = xno; then
28618     # Now execute the test
28619 
28620         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28621         if test -d "$BOOT_JDK"; then
28622           BOOT_JDK_FOUND=maybe
28623           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28624 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28625         fi
28626 
28627 
28628     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28629     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28630       # Do we have a bin/java?
28631       if test ! -x "$BOOT_JDK/bin/java"; then
28632         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28633 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28634         BOOT_JDK_FOUND=no
28635       else
28636         # Do we have a bin/javac?
28637         if test ! -x "$BOOT_JDK/bin/javac"; then
28638           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28639 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28640           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28641 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28642           BOOT_JDK_FOUND=no
28643         else
28644           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28645           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28646 
28647           # Extra M4 quote needed to protect [] in grep expression.
28648           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28649           if test "x$FOUND_CORRECT_VERSION" = x; then
28650             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28652             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28653 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28654             BOOT_JDK_FOUND=no
28655           else
28656             # We're done! :-)
28657             BOOT_JDK_FOUND=yes
28658 
28659   # Only process if variable expands to non-empty
28660 
28661   if test "x$BOOT_JDK" != x; then
28662     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28663 
28664   # Input might be given as Windows format, start by converting to
28665   # unix format.
28666   path="$BOOT_JDK"
28667   new_path=`$CYGPATH -u "$path"`
28668 
28669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28672   # "foo.exe" is OK but "foo" is an error.
28673   #
28674   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28675   # It is also a way to make sure we got the proper file name for the real test later on.
28676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28677   if test "x$test_shortpath" = x; then
28678     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28680     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28681   fi
28682 
28683   # Call helper function which possibly converts this using DOS-style short mode.
28684   # If so, the updated path is stored in $new_path.
28685 
28686   input_path="$new_path"
28687   # Check if we need to convert this using DOS-style short mode. If the path
28688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28689   # take no chances and rewrite it.
28690   # Note: m4 eats our [], so we need to use [ and ] instead.
28691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28692   if test "x$has_forbidden_chars" != x; then
28693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28697       # Going to short mode and back again did indeed matter. Since short mode is
28698       # case insensitive, let's make it lowercase to improve readability.
28699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28700       # Now convert it back to Unix-style (cygpath)
28701       input_path=`$CYGPATH -u "$shortmode_path"`
28702       new_path="$input_path"
28703     fi
28704   fi
28705 
28706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28707   if test "x$test_cygdrive_prefix" = x; then
28708     # As a simple fix, exclude /usr/bin since it's not a real path.
28709     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28711       # a path prefixed by /cygdrive for fixpath to work.
28712       new_path="$CYGWIN_ROOT_PATH$input_path"
28713     fi
28714   fi
28715 
28716 
28717   if test "x$path" != "x$new_path"; then
28718     BOOT_JDK="$new_path"
28719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28720 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28721   fi
28722 
28723     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28724 
28725   path="$BOOT_JDK"
28726   has_colon=`$ECHO $path | $GREP ^.:`
28727   new_path="$path"
28728   if test "x$has_colon" = x; then
28729     # Not in mixed or Windows style, start by that.
28730     new_path=`cmd //c echo $path`
28731   fi
28732 
28733 
28734   input_path="$new_path"
28735   # Check if we need to convert this using DOS-style short mode. If the path
28736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28737   # take no chances and rewrite it.
28738   # Note: m4 eats our [], so we need to use [ and ] instead.
28739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28740   if test "x$has_forbidden_chars" != x; then
28741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28743   fi
28744 
28745 
28746   windows_path="$new_path"
28747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28748     unix_path=`$CYGPATH -u "$windows_path"`
28749     new_path="$unix_path"
28750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28752     new_path="$unix_path"
28753   fi
28754 
28755   if test "x$path" != "x$new_path"; then
28756     BOOT_JDK="$new_path"
28757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28758 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28759   fi
28760 
28761   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28762   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28763 
28764     else
28765       # We're on a unix platform. Hooray! :)
28766       path="$BOOT_JDK"
28767       has_space=`$ECHO "$path" | $GREP " "`
28768       if test "x$has_space" != x; then
28769         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28770 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28771         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28772       fi
28773 
28774       # Use eval to expand a potential ~
28775       eval path="$path"
28776       if test ! -f "$path" && test ! -d "$path"; then
28777         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28778       fi
28779 
28780       if test -d "$path"; then
28781         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28782       else
28783         dir="`$DIRNAME "$path"`"
28784         base="`$BASENAME "$path"`"
28785         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28786       fi
28787     fi
28788   fi
28789 
28790             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28791 $as_echo_n "checking for Boot JDK... " >&6; }
28792             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28793 $as_echo "$BOOT_JDK" >&6; }
28794             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28795 $as_echo_n "checking Boot JDK version... " >&6; }
28796             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28798 $as_echo "$BOOT_JDK_VERSION" >&6; }
28799           fi # end check jdk version
28800         fi # end check javac
28801       fi # end check java
28802     fi # end check boot jdk found
28803   fi
28804 
28805     done
28806   fi
28807 
28808 
28809     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28810     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28811       # Do we have a bin/java?
28812       if test ! -x "$BOOT_JDK/bin/java"; then
28813         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28815         BOOT_JDK_FOUND=no
28816       else
28817         # Do we have a bin/javac?
28818         if test ! -x "$BOOT_JDK/bin/javac"; then
28819           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28821           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28822 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28823           BOOT_JDK_FOUND=no
28824         else
28825           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28826           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28827 
28828           # Extra M4 quote needed to protect [] in grep expression.
28829           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28830           if test "x$FOUND_CORRECT_VERSION" = x; then
28831             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28832 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28833             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28834 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28835             BOOT_JDK_FOUND=no
28836           else
28837             # We're done! :-)
28838             BOOT_JDK_FOUND=yes
28839 
28840   # Only process if variable expands to non-empty
28841 
28842   if test "x$BOOT_JDK" != x; then
28843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28844 
28845   # Input might be given as Windows format, start by converting to
28846   # unix format.
28847   path="$BOOT_JDK"
28848   new_path=`$CYGPATH -u "$path"`
28849 
28850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28853   # "foo.exe" is OK but "foo" is an error.
28854   #
28855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28856   # It is also a way to make sure we got the proper file name for the real test later on.
28857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28858   if test "x$test_shortpath" = x; then
28859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28861     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28862   fi
28863 
28864   # Call helper function which possibly converts this using DOS-style short mode.
28865   # If so, the updated path is stored in $new_path.
28866 
28867   input_path="$new_path"
28868   # Check if we need to convert this using DOS-style short mode. If the path
28869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28870   # take no chances and rewrite it.
28871   # Note: m4 eats our [], so we need to use [ and ] instead.
28872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28873   if test "x$has_forbidden_chars" != x; then
28874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28878       # Going to short mode and back again did indeed matter. Since short mode is
28879       # case insensitive, let's make it lowercase to improve readability.
28880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28881       # Now convert it back to Unix-style (cygpath)
28882       input_path=`$CYGPATH -u "$shortmode_path"`
28883       new_path="$input_path"
28884     fi
28885   fi
28886 
28887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28888   if test "x$test_cygdrive_prefix" = x; then
28889     # As a simple fix, exclude /usr/bin since it's not a real path.
28890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28892       # a path prefixed by /cygdrive for fixpath to work.
28893       new_path="$CYGWIN_ROOT_PATH$input_path"
28894     fi
28895   fi
28896 
28897 
28898   if test "x$path" != "x$new_path"; then
28899     BOOT_JDK="$new_path"
28900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28901 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28902   fi
28903 
28904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28905 
28906   path="$BOOT_JDK"
28907   has_colon=`$ECHO $path | $GREP ^.:`
28908   new_path="$path"
28909   if test "x$has_colon" = x; then
28910     # Not in mixed or Windows style, start by that.
28911     new_path=`cmd //c echo $path`
28912   fi
28913 
28914 
28915   input_path="$new_path"
28916   # Check if we need to convert this using DOS-style short mode. If the path
28917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28918   # take no chances and rewrite it.
28919   # Note: m4 eats our [], so we need to use [ and ] instead.
28920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28921   if test "x$has_forbidden_chars" != x; then
28922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28924   fi
28925 
28926 
28927   windows_path="$new_path"
28928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28929     unix_path=`$CYGPATH -u "$windows_path"`
28930     new_path="$unix_path"
28931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28933     new_path="$unix_path"
28934   fi
28935 
28936   if test "x$path" != "x$new_path"; then
28937     BOOT_JDK="$new_path"
28938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28939 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28940   fi
28941 
28942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28944 
28945     else
28946       # We're on a unix platform. Hooray! :)
28947       path="$BOOT_JDK"
28948       has_space=`$ECHO "$path" | $GREP " "`
28949       if test "x$has_space" != x; then
28950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28951 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28953       fi
28954 
28955       # Use eval to expand a potential ~
28956       eval path="$path"
28957       if test ! -f "$path" && test ! -d "$path"; then
28958         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28959       fi
28960 
28961       if test -d "$path"; then
28962         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28963       else
28964         dir="`$DIRNAME "$path"`"
28965         base="`$BASENAME "$path"`"
28966         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28967       fi
28968     fi
28969   fi
28970 
28971             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28972 $as_echo_n "checking for Boot JDK... " >&6; }
28973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28974 $as_echo "$BOOT_JDK" >&6; }
28975             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28976 $as_echo_n "checking Boot JDK version... " >&6; }
28977             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28978             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28979 $as_echo "$BOOT_JDK_VERSION" >&6; }
28980           fi # end check jdk version
28981         fi # end check javac
28982       fi # end check java
28983     fi # end check boot jdk found
28984   fi
28985 
28986 
28987   if test "x$BOOT_JDK_FOUND" = xno; then
28988     # Now execute the test
28989 
28990   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28991   BOOT_JDK_SUFFIX="/Contents/Home"
28992   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28993   if test "x$ALL_JDKS_FOUND" != x; then
28994     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28995 
28996   if test "x$BOOT_JDK_FOUND" = xno; then
28997     # Now execute the test
28998 
28999         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29000         if test -d "$BOOT_JDK"; then
29001           BOOT_JDK_FOUND=maybe
29002           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29003 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29004         fi
29005 
29006 
29007     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29008     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29009       # Do we have a bin/java?
29010       if test ! -x "$BOOT_JDK/bin/java"; then
29011         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29013         BOOT_JDK_FOUND=no
29014       else
29015         # Do we have a bin/javac?
29016         if test ! -x "$BOOT_JDK/bin/javac"; then
29017           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29019           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29020 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29021           BOOT_JDK_FOUND=no
29022         else
29023           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29024           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29025 
29026           # Extra M4 quote needed to protect [] in grep expression.
29027           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29028           if test "x$FOUND_CORRECT_VERSION" = x; then
29029             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29031             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29032 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29033             BOOT_JDK_FOUND=no
29034           else
29035             # We're done! :-)
29036             BOOT_JDK_FOUND=yes
29037 
29038   # Only process if variable expands to non-empty
29039 
29040   if test "x$BOOT_JDK" != x; then
29041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29042 
29043   # Input might be given as Windows format, start by converting to
29044   # unix format.
29045   path="$BOOT_JDK"
29046   new_path=`$CYGPATH -u "$path"`
29047 
29048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29051   # "foo.exe" is OK but "foo" is an error.
29052   #
29053   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29054   # It is also a way to make sure we got the proper file name for the real test later on.
29055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29056   if test "x$test_shortpath" = x; then
29057     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29059     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29060   fi
29061 
29062   # Call helper function which possibly converts this using DOS-style short mode.
29063   # If so, the updated path is stored in $new_path.
29064 
29065   input_path="$new_path"
29066   # Check if we need to convert this using DOS-style short mode. If the path
29067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29068   # take no chances and rewrite it.
29069   # Note: m4 eats our [], so we need to use [ and ] instead.
29070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29071   if test "x$has_forbidden_chars" != x; then
29072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29076       # Going to short mode and back again did indeed matter. Since short mode is
29077       # case insensitive, let's make it lowercase to improve readability.
29078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29079       # Now convert it back to Unix-style (cygpath)
29080       input_path=`$CYGPATH -u "$shortmode_path"`
29081       new_path="$input_path"
29082     fi
29083   fi
29084 
29085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29086   if test "x$test_cygdrive_prefix" = x; then
29087     # As a simple fix, exclude /usr/bin since it's not a real path.
29088     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29090       # a path prefixed by /cygdrive for fixpath to work.
29091       new_path="$CYGWIN_ROOT_PATH$input_path"
29092     fi
29093   fi
29094 
29095 
29096   if test "x$path" != "x$new_path"; then
29097     BOOT_JDK="$new_path"
29098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29099 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29100   fi
29101 
29102     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29103 
29104   path="$BOOT_JDK"
29105   has_colon=`$ECHO $path | $GREP ^.:`
29106   new_path="$path"
29107   if test "x$has_colon" = x; then
29108     # Not in mixed or Windows style, start by that.
29109     new_path=`cmd //c echo $path`
29110   fi
29111 
29112 
29113   input_path="$new_path"
29114   # Check if we need to convert this using DOS-style short mode. If the path
29115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29116   # take no chances and rewrite it.
29117   # Note: m4 eats our [], so we need to use [ and ] instead.
29118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29119   if test "x$has_forbidden_chars" != x; then
29120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29121     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29122   fi
29123 
29124 
29125   windows_path="$new_path"
29126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29127     unix_path=`$CYGPATH -u "$windows_path"`
29128     new_path="$unix_path"
29129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29131     new_path="$unix_path"
29132   fi
29133 
29134   if test "x$path" != "x$new_path"; then
29135     BOOT_JDK="$new_path"
29136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29138   fi
29139 
29140   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29141   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29142 
29143     else
29144       # We're on a unix platform. Hooray! :)
29145       path="$BOOT_JDK"
29146       has_space=`$ECHO "$path" | $GREP " "`
29147       if test "x$has_space" != x; then
29148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29149 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29150         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29151       fi
29152 
29153       # Use eval to expand a potential ~
29154       eval path="$path"
29155       if test ! -f "$path" && test ! -d "$path"; then
29156         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29157       fi
29158 
29159       if test -d "$path"; then
29160         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29161       else
29162         dir="`$DIRNAME "$path"`"
29163         base="`$BASENAME "$path"`"
29164         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29165       fi
29166     fi
29167   fi
29168 
29169             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29170 $as_echo_n "checking for Boot JDK... " >&6; }
29171             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29172 $as_echo "$BOOT_JDK" >&6; }
29173             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29174 $as_echo_n "checking Boot JDK version... " >&6; }
29175             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29176             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29177 $as_echo "$BOOT_JDK_VERSION" >&6; }
29178           fi # end check jdk version
29179         fi # end check javac
29180       fi # end check java
29181     fi # end check boot jdk found
29182   fi
29183 
29184     done
29185   fi
29186 
29187 
29188     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29189     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29190       # Do we have a bin/java?
29191       if test ! -x "$BOOT_JDK/bin/java"; then
29192         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29194         BOOT_JDK_FOUND=no
29195       else
29196         # Do we have a bin/javac?
29197         if test ! -x "$BOOT_JDK/bin/javac"; then
29198           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29200           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29201 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29202           BOOT_JDK_FOUND=no
29203         else
29204           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29205           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29206 
29207           # Extra M4 quote needed to protect [] in grep expression.
29208           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29209           if test "x$FOUND_CORRECT_VERSION" = x; then
29210             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29212             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29213 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29214             BOOT_JDK_FOUND=no
29215           else
29216             # We're done! :-)
29217             BOOT_JDK_FOUND=yes
29218 
29219   # Only process if variable expands to non-empty
29220 
29221   if test "x$BOOT_JDK" != x; then
29222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29223 
29224   # Input might be given as Windows format, start by converting to
29225   # unix format.
29226   path="$BOOT_JDK"
29227   new_path=`$CYGPATH -u "$path"`
29228 
29229   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29230   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29231   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29232   # "foo.exe" is OK but "foo" is an error.
29233   #
29234   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29235   # It is also a way to make sure we got the proper file name for the real test later on.
29236   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29237   if test "x$test_shortpath" = x; then
29238     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29239 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29240     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29241   fi
29242 
29243   # Call helper function which possibly converts this using DOS-style short mode.
29244   # If so, the updated path is stored in $new_path.
29245 
29246   input_path="$new_path"
29247   # Check if we need to convert this using DOS-style short mode. If the path
29248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29249   # take no chances and rewrite it.
29250   # Note: m4 eats our [], so we need to use [ and ] instead.
29251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29252   if test "x$has_forbidden_chars" != x; then
29253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29257       # Going to short mode and back again did indeed matter. Since short mode is
29258       # case insensitive, let's make it lowercase to improve readability.
29259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29260       # Now convert it back to Unix-style (cygpath)
29261       input_path=`$CYGPATH -u "$shortmode_path"`
29262       new_path="$input_path"
29263     fi
29264   fi
29265 
29266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29267   if test "x$test_cygdrive_prefix" = x; then
29268     # As a simple fix, exclude /usr/bin since it's not a real path.
29269     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29271       # a path prefixed by /cygdrive for fixpath to work.
29272       new_path="$CYGWIN_ROOT_PATH$input_path"
29273     fi
29274   fi
29275 
29276 
29277   if test "x$path" != "x$new_path"; then
29278     BOOT_JDK="$new_path"
29279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29281   fi
29282 
29283     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29284 
29285   path="$BOOT_JDK"
29286   has_colon=`$ECHO $path | $GREP ^.:`
29287   new_path="$path"
29288   if test "x$has_colon" = x; then
29289     # Not in mixed or Windows style, start by that.
29290     new_path=`cmd //c echo $path`
29291   fi
29292 
29293 
29294   input_path="$new_path"
29295   # Check if we need to convert this using DOS-style short mode. If the path
29296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29297   # take no chances and rewrite it.
29298   # Note: m4 eats our [], so we need to use [ and ] instead.
29299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29300   if test "x$has_forbidden_chars" != x; then
29301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29303   fi
29304 
29305 
29306   windows_path="$new_path"
29307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29308     unix_path=`$CYGPATH -u "$windows_path"`
29309     new_path="$unix_path"
29310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29312     new_path="$unix_path"
29313   fi
29314 
29315   if test "x$path" != "x$new_path"; then
29316     BOOT_JDK="$new_path"
29317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29318 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29319   fi
29320 
29321   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29322   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29323 
29324     else
29325       # We're on a unix platform. Hooray! :)
29326       path="$BOOT_JDK"
29327       has_space=`$ECHO "$path" | $GREP " "`
29328       if test "x$has_space" != x; then
29329         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29330 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29331         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29332       fi
29333 
29334       # Use eval to expand a potential ~
29335       eval path="$path"
29336       if test ! -f "$path" && test ! -d "$path"; then
29337         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29338       fi
29339 
29340       if test -d "$path"; then
29341         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29342       else
29343         dir="`$DIRNAME "$path"`"
29344         base="`$BASENAME "$path"`"
29345         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29346       fi
29347     fi
29348   fi
29349 
29350             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29351 $as_echo_n "checking for Boot JDK... " >&6; }
29352             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29353 $as_echo "$BOOT_JDK" >&6; }
29354             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29355 $as_echo_n "checking Boot JDK version... " >&6; }
29356             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29358 $as_echo "$BOOT_JDK_VERSION" >&6; }
29359           fi # end check jdk version
29360         fi # end check javac
29361       fi # end check java
29362     fi # end check boot jdk found
29363   fi
29364 
29365   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29366 
29367   if test "x$BOOT_JDK_FOUND" = xno; then
29368     # Now execute the test
29369 
29370   BOOT_JDK_PREFIX="/usr/lib/jvm"
29371   BOOT_JDK_SUFFIX=""
29372   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29373   if test "x$ALL_JDKS_FOUND" != x; then
29374     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29375 
29376   if test "x$BOOT_JDK_FOUND" = xno; then
29377     # Now execute the test
29378 
29379         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29380         if test -d "$BOOT_JDK"; then
29381           BOOT_JDK_FOUND=maybe
29382           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29383 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29384         fi
29385 
29386 
29387     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29388     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29389       # Do we have a bin/java?
29390       if test ! -x "$BOOT_JDK/bin/java"; then
29391         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29392 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29393         BOOT_JDK_FOUND=no
29394       else
29395         # Do we have a bin/javac?
29396         if test ! -x "$BOOT_JDK/bin/javac"; then
29397           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29399           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29400 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29401           BOOT_JDK_FOUND=no
29402         else
29403           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29404           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29405 
29406           # Extra M4 quote needed to protect [] in grep expression.
29407           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29408           if test "x$FOUND_CORRECT_VERSION" = x; then
29409             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29410 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29411             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29412 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29413             BOOT_JDK_FOUND=no
29414           else
29415             # We're done! :-)
29416             BOOT_JDK_FOUND=yes
29417 
29418   # Only process if variable expands to non-empty
29419 
29420   if test "x$BOOT_JDK" != x; then
29421     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29422 
29423   # Input might be given as Windows format, start by converting to
29424   # unix format.
29425   path="$BOOT_JDK"
29426   new_path=`$CYGPATH -u "$path"`
29427 
29428   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29429   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29430   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29431   # "foo.exe" is OK but "foo" is an error.
29432   #
29433   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29434   # It is also a way to make sure we got the proper file name for the real test later on.
29435   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29436   if test "x$test_shortpath" = x; then
29437     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29438 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29439     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29440   fi
29441 
29442   # Call helper function which possibly converts this using DOS-style short mode.
29443   # If so, the updated path is stored in $new_path.
29444 
29445   input_path="$new_path"
29446   # Check if we need to convert this using DOS-style short mode. If the path
29447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29448   # take no chances and rewrite it.
29449   # Note: m4 eats our [], so we need to use [ and ] instead.
29450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29451   if test "x$has_forbidden_chars" != x; then
29452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29456       # Going to short mode and back again did indeed matter. Since short mode is
29457       # case insensitive, let's make it lowercase to improve readability.
29458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29459       # Now convert it back to Unix-style (cygpath)
29460       input_path=`$CYGPATH -u "$shortmode_path"`
29461       new_path="$input_path"
29462     fi
29463   fi
29464 
29465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29466   if test "x$test_cygdrive_prefix" = x; then
29467     # As a simple fix, exclude /usr/bin since it's not a real path.
29468     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29470       # a path prefixed by /cygdrive for fixpath to work.
29471       new_path="$CYGWIN_ROOT_PATH$input_path"
29472     fi
29473   fi
29474 
29475 
29476   if test "x$path" != "x$new_path"; then
29477     BOOT_JDK="$new_path"
29478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29479 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29480   fi
29481 
29482     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29483 
29484   path="$BOOT_JDK"
29485   has_colon=`$ECHO $path | $GREP ^.:`
29486   new_path="$path"
29487   if test "x$has_colon" = x; then
29488     # Not in mixed or Windows style, start by that.
29489     new_path=`cmd //c echo $path`
29490   fi
29491 
29492 
29493   input_path="$new_path"
29494   # Check if we need to convert this using DOS-style short mode. If the path
29495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29496   # take no chances and rewrite it.
29497   # Note: m4 eats our [], so we need to use [ and ] instead.
29498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29499   if test "x$has_forbidden_chars" != x; then
29500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29501     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29502   fi
29503 
29504 
29505   windows_path="$new_path"
29506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29507     unix_path=`$CYGPATH -u "$windows_path"`
29508     new_path="$unix_path"
29509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29511     new_path="$unix_path"
29512   fi
29513 
29514   if test "x$path" != "x$new_path"; then
29515     BOOT_JDK="$new_path"
29516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29517 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29518   fi
29519 
29520   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29521   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29522 
29523     else
29524       # We're on a unix platform. Hooray! :)
29525       path="$BOOT_JDK"
29526       has_space=`$ECHO "$path" | $GREP " "`
29527       if test "x$has_space" != x; then
29528         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29529 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29530         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29531       fi
29532 
29533       # Use eval to expand a potential ~
29534       eval path="$path"
29535       if test ! -f "$path" && test ! -d "$path"; then
29536         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29537       fi
29538 
29539       if test -d "$path"; then
29540         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29541       else
29542         dir="`$DIRNAME "$path"`"
29543         base="`$BASENAME "$path"`"
29544         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29545       fi
29546     fi
29547   fi
29548 
29549             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29550 $as_echo_n "checking for Boot JDK... " >&6; }
29551             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29552 $as_echo "$BOOT_JDK" >&6; }
29553             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29554 $as_echo_n "checking Boot JDK version... " >&6; }
29555             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29556             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29557 $as_echo "$BOOT_JDK_VERSION" >&6; }
29558           fi # end check jdk version
29559         fi # end check javac
29560       fi # end check java
29561     fi # end check boot jdk found
29562   fi
29563 
29564     done
29565   fi
29566 
29567 
29568     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29569     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29570       # Do we have a bin/java?
29571       if test ! -x "$BOOT_JDK/bin/java"; then
29572         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29573 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29574         BOOT_JDK_FOUND=no
29575       else
29576         # Do we have a bin/javac?
29577         if test ! -x "$BOOT_JDK/bin/javac"; then
29578           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29580           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29581 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29582           BOOT_JDK_FOUND=no
29583         else
29584           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29585           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29586 
29587           # Extra M4 quote needed to protect [] in grep expression.
29588           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29589           if test "x$FOUND_CORRECT_VERSION" = x; then
29590             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29592             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29593 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29594             BOOT_JDK_FOUND=no
29595           else
29596             # We're done! :-)
29597             BOOT_JDK_FOUND=yes
29598 
29599   # Only process if variable expands to non-empty
29600 
29601   if test "x$BOOT_JDK" != x; then
29602     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29603 
29604   # Input might be given as Windows format, start by converting to
29605   # unix format.
29606   path="$BOOT_JDK"
29607   new_path=`$CYGPATH -u "$path"`
29608 
29609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29612   # "foo.exe" is OK but "foo" is an error.
29613   #
29614   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29615   # It is also a way to make sure we got the proper file name for the real test later on.
29616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29617   if test "x$test_shortpath" = x; then
29618     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29620     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29621   fi
29622 
29623   # Call helper function which possibly converts this using DOS-style short mode.
29624   # If so, the updated path is stored in $new_path.
29625 
29626   input_path="$new_path"
29627   # Check if we need to convert this using DOS-style short mode. If the path
29628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29629   # take no chances and rewrite it.
29630   # Note: m4 eats our [], so we need to use [ and ] instead.
29631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29632   if test "x$has_forbidden_chars" != x; then
29633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29637       # Going to short mode and back again did indeed matter. Since short mode is
29638       # case insensitive, let's make it lowercase to improve readability.
29639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29640       # Now convert it back to Unix-style (cygpath)
29641       input_path=`$CYGPATH -u "$shortmode_path"`
29642       new_path="$input_path"
29643     fi
29644   fi
29645 
29646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29647   if test "x$test_cygdrive_prefix" = x; then
29648     # As a simple fix, exclude /usr/bin since it's not a real path.
29649     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29651       # a path prefixed by /cygdrive for fixpath to work.
29652       new_path="$CYGWIN_ROOT_PATH$input_path"
29653     fi
29654   fi
29655 
29656 
29657   if test "x$path" != "x$new_path"; then
29658     BOOT_JDK="$new_path"
29659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29660 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29661   fi
29662 
29663     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29664 
29665   path="$BOOT_JDK"
29666   has_colon=`$ECHO $path | $GREP ^.:`
29667   new_path="$path"
29668   if test "x$has_colon" = x; then
29669     # Not in mixed or Windows style, start by that.
29670     new_path=`cmd //c echo $path`
29671   fi
29672 
29673 
29674   input_path="$new_path"
29675   # Check if we need to convert this using DOS-style short mode. If the path
29676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29677   # take no chances and rewrite it.
29678   # Note: m4 eats our [], so we need to use [ and ] instead.
29679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29680   if test "x$has_forbidden_chars" != x; then
29681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29682     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29683   fi
29684 
29685 
29686   windows_path="$new_path"
29687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29688     unix_path=`$CYGPATH -u "$windows_path"`
29689     new_path="$unix_path"
29690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29692     new_path="$unix_path"
29693   fi
29694 
29695   if test "x$path" != "x$new_path"; then
29696     BOOT_JDK="$new_path"
29697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29699   fi
29700 
29701   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29702   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29703 
29704     else
29705       # We're on a unix platform. Hooray! :)
29706       path="$BOOT_JDK"
29707       has_space=`$ECHO "$path" | $GREP " "`
29708       if test "x$has_space" != x; then
29709         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29711         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29712       fi
29713 
29714       # Use eval to expand a potential ~
29715       eval path="$path"
29716       if test ! -f "$path" && test ! -d "$path"; then
29717         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29718       fi
29719 
29720       if test -d "$path"; then
29721         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29722       else
29723         dir="`$DIRNAME "$path"`"
29724         base="`$BASENAME "$path"`"
29725         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29726       fi
29727     fi
29728   fi
29729 
29730             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29731 $as_echo_n "checking for Boot JDK... " >&6; }
29732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29733 $as_echo "$BOOT_JDK" >&6; }
29734             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29735 $as_echo_n "checking Boot JDK version... " >&6; }
29736             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29738 $as_echo "$BOOT_JDK_VERSION" >&6; }
29739           fi # end check jdk version
29740         fi # end check javac
29741       fi # end check java
29742     fi # end check boot jdk found
29743   fi
29744 
29745   fi
29746 
29747 
29748     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29749     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29750       # Do we have a bin/java?
29751       if test ! -x "$BOOT_JDK/bin/java"; then
29752         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29754         BOOT_JDK_FOUND=no
29755       else
29756         # Do we have a bin/javac?
29757         if test ! -x "$BOOT_JDK/bin/javac"; then
29758           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29759 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29760           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29761 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29762           BOOT_JDK_FOUND=no
29763         else
29764           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29765           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29766 
29767           # Extra M4 quote needed to protect [] in grep expression.
29768           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29769           if test "x$FOUND_CORRECT_VERSION" = x; then
29770             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29772             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29773 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29774             BOOT_JDK_FOUND=no
29775           else
29776             # We're done! :-)
29777             BOOT_JDK_FOUND=yes
29778 
29779   # Only process if variable expands to non-empty
29780 
29781   if test "x$BOOT_JDK" != x; then
29782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29783 
29784   # Input might be given as Windows format, start by converting to
29785   # unix format.
29786   path="$BOOT_JDK"
29787   new_path=`$CYGPATH -u "$path"`
29788 
29789   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29790   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29791   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29792   # "foo.exe" is OK but "foo" is an error.
29793   #
29794   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29795   # It is also a way to make sure we got the proper file name for the real test later on.
29796   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29797   if test "x$test_shortpath" = x; then
29798     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29799 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29800     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29801   fi
29802 
29803   # Call helper function which possibly converts this using DOS-style short mode.
29804   # If so, the updated path is stored in $new_path.
29805 
29806   input_path="$new_path"
29807   # Check if we need to convert this using DOS-style short mode. If the path
29808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29809   # take no chances and rewrite it.
29810   # Note: m4 eats our [], so we need to use [ and ] instead.
29811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29812   if test "x$has_forbidden_chars" != x; then
29813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29817       # Going to short mode and back again did indeed matter. Since short mode is
29818       # case insensitive, let's make it lowercase to improve readability.
29819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29820       # Now convert it back to Unix-style (cygpath)
29821       input_path=`$CYGPATH -u "$shortmode_path"`
29822       new_path="$input_path"
29823     fi
29824   fi
29825 
29826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29827   if test "x$test_cygdrive_prefix" = x; then
29828     # As a simple fix, exclude /usr/bin since it's not a real path.
29829     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29831       # a path prefixed by /cygdrive for fixpath to work.
29832       new_path="$CYGWIN_ROOT_PATH$input_path"
29833     fi
29834   fi
29835 
29836 
29837   if test "x$path" != "x$new_path"; then
29838     BOOT_JDK="$new_path"
29839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29840 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29841   fi
29842 
29843     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29844 
29845   path="$BOOT_JDK"
29846   has_colon=`$ECHO $path | $GREP ^.:`
29847   new_path="$path"
29848   if test "x$has_colon" = x; then
29849     # Not in mixed or Windows style, start by that.
29850     new_path=`cmd //c echo $path`
29851   fi
29852 
29853 
29854   input_path="$new_path"
29855   # Check if we need to convert this using DOS-style short mode. If the path
29856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29857   # take no chances and rewrite it.
29858   # Note: m4 eats our [], so we need to use [ and ] instead.
29859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29860   if test "x$has_forbidden_chars" != x; then
29861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29863   fi
29864 
29865 
29866   windows_path="$new_path"
29867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29868     unix_path=`$CYGPATH -u "$windows_path"`
29869     new_path="$unix_path"
29870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29872     new_path="$unix_path"
29873   fi
29874 
29875   if test "x$path" != "x$new_path"; then
29876     BOOT_JDK="$new_path"
29877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29878 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29879   fi
29880 
29881   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29882   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29883 
29884     else
29885       # We're on a unix platform. Hooray! :)
29886       path="$BOOT_JDK"
29887       has_space=`$ECHO "$path" | $GREP " "`
29888       if test "x$has_space" != x; then
29889         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29890 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29891         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29892       fi
29893 
29894       # Use eval to expand a potential ~
29895       eval path="$path"
29896       if test ! -f "$path" && test ! -d "$path"; then
29897         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29898       fi
29899 
29900       if test -d "$path"; then
29901         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29902       else
29903         dir="`$DIRNAME "$path"`"
29904         base="`$BASENAME "$path"`"
29905         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29906       fi
29907     fi
29908   fi
29909 
29910             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29911 $as_echo_n "checking for Boot JDK... " >&6; }
29912             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29913 $as_echo "$BOOT_JDK" >&6; }
29914             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29915 $as_echo_n "checking Boot JDK version... " >&6; }
29916             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29917             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29918 $as_echo "$BOOT_JDK_VERSION" >&6; }
29919           fi # end check jdk version
29920         fi # end check javac
29921       fi # end check java
29922     fi # end check boot jdk found
29923   fi
29924 
29925 
29926   # If we haven't found anything yet, we've truly lost. Give up.
29927   if test "x$BOOT_JDK_FOUND" = xno; then
29928 
29929   # Print a helpful message on how to acquire the necessary build dependency.
29930   # openjdk is the help tag: freetype, cups, alsa etc
29931   MISSING_DEPENDENCY=openjdk
29932 
29933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29934     cygwin_help $MISSING_DEPENDENCY
29935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29936     msys_help $MISSING_DEPENDENCY
29937   else
29938     PKGHANDLER_COMMAND=
29939 
29940     case $PKGHANDLER in
29941       apt-get)
29942         apt_help     $MISSING_DEPENDENCY ;;
29943       yum)
29944         yum_help     $MISSING_DEPENDENCY ;;
29945       port)
29946         port_help    $MISSING_DEPENDENCY ;;
29947       pkgutil)
29948         pkgutil_help $MISSING_DEPENDENCY ;;
29949       pkgadd)
29950         pkgadd_help  $MISSING_DEPENDENCY ;;
29951     esac
29952 
29953     if test "x$PKGHANDLER_COMMAND" != x; then
29954       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29955     fi
29956   fi
29957 
29958     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29959 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29960     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29961 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29962     as_fn_error $? "Cannot continue" "$LINENO" 5
29963   fi
29964 
29965 
29966 
29967   # Setup tools from the Boot JDK.
29968 
29969   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29970 
29971   # Publish this variable in the help.
29972 
29973 
29974   if [ -z "${JAVA+x}" ]; then
29975     # The variable is not set by user, try to locate tool using the code snippet
29976 
29977       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29978 $as_echo_n "checking for java in Boot JDK... " >&6; }
29979       JAVA=$BOOT_JDK/bin/java
29980       if test ! -x $JAVA; then
29981         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29982 $as_echo "not found" >&6; }
29983         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29984 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29985         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29986       fi
29987       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29988 $as_echo "ok" >&6; }
29989 
29990 
29991   else
29992     # The variable is set, but is it from the command line or the environment?
29993 
29994     # Try to remove the string !JAVA! from our list.
29995     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29996     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29997       # If it failed, the variable was not from the command line. Ignore it,
29998       # but warn the user (except for BASH, which is always set by the calling BASH).
29999       if test "xJAVA" != xBASH; then
30000         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30001 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30002       fi
30003       # Try to locate tool using the code snippet
30004 
30005       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30006 $as_echo_n "checking for java in Boot JDK... " >&6; }
30007       JAVA=$BOOT_JDK/bin/java
30008       if test ! -x $JAVA; then
30009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30010 $as_echo "not found" >&6; }
30011         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30012 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30013         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30014       fi
30015       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30016 $as_echo "ok" >&6; }
30017 
30018 
30019     else
30020       # If it succeeded, then it was overridden by the user. We will use it
30021       # for the tool.
30022 
30023       # First remove it from the list of overridden variables, so we can test
30024       # for unknown variables in the end.
30025       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30026 
30027       # Check if we try to supply an empty value
30028       if test "x$JAVA" = x; then
30029         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30030 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30032 $as_echo_n "checking for JAVA... " >&6; }
30033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30034 $as_echo "disabled" >&6; }
30035       else
30036         # Check if the provided tool contains a complete path.
30037         tool_specified="$JAVA"
30038         tool_basename="${tool_specified##*/}"
30039         if test "x$tool_basename" = "x$tool_specified"; then
30040           # A command without a complete path is provided, search $PATH.
30041           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30042 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30043           # Extract the first word of "$tool_basename", so it can be a program name with args.
30044 set dummy $tool_basename; ac_word=$2
30045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30046 $as_echo_n "checking for $ac_word... " >&6; }
30047 if ${ac_cv_path_JAVA+:} false; then :
30048   $as_echo_n "(cached) " >&6
30049 else
30050   case $JAVA in
30051   [\\/]* | ?:[\\/]*)
30052   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30053   ;;
30054   *)
30055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30056 for as_dir in $PATH
30057 do
30058   IFS=$as_save_IFS
30059   test -z "$as_dir" && as_dir=.
30060     for ac_exec_ext in '' $ac_executable_extensions; do
30061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30062     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30064     break 2
30065   fi
30066 done
30067   done
30068 IFS=$as_save_IFS
30069 
30070   ;;
30071 esac
30072 fi
30073 JAVA=$ac_cv_path_JAVA
30074 if test -n "$JAVA"; then
30075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30076 $as_echo "$JAVA" >&6; }
30077 else
30078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30079 $as_echo "no" >&6; }
30080 fi
30081 
30082 
30083           if test "x$JAVA" = x; then
30084             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30085           fi
30086         else
30087           # Otherwise we believe it is a complete path. Use it as it is.
30088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30089 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30090           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30091 $as_echo_n "checking for JAVA... " >&6; }
30092           if test ! -x "$tool_specified"; then
30093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30094 $as_echo "not found" >&6; }
30095             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30096           fi
30097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30098 $as_echo "$tool_specified" >&6; }
30099         fi
30100       fi
30101     fi
30102 
30103   fi
30104 
30105 
30106 
30107   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30108 
30109   # Publish this variable in the help.
30110 
30111 
30112   if [ -z "${JAVAC+x}" ]; then
30113     # The variable is not set by user, try to locate tool using the code snippet
30114 
30115       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30116 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30117       JAVAC=$BOOT_JDK/bin/javac
30118       if test ! -x $JAVAC; then
30119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30120 $as_echo "not found" >&6; }
30121         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30122 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30123         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30124       fi
30125       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30126 $as_echo "ok" >&6; }
30127 
30128 
30129   else
30130     # The variable is set, but is it from the command line or the environment?
30131 
30132     # Try to remove the string !JAVAC! from our list.
30133     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30134     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30135       # If it failed, the variable was not from the command line. Ignore it,
30136       # but warn the user (except for BASH, which is always set by the calling BASH).
30137       if test "xJAVAC" != xBASH; then
30138         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30139 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30140       fi
30141       # Try to locate tool using the code snippet
30142 
30143       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30144 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30145       JAVAC=$BOOT_JDK/bin/javac
30146       if test ! -x $JAVAC; then
30147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30148 $as_echo "not found" >&6; }
30149         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30150 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30151         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30152       fi
30153       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30154 $as_echo "ok" >&6; }
30155 
30156 
30157     else
30158       # If it succeeded, then it was overridden by the user. We will use it
30159       # for the tool.
30160 
30161       # First remove it from the list of overridden variables, so we can test
30162       # for unknown variables in the end.
30163       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30164 
30165       # Check if we try to supply an empty value
30166       if test "x$JAVAC" = x; then
30167         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30168 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30170 $as_echo_n "checking for JAVAC... " >&6; }
30171         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30172 $as_echo "disabled" >&6; }
30173       else
30174         # Check if the provided tool contains a complete path.
30175         tool_specified="$JAVAC"
30176         tool_basename="${tool_specified##*/}"
30177         if test "x$tool_basename" = "x$tool_specified"; then
30178           # A command without a complete path is provided, search $PATH.
30179           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30180 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30181           # Extract the first word of "$tool_basename", so it can be a program name with args.
30182 set dummy $tool_basename; ac_word=$2
30183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30184 $as_echo_n "checking for $ac_word... " >&6; }
30185 if ${ac_cv_path_JAVAC+:} false; then :
30186   $as_echo_n "(cached) " >&6
30187 else
30188   case $JAVAC in
30189   [\\/]* | ?:[\\/]*)
30190   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30191   ;;
30192   *)
30193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30194 for as_dir in $PATH
30195 do
30196   IFS=$as_save_IFS
30197   test -z "$as_dir" && as_dir=.
30198     for ac_exec_ext in '' $ac_executable_extensions; do
30199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30200     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30202     break 2
30203   fi
30204 done
30205   done
30206 IFS=$as_save_IFS
30207 
30208   ;;
30209 esac
30210 fi
30211 JAVAC=$ac_cv_path_JAVAC
30212 if test -n "$JAVAC"; then
30213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30214 $as_echo "$JAVAC" >&6; }
30215 else
30216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30217 $as_echo "no" >&6; }
30218 fi
30219 
30220 
30221           if test "x$JAVAC" = x; then
30222             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30223           fi
30224         else
30225           # Otherwise we believe it is a complete path. Use it as it is.
30226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30227 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30228           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30229 $as_echo_n "checking for JAVAC... " >&6; }
30230           if test ! -x "$tool_specified"; then
30231             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30232 $as_echo "not found" >&6; }
30233             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30234           fi
30235           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30236 $as_echo "$tool_specified" >&6; }
30237         fi
30238       fi
30239     fi
30240 
30241   fi
30242 
30243 
30244 
30245   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30246 
30247   # Publish this variable in the help.
30248 
30249 
30250   if [ -z "${JAVAH+x}" ]; then
30251     # The variable is not set by user, try to locate tool using the code snippet
30252 
30253       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30254 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30255       JAVAH=$BOOT_JDK/bin/javah
30256       if test ! -x $JAVAH; then
30257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30258 $as_echo "not found" >&6; }
30259         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30260 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30261         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30262       fi
30263       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30264 $as_echo "ok" >&6; }
30265 
30266 
30267   else
30268     # The variable is set, but is it from the command line or the environment?
30269 
30270     # Try to remove the string !JAVAH! from our list.
30271     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30272     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30273       # If it failed, the variable was not from the command line. Ignore it,
30274       # but warn the user (except for BASH, which is always set by the calling BASH).
30275       if test "xJAVAH" != xBASH; then
30276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30277 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30278       fi
30279       # Try to locate tool using the code snippet
30280 
30281       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30282 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30283       JAVAH=$BOOT_JDK/bin/javah
30284       if test ! -x $JAVAH; then
30285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30286 $as_echo "not found" >&6; }
30287         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30288 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30289         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30290       fi
30291       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30292 $as_echo "ok" >&6; }
30293 
30294 
30295     else
30296       # If it succeeded, then it was overridden by the user. We will use it
30297       # for the tool.
30298 
30299       # First remove it from the list of overridden variables, so we can test
30300       # for unknown variables in the end.
30301       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30302 
30303       # Check if we try to supply an empty value
30304       if test "x$JAVAH" = x; then
30305         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30306 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30307         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30308 $as_echo_n "checking for JAVAH... " >&6; }
30309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30310 $as_echo "disabled" >&6; }
30311       else
30312         # Check if the provided tool contains a complete path.
30313         tool_specified="$JAVAH"
30314         tool_basename="${tool_specified##*/}"
30315         if test "x$tool_basename" = "x$tool_specified"; then
30316           # A command without a complete path is provided, search $PATH.
30317           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30318 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30319           # Extract the first word of "$tool_basename", so it can be a program name with args.
30320 set dummy $tool_basename; ac_word=$2
30321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30322 $as_echo_n "checking for $ac_word... " >&6; }
30323 if ${ac_cv_path_JAVAH+:} false; then :
30324   $as_echo_n "(cached) " >&6
30325 else
30326   case $JAVAH in
30327   [\\/]* | ?:[\\/]*)
30328   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30329   ;;
30330   *)
30331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30332 for as_dir in $PATH
30333 do
30334   IFS=$as_save_IFS
30335   test -z "$as_dir" && as_dir=.
30336     for ac_exec_ext in '' $ac_executable_extensions; do
30337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30338     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30340     break 2
30341   fi
30342 done
30343   done
30344 IFS=$as_save_IFS
30345 
30346   ;;
30347 esac
30348 fi
30349 JAVAH=$ac_cv_path_JAVAH
30350 if test -n "$JAVAH"; then
30351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30352 $as_echo "$JAVAH" >&6; }
30353 else
30354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30355 $as_echo "no" >&6; }
30356 fi
30357 
30358 
30359           if test "x$JAVAH" = x; then
30360             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30361           fi
30362         else
30363           # Otherwise we believe it is a complete path. Use it as it is.
30364           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30365 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30366           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30367 $as_echo_n "checking for JAVAH... " >&6; }
30368           if test ! -x "$tool_specified"; then
30369             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30370 $as_echo "not found" >&6; }
30371             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30372           fi
30373           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30374 $as_echo "$tool_specified" >&6; }
30375         fi
30376       fi
30377     fi
30378 
30379   fi
30380 
30381 
30382 
30383   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30384 
30385   # Publish this variable in the help.
30386 
30387 
30388   if [ -z "${JAR+x}" ]; then
30389     # The variable is not set by user, try to locate tool using the code snippet
30390 
30391       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30392 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30393       JAR=$BOOT_JDK/bin/jar
30394       if test ! -x $JAR; then
30395         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30396 $as_echo "not found" >&6; }
30397         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30398 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30399         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30400       fi
30401       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30402 $as_echo "ok" >&6; }
30403 
30404 
30405   else
30406     # The variable is set, but is it from the command line or the environment?
30407 
30408     # Try to remove the string !JAR! from our list.
30409     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30410     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30411       # If it failed, the variable was not from the command line. Ignore it,
30412       # but warn the user (except for BASH, which is always set by the calling BASH).
30413       if test "xJAR" != xBASH; then
30414         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30415 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30416       fi
30417       # Try to locate tool using the code snippet
30418 
30419       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30420 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30421       JAR=$BOOT_JDK/bin/jar
30422       if test ! -x $JAR; then
30423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30424 $as_echo "not found" >&6; }
30425         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30426 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30427         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30428       fi
30429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30430 $as_echo "ok" >&6; }
30431 
30432 
30433     else
30434       # If it succeeded, then it was overridden by the user. We will use it
30435       # for the tool.
30436 
30437       # First remove it from the list of overridden variables, so we can test
30438       # for unknown variables in the end.
30439       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30440 
30441       # Check if we try to supply an empty value
30442       if test "x$JAR" = x; then
30443         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30444 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30446 $as_echo_n "checking for JAR... " >&6; }
30447         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30448 $as_echo "disabled" >&6; }
30449       else
30450         # Check if the provided tool contains a complete path.
30451         tool_specified="$JAR"
30452         tool_basename="${tool_specified##*/}"
30453         if test "x$tool_basename" = "x$tool_specified"; then
30454           # A command without a complete path is provided, search $PATH.
30455           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30456 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30457           # Extract the first word of "$tool_basename", so it can be a program name with args.
30458 set dummy $tool_basename; ac_word=$2
30459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30460 $as_echo_n "checking for $ac_word... " >&6; }
30461 if ${ac_cv_path_JAR+:} false; then :
30462   $as_echo_n "(cached) " >&6
30463 else
30464   case $JAR in
30465   [\\/]* | ?:[\\/]*)
30466   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30467   ;;
30468   *)
30469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30470 for as_dir in $PATH
30471 do
30472   IFS=$as_save_IFS
30473   test -z "$as_dir" && as_dir=.
30474     for ac_exec_ext in '' $ac_executable_extensions; do
30475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30476     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30478     break 2
30479   fi
30480 done
30481   done
30482 IFS=$as_save_IFS
30483 
30484   ;;
30485 esac
30486 fi
30487 JAR=$ac_cv_path_JAR
30488 if test -n "$JAR"; then
30489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30490 $as_echo "$JAR" >&6; }
30491 else
30492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30493 $as_echo "no" >&6; }
30494 fi
30495 
30496 
30497           if test "x$JAR" = x; then
30498             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30499           fi
30500         else
30501           # Otherwise we believe it is a complete path. Use it as it is.
30502           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30503 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30504           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30505 $as_echo_n "checking for JAR... " >&6; }
30506           if test ! -x "$tool_specified"; then
30507             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30508 $as_echo "not found" >&6; }
30509             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30510           fi
30511           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30512 $as_echo "$tool_specified" >&6; }
30513         fi
30514       fi
30515     fi
30516 
30517   fi
30518 
30519 
30520 
30521   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30522 
30523   # Publish this variable in the help.
30524 
30525 
30526   if [ -z "${JARSIGNER+x}" ]; then
30527     # The variable is not set by user, try to locate tool using the code snippet
30528 
30529       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30530 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30531       JARSIGNER=$BOOT_JDK/bin/jarsigner
30532       if test ! -x $JARSIGNER; then
30533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30534 $as_echo "not found" >&6; }
30535         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30536 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30537         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30538       fi
30539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30540 $as_echo "ok" >&6; }
30541 
30542 
30543   else
30544     # The variable is set, but is it from the command line or the environment?
30545 
30546     # Try to remove the string !JARSIGNER! from our list.
30547     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30548     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30549       # If it failed, the variable was not from the command line. Ignore it,
30550       # but warn the user (except for BASH, which is always set by the calling BASH).
30551       if test "xJARSIGNER" != xBASH; then
30552         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30553 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30554       fi
30555       # Try to locate tool using the code snippet
30556 
30557       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30558 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30559       JARSIGNER=$BOOT_JDK/bin/jarsigner
30560       if test ! -x $JARSIGNER; then
30561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30562 $as_echo "not found" >&6; }
30563         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30564 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30565         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30566       fi
30567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30568 $as_echo "ok" >&6; }
30569 
30570 
30571     else
30572       # If it succeeded, then it was overridden by the user. We will use it
30573       # for the tool.
30574 
30575       # First remove it from the list of overridden variables, so we can test
30576       # for unknown variables in the end.
30577       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30578 
30579       # Check if we try to supply an empty value
30580       if test "x$JARSIGNER" = x; then
30581         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30582 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30583         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30584 $as_echo_n "checking for JARSIGNER... " >&6; }
30585         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30586 $as_echo "disabled" >&6; }
30587       else
30588         # Check if the provided tool contains a complete path.
30589         tool_specified="$JARSIGNER"
30590         tool_basename="${tool_specified##*/}"
30591         if test "x$tool_basename" = "x$tool_specified"; then
30592           # A command without a complete path is provided, search $PATH.
30593           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30594 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30595           # Extract the first word of "$tool_basename", so it can be a program name with args.
30596 set dummy $tool_basename; ac_word=$2
30597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30598 $as_echo_n "checking for $ac_word... " >&6; }
30599 if ${ac_cv_path_JARSIGNER+:} false; then :
30600   $as_echo_n "(cached) " >&6
30601 else
30602   case $JARSIGNER in
30603   [\\/]* | ?:[\\/]*)
30604   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30605   ;;
30606   *)
30607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30608 for as_dir in $PATH
30609 do
30610   IFS=$as_save_IFS
30611   test -z "$as_dir" && as_dir=.
30612     for ac_exec_ext in '' $ac_executable_extensions; do
30613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30614     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30616     break 2
30617   fi
30618 done
30619   done
30620 IFS=$as_save_IFS
30621 
30622   ;;
30623 esac
30624 fi
30625 JARSIGNER=$ac_cv_path_JARSIGNER
30626 if test -n "$JARSIGNER"; then
30627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30628 $as_echo "$JARSIGNER" >&6; }
30629 else
30630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30631 $as_echo "no" >&6; }
30632 fi
30633 
30634 
30635           if test "x$JARSIGNER" = x; then
30636             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30637           fi
30638         else
30639           # Otherwise we believe it is a complete path. Use it as it is.
30640           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30641 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30642           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30643 $as_echo_n "checking for JARSIGNER... " >&6; }
30644           if test ! -x "$tool_specified"; then
30645             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30646 $as_echo "not found" >&6; }
30647             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30648           fi
30649           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30650 $as_echo "$tool_specified" >&6; }
30651         fi
30652       fi
30653     fi
30654 
30655   fi
30656 
30657 
30658 
30659   # Finally, set some other options...
30660 
30661   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30662   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30663 
30664 
30665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30666 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30667   if "$JAVA" --list-modules > /dev/null 2>&1; then
30668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30669 $as_echo "yes" >&6; }
30670     BOOT_JDK_MODULAR="true"
30671   else
30672     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30673 $as_echo "no" >&6; }
30674     BOOT_JDK_MODULAR="false"
30675   fi
30676 
30677 
30678 
30679 
30680   # Check if the boot jdk is 32 or 64 bit
30681   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30682     BOOT_JDK_BITS="64"
30683   else
30684     BOOT_JDK_BITS="32"
30685   fi
30686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30687 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30689 $as_echo "$BOOT_JDK_BITS" >&6; }
30690 
30691 
30692 
30693 
30694 # Check whether --with-build-jdk was given.
30695 if test "${with_build_jdk+set}" = set; then :
30696   withval=$with_build_jdk;
30697 fi
30698 
30699 
30700   CREATE_BUILDJDK=false
30701   EXTERNAL_BUILDJDK=false
30702   BUILD_JDK_FOUND="no"
30703   if test "x$with_build_jdk" != "x"; then
30704 
30705   if test "x$BUILD_JDK_FOUND" = xno; then
30706     # Execute the test
30707 
30708        if test "x$with_build_jdk" != x; then
30709          BUILD_JDK=$with_build_jdk
30710          BUILD_JDK_FOUND=maybe
30711          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30712 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30713        fi
30714 
30715     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30716     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30717       # Do we have a bin/java?
30718       if test ! -x "$BUILD_JDK/bin/java"; then
30719         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30720 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30721         BUILD_JDK_FOUND=no
30722       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30723         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30724 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30725         BUILD_JDK_FOUND=no
30726       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30727         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30728 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30729         BUILD_JDK_FOUND=no
30730       elif test ! -x "$BUILD_JDK/bin/javac"; then
30731         # Do we have a bin/javac?
30732         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30733 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30734         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30735 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30736         BUILD_JDK_FOUND=no
30737       else
30738         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30739         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30740 
30741         # Extra M4 quote needed to protect [] in grep expression.
30742         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30743         if test "x$FOUND_CORRECT_VERSION" = x; then
30744           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30745 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30746           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30747 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30748           BUILD_JDK_FOUND=no
30749         else
30750           # We're done!
30751           BUILD_JDK_FOUND=yes
30752 
30753   # Only process if variable expands to non-empty
30754 
30755   if test "x$BUILD_JDK" != x; then
30756     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30757 
30758   # Input might be given as Windows format, start by converting to
30759   # unix format.
30760   path="$BUILD_JDK"
30761   new_path=`$CYGPATH -u "$path"`
30762 
30763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30766   # "foo.exe" is OK but "foo" is an error.
30767   #
30768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30769   # It is also a way to make sure we got the proper file name for the real test later on.
30770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30771   if test "x$test_shortpath" = x; then
30772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30773 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30774     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30775   fi
30776 
30777   # Call helper function which possibly converts this using DOS-style short mode.
30778   # If so, the updated path is stored in $new_path.
30779 
30780   input_path="$new_path"
30781   # Check if we need to convert this using DOS-style short mode. If the path
30782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30783   # take no chances and rewrite it.
30784   # Note: m4 eats our [], so we need to use [ and ] instead.
30785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30786   if test "x$has_forbidden_chars" != x; then
30787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30791       # Going to short mode and back again did indeed matter. Since short mode is
30792       # case insensitive, let's make it lowercase to improve readability.
30793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30794       # Now convert it back to Unix-style (cygpath)
30795       input_path=`$CYGPATH -u "$shortmode_path"`
30796       new_path="$input_path"
30797     fi
30798   fi
30799 
30800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30801   if test "x$test_cygdrive_prefix" = x; then
30802     # As a simple fix, exclude /usr/bin since it's not a real path.
30803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30805       # a path prefixed by /cygdrive for fixpath to work.
30806       new_path="$CYGWIN_ROOT_PATH$input_path"
30807     fi
30808   fi
30809 
30810 
30811   if test "x$path" != "x$new_path"; then
30812     BUILD_JDK="$new_path"
30813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30814 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30815   fi
30816 
30817     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30818 
30819   path="$BUILD_JDK"
30820   has_colon=`$ECHO $path | $GREP ^.:`
30821   new_path="$path"
30822   if test "x$has_colon" = x; then
30823     # Not in mixed or Windows style, start by that.
30824     new_path=`cmd //c echo $path`
30825   fi
30826 
30827 
30828   input_path="$new_path"
30829   # Check if we need to convert this using DOS-style short mode. If the path
30830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30831   # take no chances and rewrite it.
30832   # Note: m4 eats our [], so we need to use [ and ] instead.
30833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30834   if test "x$has_forbidden_chars" != x; then
30835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30837   fi
30838 
30839 
30840   windows_path="$new_path"
30841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30842     unix_path=`$CYGPATH -u "$windows_path"`
30843     new_path="$unix_path"
30844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30846     new_path="$unix_path"
30847   fi
30848 
30849   if test "x$path" != "x$new_path"; then
30850     BUILD_JDK="$new_path"
30851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30852 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30853   fi
30854 
30855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30857 
30858     else
30859       # We're on a unix platform. Hooray! :)
30860       path="$BUILD_JDK"
30861       has_space=`$ECHO "$path" | $GREP " "`
30862       if test "x$has_space" != x; then
30863         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30864 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30865         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30866       fi
30867 
30868       # Use eval to expand a potential ~
30869       eval path="$path"
30870       if test ! -f "$path" && test ! -d "$path"; then
30871         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30872       fi
30873 
30874       if test -d "$path"; then
30875         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30876       else
30877         dir="`$DIRNAME "$path"`"
30878         base="`$BASENAME "$path"`"
30879         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30880       fi
30881     fi
30882   fi
30883 
30884           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30885 $as_echo_n "checking for Build JDK... " >&6; }
30886           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30887 $as_echo "$BUILD_JDK" >&6; }
30888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30889 $as_echo_n "checking Build JDK version... " >&6; }
30890           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30892 $as_echo "$BUILD_JDK_VERSION" >&6; }
30893         fi # end check jdk version
30894       fi # end check java
30895     fi # end check build jdk found
30896   fi
30897 
30898     EXTERNAL_BUILDJDK=true
30899   else
30900     if test "x$COMPILE_TYPE" = "xcross"; then
30901       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30902       BUILD_JDK_FOUND=yes
30903       CREATE_BUILDJDK=true
30904       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30905 $as_echo_n "checking for Build JDK... " >&6; }
30906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30907 $as_echo "yes, will build it for the host platform" >&6; }
30908     else
30909       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30910       BUILD_JDK_FOUND=yes
30911       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30912 $as_echo_n "checking for Build JDK... " >&6; }
30913       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30914 $as_echo "yes, will use output dir" >&6; }
30915     fi
30916   fi
30917 
30918   JMOD="$BUILD_JDK/bin/jmod"
30919   JLINK="$BUILD_JDK/bin/jlink"
30920 
30921 
30922 
30923   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30925 $as_echo_n "checking for Build JDK... " >&6; }
30926     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30927 $as_echo "no" >&6; }
30928     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30929   fi
30930 
30931 
30932 
30933 
30934 
30935 
30936 ###############################################################################
30937 #
30938 # Configure the sources to use. We can add or override individual directories.
30939 #
30940 ###############################################################################
30941 
30942 
30943   # Where are the sources.
30944   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30945   CORBA_TOPDIR="$SRC_ROOT/corba"
30946   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30947   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30948   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30949   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30950   JDK_TOPDIR="$SRC_ROOT/jdk"
30951 
30952 
30953 
30954 
30955 
30956 
30957 
30958 
30959 
30960   # This feature is no longer supported.
30961 
30962 
30963 
30964 # Check whether --with-add-source-root was given.
30965 if test "${with_add_source_root+set}" = set; then :
30966   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
30967 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30968 fi
30969 
30970 
30971 
30972 
30973 # Check whether --with-override-source-root was given.
30974 if test "${with_override_source_root+set}" = set; then :
30975   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
30976 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30977 fi
30978 
30979 
30980 
30981 
30982 # Check whether --with-adds-and-overrides was given.
30983 if test "${with_adds_and_overrides+set}" = set; then :
30984   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
30985 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30986 fi
30987 
30988 
30989 
30990 
30991 # Check whether --with-override-langtools was given.
30992 if test "${with_override_langtools+set}" = set; then :
30993   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30994 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30995 fi
30996 
30997 
30998 
30999 
31000 # Check whether --with-override-corba was given.
31001 if test "${with_override_corba+set}" = set; then :
31002   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31003 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31004 fi
31005 
31006 
31007 
31008 
31009 # Check whether --with-override-jaxp was given.
31010 if test "${with_override_jaxp+set}" = set; then :
31011   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31012 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31013 fi
31014 
31015 
31016 
31017 
31018 # Check whether --with-override-jaxws was given.
31019 if test "${with_override_jaxws+set}" = set; then :
31020   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31021 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31022 fi
31023 
31024 
31025 
31026 
31027 # Check whether --with-override-hotspot was given.
31028 if test "${with_override_hotspot+set}" = set; then :
31029   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31030 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31031 fi
31032 
31033 
31034 
31035 
31036 # Check whether --with-override-nashorn was given.
31037 if test "${with_override_nashorn+set}" = set; then :
31038   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31039 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31040 fi
31041 
31042 
31043 
31044 
31045 # Check whether --with-override-jdk was given.
31046 if test "${with_override_jdk+set}" = set; then :
31047   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31048 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31049 fi
31050 
31051 
31052 
31053 
31054   BUILD_OUTPUT="$OUTPUT_ROOT"
31055 
31056   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31057 
31058 
31059 
31060 # Check whether --with-import_hotspot was given.
31061 if test "${with_import_hotspot+set}" = set; then :
31062   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31063 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31064 fi
31065 
31066 
31067 
31068 
31069 
31070 
31071 # Check whether --with-import-modules was given.
31072 if test "${with_import_modules+set}" = set; then :
31073   withval=$with_import_modules;
31074 fi
31075 
31076 
31077   if test "x$with_import_modules" != x \
31078       && test "x$with_import_modules" != "xno"; then
31079     if test -d "$with_import_modules"; then
31080       IMPORT_MODULES_TOPDIR="$with_import_modules"
31081 
31082   # Only process if variable expands to non-empty
31083 
31084   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31086 
31087   # Input might be given as Windows format, start by converting to
31088   # unix format.
31089   path="$IMPORT_MODULES_TOPDIR"
31090   new_path=`$CYGPATH -u "$path"`
31091 
31092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31095   # "foo.exe" is OK but "foo" is an error.
31096   #
31097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31098   # It is also a way to make sure we got the proper file name for the real test later on.
31099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31100   if test "x$test_shortpath" = x; then
31101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31102 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31103     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31104   fi
31105 
31106   # Call helper function which possibly converts this using DOS-style short mode.
31107   # If so, the updated path is stored in $new_path.
31108 
31109   input_path="$new_path"
31110   # Check if we need to convert this using DOS-style short mode. If the path
31111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31112   # take no chances and rewrite it.
31113   # Note: m4 eats our [], so we need to use [ and ] instead.
31114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31115   if test "x$has_forbidden_chars" != x; then
31116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31120       # Going to short mode and back again did indeed matter. Since short mode is
31121       # case insensitive, let's make it lowercase to improve readability.
31122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31123       # Now convert it back to Unix-style (cygpath)
31124       input_path=`$CYGPATH -u "$shortmode_path"`
31125       new_path="$input_path"
31126     fi
31127   fi
31128 
31129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31130   if test "x$test_cygdrive_prefix" = x; then
31131     # As a simple fix, exclude /usr/bin since it's not a real path.
31132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31134       # a path prefixed by /cygdrive for fixpath to work.
31135       new_path="$CYGWIN_ROOT_PATH$input_path"
31136     fi
31137   fi
31138 
31139 
31140   if test "x$path" != "x$new_path"; then
31141     IMPORT_MODULES_TOPDIR="$new_path"
31142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31143 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31144   fi
31145 
31146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31147 
31148   path="$IMPORT_MODULES_TOPDIR"
31149   has_colon=`$ECHO $path | $GREP ^.:`
31150   new_path="$path"
31151   if test "x$has_colon" = x; then
31152     # Not in mixed or Windows style, start by that.
31153     new_path=`cmd //c echo $path`
31154   fi
31155 
31156 
31157   input_path="$new_path"
31158   # Check if we need to convert this using DOS-style short mode. If the path
31159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31160   # take no chances and rewrite it.
31161   # Note: m4 eats our [], so we need to use [ and ] instead.
31162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31163   if test "x$has_forbidden_chars" != x; then
31164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31166   fi
31167 
31168 
31169   windows_path="$new_path"
31170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31171     unix_path=`$CYGPATH -u "$windows_path"`
31172     new_path="$unix_path"
31173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31175     new_path="$unix_path"
31176   fi
31177 
31178   if test "x$path" != "x$new_path"; then
31179     IMPORT_MODULES_TOPDIR="$new_path"
31180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31181 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31182   fi
31183 
31184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31186 
31187     else
31188       # We're on a unix platform. Hooray! :)
31189       path="$IMPORT_MODULES_TOPDIR"
31190       has_space=`$ECHO "$path" | $GREP " "`
31191       if test "x$has_space" != x; then
31192         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31193 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31194         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31195       fi
31196 
31197       # Use eval to expand a potential ~
31198       eval path="$path"
31199       if test ! -f "$path" && test ! -d "$path"; then
31200         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31201       fi
31202 
31203       if test -d "$path"; then
31204         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31205       else
31206         dir="`$DIRNAME "$path"`"
31207         base="`$BASENAME "$path"`"
31208         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31209       fi
31210     fi
31211   fi
31212 
31213     elif test -e "$with_import_modules"; then
31214       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31215       $RM -rf "$IMPORT_MODULES_TOPDIR"
31216       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31217       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31218         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31219       fi
31220     else
31221       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31222     fi
31223   fi
31224 
31225   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31226     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31227   fi
31228   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31229     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31230   fi
31231   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31232     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31233   fi
31234   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31235     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31236   fi
31237   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31238     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31239   fi
31240   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31241     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31242   fi
31243   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31244     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31245   fi
31246   # Workaround for using different imported module-info.java in Jake due to a
31247   # change in format. Remove once new format is standard in JDK 9 and javafx
31248   # delivers just that.
31249   if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31250     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31251   fi
31252   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31253     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31254   fi
31255 
31256 
31257 
31258 
31259 
31260 
31261 
31262 
31263 
31264 
31265 
31266 ###############################################################################
31267 #
31268 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31269 # native code.
31270 #
31271 ###############################################################################
31272 
31273 # See if we are doing a complete static build or not
31274 
31275   # Check whether --enable-static-build was given.
31276 if test "${enable_static_build+set}" = set; then :
31277   enableval=$enable_static_build;
31278 fi
31279 
31280   STATIC_BUILD=false
31281   if test "x$enable_static_build" = "xyes"; then
31282     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31283 $as_echo_n "checking if static build is enabled... " >&6; }
31284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31285 $as_echo "yes" >&6; }
31286     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31287       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31288     fi
31289     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31290     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31291     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31292     STATIC_BUILD=true
31293   elif test "x$enable_static_build" = "xno"; then
31294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31295 $as_echo_n "checking if static build is enabled... " >&6; }
31296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31297 $as_echo "no" >&6; }
31298   elif test "x$enable_static_build" != "x"; then
31299     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31300   fi
31301 
31302 
31303 
31304 
31305 # First determine the toolchain type (compiler family)
31306 
31307 
31308 # Check whether --with-toolchain-type was given.
31309 if test "${with_toolchain_type+set}" = set; then :
31310   withval=$with_toolchain_type;
31311 fi
31312 
31313 
31314   # Use indirect variable referencing
31315   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31316   VALID_TOOLCHAINS=${!toolchain_var_name}
31317 
31318   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31319     if test -n "$XCODEBUILD"; then
31320       # On Mac OS X, default toolchain to clang after Xcode 5
31321       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31322       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31323       if test $? -ne 0; then
31324         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31325       fi
31326       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31327           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31328           $CUT -f 1 -d .`
31329       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31330 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31331       if test $XCODE_MAJOR_VERSION -ge 5; then
31332           DEFAULT_TOOLCHAIN="clang"
31333       else
31334           DEFAULT_TOOLCHAIN="gcc"
31335       fi
31336     else
31337       # If Xcode is not installed, but the command line tools are
31338       # then we can't run xcodebuild. On these systems we should
31339       # default to clang
31340       DEFAULT_TOOLCHAIN="clang"
31341     fi
31342   else
31343     # First toolchain type in the list is the default
31344     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31345   fi
31346 
31347   if test "x$with_toolchain_type" = xlist; then
31348     # List all toolchains
31349     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31350 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31351     for toolchain in $VALID_TOOLCHAINS; do
31352       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31353       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31354       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31355     done
31356 
31357     exit 0
31358   elif test "x$with_toolchain_type" != x; then
31359     # User override; check that it is valid
31360     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31361       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31362 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31363       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31364 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31365       as_fn_error $? "Cannot continue." "$LINENO" 5
31366     fi
31367     TOOLCHAIN_TYPE=$with_toolchain_type
31368   else
31369     # No flag given, use default
31370     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31371   fi
31372 
31373 
31374   TOOLCHAIN_CC_BINARY_clang="clang"
31375   TOOLCHAIN_CC_BINARY_gcc="gcc"
31376   TOOLCHAIN_CC_BINARY_microsoft="cl"
31377   TOOLCHAIN_CC_BINARY_solstudio="cc"
31378   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31379 
31380   TOOLCHAIN_CXX_BINARY_clang="clang++"
31381   TOOLCHAIN_CXX_BINARY_gcc="g++"
31382   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31383   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31384   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31385 
31386   # Use indirect variable referencing
31387   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31388   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31389   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31390   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31391   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31392   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31393   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31394   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31395 
31396 
31397   # Define filename patterns
31398   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31399     LIBRARY_PREFIX=
31400     SHARED_LIBRARY_SUFFIX='.dll'
31401     STATIC_LIBRARY_SUFFIX='.lib'
31402     SHARED_LIBRARY='$1.dll'
31403     STATIC_LIBRARY='$1.lib'
31404     OBJ_SUFFIX='.obj'
31405     EXE_SUFFIX='.exe'
31406   else
31407     LIBRARY_PREFIX=lib
31408     SHARED_LIBRARY_SUFFIX='.so'
31409     STATIC_LIBRARY_SUFFIX='.a'
31410     SHARED_LIBRARY='lib$1.so'
31411     STATIC_LIBRARY='lib$1.a'
31412     OBJ_SUFFIX='.o'
31413     EXE_SUFFIX=''
31414     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31415       # For full static builds, we're overloading the SHARED_LIBRARY
31416       # variables in order to limit the amount of changes required.
31417       # It would be better to remove SHARED and just use LIBRARY and
31418       # LIBRARY_SUFFIX for libraries that can be built either
31419       # shared or static and use STATIC_* for libraries that are
31420       # always built statically.
31421       if test "x$STATIC_BUILD" = xtrue; then
31422         SHARED_LIBRARY='lib$1.a'
31423         SHARED_LIBRARY_SUFFIX='.a'
31424       else
31425         SHARED_LIBRARY='lib$1.dylib'
31426         SHARED_LIBRARY_SUFFIX='.dylib'
31427       fi
31428     fi
31429   fi
31430 
31431 
31432 
31433 
31434 
31435 
31436 
31437 
31438 
31439 
31440   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31441     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31442 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31443   else
31444     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31445 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31446   fi
31447 
31448 
31449 # User supplied flags should be used when configure detects compilers
31450 
31451   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31452     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31453 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31454   fi
31455 
31456   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31457     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31458 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31459   fi
31460 
31461   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31462     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31463 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31464   fi
31465 
31466 
31467 # Check whether --with-extra-cflags was given.
31468 if test "${with_extra_cflags+set}" = set; then :
31469   withval=$with_extra_cflags;
31470 fi
31471 
31472 
31473 
31474 # Check whether --with-extra-cxxflags was given.
31475 if test "${with_extra_cxxflags+set}" = set; then :
31476   withval=$with_extra_cxxflags;
31477 fi
31478 
31479 
31480 
31481 # Check whether --with-extra-ldflags was given.
31482 if test "${with_extra_ldflags+set}" = set; then :
31483   withval=$with_extra_ldflags;
31484 fi
31485 
31486 
31487   EXTRA_CFLAGS="$with_extra_cflags"
31488   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31489   EXTRA_LDFLAGS="$with_extra_ldflags"
31490 
31491 
31492 
31493 
31494 
31495   # The global CFLAGS and LDLAGS variables are used by configure tests and
31496   # should include the extra parameters
31497   CFLAGS="$EXTRA_CFLAGS"
31498   CXXFLAGS="$EXTRA_CXXFLAGS"
31499   LDFLAGS="$EXTRA_LDFLAGS"
31500   CPPFLAGS=""
31501 
31502 # The sysroot cflags are needed for configure to be able to run the compilers
31503 
31504   if test "x$SYSROOT" != "x"; then
31505     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31506       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31507         # Solaris Studio does not have a concept of sysroot. Instead we must
31508         # make sure the default include and lib dirs are appended to each
31509         # compile and link command line. Must also add -I-xbuiltin to enable
31510         # inlining of system functions and intrinsics.
31511         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31512         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31513             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31514       fi
31515     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31516       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31517       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31518     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31519       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31520       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31521     fi
31522     # The global CFLAGS and LDFLAGS variables need these for configure to function
31523     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31524     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31525     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31526     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31527   fi
31528 
31529   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31530     # We also need -iframework<path>/System/Library/Frameworks
31531     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31532     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31533     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31534     # set this here so it doesn't have to be peppered throughout the forest
31535     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31536     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31537   fi
31538 
31539 
31540 
31541 
31542 
31543 # Then detect the actual binaries needed
31544 
31545   # FIXME: Is this needed?
31546   ac_ext=cpp
31547 ac_cpp='$CXXCPP $CPPFLAGS'
31548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31551 
31552 
31553   # Store the CFLAGS etc passed to the configure script.
31554   ORG_CFLAGS="$CFLAGS"
31555   ORG_CXXFLAGS="$CXXFLAGS"
31556 
31557   # autoconf magic only relies on PATH, so update it if tools dir is specified
31558   OLD_PATH="$PATH"
31559 
31560   # On Windows, we need to detect the visual studio installation first.
31561   # This will change the PATH, but we need to keep that new PATH even
31562   # after toolchain detection is done, since the compiler (on x86) uses
31563   # it for DLL resolution in runtime.
31564   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31565       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31566 
31567   # Store path to cygwin link.exe to help excluding it when searching for
31568   # VS linker. This must be done before changing the PATH when looking for VS.
31569   # Extract the first word of "link", so it can be a program name with args.
31570 set dummy link; ac_word=$2
31571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31572 $as_echo_n "checking for $ac_word... " >&6; }
31573 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31574   $as_echo_n "(cached) " >&6
31575 else
31576   case $CYGWIN_LINK in
31577   [\\/]* | ?:[\\/]*)
31578   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31579   ;;
31580   *)
31581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31582 for as_dir in $PATH
31583 do
31584   IFS=$as_save_IFS
31585   test -z "$as_dir" && as_dir=.
31586     for ac_exec_ext in '' $ac_executable_extensions; do
31587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31588     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31590     break 2
31591   fi
31592 done
31593   done
31594 IFS=$as_save_IFS
31595 
31596   ;;
31597 esac
31598 fi
31599 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31600 if test -n "$CYGWIN_LINK"; then
31601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31602 $as_echo "$CYGWIN_LINK" >&6; }
31603 else
31604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31605 $as_echo "no" >&6; }
31606 fi
31607 
31608 
31609   if test "x$CYGWIN_LINK" != x; then
31610     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31611 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31612     "$CYGWIN_LINK" --version > /dev/null
31613     if test $? -eq 0 ; then
31614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31615 $as_echo "yes" >&6; }
31616     else
31617       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31618 $as_echo "no" >&6; }
31619       # This might be the VS linker. Don't exclude it later on.
31620       CYGWIN_LINK=""
31621     fi
31622   fi
31623 
31624   # First-hand choice is to locate and run the vsvars bat file.
31625 
31626 
31627 # Check whether --with-toolchain-version was given.
31628 if test "${with_toolchain_version+set}" = set; then :
31629   withval=$with_toolchain_version;
31630 fi
31631 
31632 
31633   if test "x$with_toolchain_version" = xlist; then
31634     # List all toolchains
31635     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31636 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31637     for version in $VALID_VS_VERSIONS; do
31638       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31639       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31640     done
31641 
31642     exit 0
31643   elif test "x$DEVKIT_VS_VERSION" != x; then
31644     VS_VERSION=$DEVKIT_VS_VERSION
31645     TOOLCHAIN_VERSION=$VS_VERSION
31646     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31647     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31648     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31649     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31650     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31651     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31652 
31653     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31654     # can still be exported as INCLUDE for compiler invocations without
31655     # SYSROOT_CFLAGS
31656     OLDIFS="$IFS"
31657     IFS=";"
31658     for i in $DEVKIT_VS_INCLUDE; do
31659       ipath=$i
31660 
31661   unix_path="$ipath"
31662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31663     windows_path=`$CYGPATH -m "$unix_path"`
31664     ipath="$windows_path"
31665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31666     windows_path=`cmd //c echo $unix_path`
31667     ipath="$windows_path"
31668   fi
31669 
31670       VS_INCLUDE="$VS_INCLUDE;$ipath"
31671     done
31672     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31673     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31674     for i in $DEVKIT_VS_LIB; do
31675       libpath=$i
31676 
31677   unix_path="$libpath"
31678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31679     windows_path=`$CYGPATH -m "$unix_path"`
31680     libpath="$windows_path"
31681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31682     windows_path=`cmd //c echo $unix_path`
31683     libpath="$windows_path"
31684   fi
31685 
31686       VS_LIB="$VS_LIB;$libpath"
31687     done
31688     IFS="$OLDIFS"
31689 
31690     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31691 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31692 
31693   elif test "x$with_toolchain_version" != x; then
31694     # User override; check that it is valid
31695     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31696       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31697 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31698       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31699 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31700       as_fn_error $? "Cannot continue." "$LINENO" 5
31701     fi
31702     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31703   else
31704     # No flag given, use default
31705     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31706   fi
31707 
31708   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31709 
31710   VS_VERSION="$VS_VERSION"
31711   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31712   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31713   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31714   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31715 
31716   # When using --with-tools-dir, assume it points to the correct and default
31717   # version of Visual Studio or that --with-toolchain-version was also set.
31718   if test "x$with_tools_dir" != x; then
31719 
31720   if test "x$VS_ENV_CMD" = x; then
31721     VS_VERSION="${VS_VERSION}"
31722     VS_BASE="$with_tools_dir/../.."
31723     METHOD="--with-tools-dir"
31724 
31725     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31726       VCVARSFILE="vc/bin/vcvars32.bat"
31727     else
31728       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31729     fi
31730 
31731 
31732   windows_path="$VS_BASE"
31733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31734     unix_path=`$CYGPATH -u "$windows_path"`
31735     VS_BASE="$unix_path"
31736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31738     VS_BASE="$unix_path"
31739   fi
31740 
31741     if test -d "$VS_BASE"; then
31742       if test -f "$VS_BASE/$VCVARSFILE"; then
31743         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31744 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31745         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31746         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31747         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31748         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31749       else
31750         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31751 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31752         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31753 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31754       fi
31755     fi
31756   fi
31757 
31758 
31759   if test "x$VS_ENV_CMD" = x; then
31760     VS_VERSION="${VS_VERSION}"
31761     VS_BASE="$with_tools_dir/../../.."
31762     METHOD="--with-tools-dir"
31763 
31764     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31765       VCVARSFILE="vc/bin/vcvars32.bat"
31766     else
31767       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31768     fi
31769 
31770 
31771   windows_path="$VS_BASE"
31772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31773     unix_path=`$CYGPATH -u "$windows_path"`
31774     VS_BASE="$unix_path"
31775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31777     VS_BASE="$unix_path"
31778   fi
31779 
31780     if test -d "$VS_BASE"; then
31781       if test -f "$VS_BASE/$VCVARSFILE"; then
31782         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31783 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31784         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31785         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31786         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31787         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31788       else
31789         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31790 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31791         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31792 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31793       fi
31794     fi
31795   fi
31796 
31797     if test "x$VS_ENV_CMD" = x; then
31798       # Having specified an argument which is incorrect will produce an instant failure;
31799       # we should not go on looking
31800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31801 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31802       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31803 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31804       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31805 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31806       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31807     fi
31808   fi
31809 
31810   VS_ENV_CMD=""
31811   VS_ENV_ARGS=""
31812 
31813   if test "x$VS_COMNTOOLS" != x; then
31814 
31815   if test "x$VS_ENV_CMD" = x; then
31816     VS_VERSION="${VS_VERSION}"
31817     VS_BASE="$VS_COMNTOOLS/../.."
31818     METHOD="$VS_COMNTOOLS_VAR variable"
31819 
31820     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31821       VCVARSFILE="vc/bin/vcvars32.bat"
31822     else
31823       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31824     fi
31825 
31826 
31827   windows_path="$VS_BASE"
31828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829     unix_path=`$CYGPATH -u "$windows_path"`
31830     VS_BASE="$unix_path"
31831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31833     VS_BASE="$unix_path"
31834   fi
31835 
31836     if test -d "$VS_BASE"; then
31837       if test -f "$VS_BASE/$VCVARSFILE"; then
31838         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31839 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31840         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31841         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31842         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31843         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31844       else
31845         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31848 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31849       fi
31850     fi
31851   fi
31852 
31853   fi
31854   if test "x$PROGRAMFILES" != x; then
31855 
31856   if test "x$VS_ENV_CMD" = x; then
31857     VS_VERSION="${VS_VERSION}"
31858     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31859     METHOD="well-known name"
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   # Work around the insanely named ProgramFiles(x86) env variable
31896   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31897   if test "x$PROGRAMFILES_X86" != x; then
31898 
31899   if test "x$VS_ENV_CMD" = x; then
31900     VS_VERSION="${VS_VERSION}"
31901     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31902     METHOD="well-known name"
31903 
31904     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31905       VCVARSFILE="vc/bin/vcvars32.bat"
31906     else
31907       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31908     fi
31909 
31910 
31911   windows_path="$VS_BASE"
31912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31913     unix_path=`$CYGPATH -u "$windows_path"`
31914     VS_BASE="$unix_path"
31915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31917     VS_BASE="$unix_path"
31918   fi
31919 
31920     if test -d "$VS_BASE"; then
31921       if test -f "$VS_BASE/$VCVARSFILE"; then
31922         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31923 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31924         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31925         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31926         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31927         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31928       else
31929         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31930 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31931         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31932 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31933       fi
31934     fi
31935   fi
31936 
31937   fi
31938 
31939   if test "x$VS_ENV_CMD" = x; then
31940     VS_VERSION="${VS_VERSION}"
31941     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31942     METHOD="well-known name"
31943 
31944     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31945       VCVARSFILE="vc/bin/vcvars32.bat"
31946     else
31947       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31948     fi
31949 
31950 
31951   windows_path="$VS_BASE"
31952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31953     unix_path=`$CYGPATH -u "$windows_path"`
31954     VS_BASE="$unix_path"
31955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31957     VS_BASE="$unix_path"
31958   fi
31959 
31960     if test -d "$VS_BASE"; then
31961       if test -f "$VS_BASE/$VCVARSFILE"; then
31962         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31963 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31964         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31965         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31966         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31967         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31968       else
31969         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31970 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31971         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31972 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31973       fi
31974     fi
31975   fi
31976 
31977 
31978   if test "x$VS_ENV_CMD" = x; then
31979     VS_VERSION="${VS_VERSION}"
31980     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31981     METHOD="well-known name"
31982 
31983     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31984       VCVARSFILE="vc/bin/vcvars32.bat"
31985     else
31986       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31987     fi
31988 
31989 
31990   windows_path="$VS_BASE"
31991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992     unix_path=`$CYGPATH -u "$windows_path"`
31993     VS_BASE="$unix_path"
31994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996     VS_BASE="$unix_path"
31997   fi
31998 
31999     if test -d "$VS_BASE"; then
32000       if test -f "$VS_BASE/$VCVARSFILE"; then
32001         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32002 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32003         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32004         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32005         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32006         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32007       else
32008         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32009 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32010         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32011 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32012       fi
32013     fi
32014   fi
32015 
32016 
32017   if test "x$SDK_INSTALL_DIR" != x; then
32018     if test "x$ProgramW6432" != x; then
32019 
32020   if test "x$VS_ENV_CMD" = x; then
32021     VS_VERSION="${VS_VERSION}"
32022     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32023     METHOD="well-known name"
32024 
32025   windows_path="$WIN_SDK_BASE"
32026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32027     unix_path=`$CYGPATH -u "$windows_path"`
32028     WIN_SDK_BASE="$unix_path"
32029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32030     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32031     WIN_SDK_BASE="$unix_path"
32032   fi
32033 
32034     if test -d "$WIN_SDK_BASE"; then
32035       # There have been cases of partial or broken SDK installations. A missing
32036       # lib dir is not going to work.
32037       if test ! -d "$WIN_SDK_BASE/lib"; then
32038         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32039 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32040         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32041 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32042       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32043         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32044 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32045         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32046         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32047           VS_ENV_ARGS="/x86"
32048         else
32049           VS_ENV_ARGS="/x64"
32050         fi
32051         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32052         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32053         # TODO: improve detection for other versions of SDK
32054         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32055       else
32056         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32059 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32060       fi
32061     fi
32062   fi
32063 
32064     fi
32065     if test "x$PROGRAMW6432" != x; then
32066 
32067   if test "x$VS_ENV_CMD" = x; then
32068     VS_VERSION="${VS_VERSION}"
32069     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32070     METHOD="well-known name"
32071 
32072   windows_path="$WIN_SDK_BASE"
32073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32074     unix_path=`$CYGPATH -u "$windows_path"`
32075     WIN_SDK_BASE="$unix_path"
32076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32078     WIN_SDK_BASE="$unix_path"
32079   fi
32080 
32081     if test -d "$WIN_SDK_BASE"; then
32082       # There have been cases of partial or broken SDK installations. A missing
32083       # lib dir is not going to work.
32084       if test ! -d "$WIN_SDK_BASE/lib"; then
32085         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32086 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32087         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32088 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32089       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32090         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32091 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32092         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32093         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32094           VS_ENV_ARGS="/x86"
32095         else
32096           VS_ENV_ARGS="/x64"
32097         fi
32098         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32099         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32100         # TODO: improve detection for other versions of SDK
32101         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32102       else
32103         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32106 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32107       fi
32108     fi
32109   fi
32110 
32111     fi
32112     if test "x$PROGRAMFILES" != x; then
32113 
32114   if test "x$VS_ENV_CMD" = x; then
32115     VS_VERSION="${VS_VERSION}"
32116     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32117     METHOD="well-known name"
32118 
32119   windows_path="$WIN_SDK_BASE"
32120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32121     unix_path=`$CYGPATH -u "$windows_path"`
32122     WIN_SDK_BASE="$unix_path"
32123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32125     WIN_SDK_BASE="$unix_path"
32126   fi
32127 
32128     if test -d "$WIN_SDK_BASE"; then
32129       # There have been cases of partial or broken SDK installations. A missing
32130       # lib dir is not going to work.
32131       if test ! -d "$WIN_SDK_BASE/lib"; then
32132         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32133 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32134         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32135 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32136       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32137         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32140         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32141           VS_ENV_ARGS="/x86"
32142         else
32143           VS_ENV_ARGS="/x64"
32144         fi
32145         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32146         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32147         # TODO: improve detection for other versions of SDK
32148         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32149       else
32150         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32151 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32152         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32153 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32154       fi
32155     fi
32156   fi
32157 
32158     fi
32159 
32160   if test "x$VS_ENV_CMD" = x; then
32161     VS_VERSION="${VS_VERSION}"
32162     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32163     METHOD="well-known name"
32164 
32165   windows_path="$WIN_SDK_BASE"
32166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32167     unix_path=`$CYGPATH -u "$windows_path"`
32168     WIN_SDK_BASE="$unix_path"
32169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32171     WIN_SDK_BASE="$unix_path"
32172   fi
32173 
32174     if test -d "$WIN_SDK_BASE"; then
32175       # There have been cases of partial or broken SDK installations. A missing
32176       # lib dir is not going to work.
32177       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32181 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32182       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32183         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32184 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32185         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32186         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32187           VS_ENV_ARGS="/x86"
32188         else
32189           VS_ENV_ARGS="/x64"
32190         fi
32191         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32192         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32193         # TODO: improve detection for other versions of SDK
32194         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32195       else
32196         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32197 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32198         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32199 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32200       fi
32201     fi
32202   fi
32203 
32204 
32205   if test "x$VS_ENV_CMD" = x; then
32206     VS_VERSION="${VS_VERSION}"
32207     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32208     METHOD="well-known name"
32209 
32210   windows_path="$WIN_SDK_BASE"
32211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32212     unix_path=`$CYGPATH -u "$windows_path"`
32213     WIN_SDK_BASE="$unix_path"
32214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32216     WIN_SDK_BASE="$unix_path"
32217   fi
32218 
32219     if test -d "$WIN_SDK_BASE"; then
32220       # There have been cases of partial or broken SDK installations. A missing
32221       # lib dir is not going to work.
32222       if test ! -d "$WIN_SDK_BASE/lib"; then
32223         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32224 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32225         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32226 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32227       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32228         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32229 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32230         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32231         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32232           VS_ENV_ARGS="/x86"
32233         else
32234           VS_ENV_ARGS="/x64"
32235         fi
32236         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32237         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32238         # TODO: improve detection for other versions of SDK
32239         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32240       else
32241         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32242 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32243         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32244 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32245       fi
32246     fi
32247   fi
32248 
32249   fi
32250 
32251     if test "x$VS_ENV_CMD" != x; then
32252       TOOLCHAIN_VERSION=$VS_VERSION
32253       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32254       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32255       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32256       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32257       # The rest of the variables are already evaled while probing
32258       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32259 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32260       break
32261     fi
32262   done
32263 
32264 
32265   # If we have a devkit, skip all of the below.
32266   if test "x$DEVKIT_VS_VERSION" = x; then
32267     if test "x$VS_ENV_CMD" != x; then
32268       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32269 
32270   # Only process if variable expands to non-empty
32271 
32272   if test "x$VS_ENV_CMD" != x; then
32273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32274 
32275   # First separate the path from the arguments. This will split at the first
32276   # space.
32277   complete="$VS_ENV_CMD"
32278   path="${complete%% *}"
32279   tmp="$complete EOL"
32280   arguments="${tmp#* }"
32281 
32282   # Input might be given as Windows format, start by converting to
32283   # unix format.
32284   new_path=`$CYGPATH -u "$path"`
32285 
32286   # Now try to locate executable using which
32287   new_path=`$WHICH "$new_path" 2> /dev/null`
32288   # bat and cmd files are not always considered executable in cygwin causing which
32289   # to not find them
32290   if test "x$new_path" = x \
32291       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32292       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32293     new_path=`$CYGPATH -u "$path"`
32294   fi
32295   if test "x$new_path" = x; then
32296     # Oops. Which didn't find the executable.
32297     # The splitting of arguments from the executable at a space might have been incorrect,
32298     # since paths with space are more likely in Windows. Give it another try with the whole
32299     # argument.
32300     path="$complete"
32301     arguments="EOL"
32302     new_path=`$CYGPATH -u "$path"`
32303     new_path=`$WHICH "$new_path" 2> /dev/null`
32304     # bat and cmd files are not always considered executable in cygwin causing which
32305     # to not find them
32306     if test "x$new_path" = x \
32307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32309       new_path=`$CYGPATH -u "$path"`
32310     fi
32311     if test "x$new_path" = x; then
32312       # It's still not found. Now this is an unrecoverable error.
32313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32314 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32315       has_space=`$ECHO "$complete" | $GREP " "`
32316       if test "x$has_space" != x; then
32317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32319       fi
32320       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32321     fi
32322   fi
32323 
32324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32327   # "foo.exe" is OK but "foo" is an error.
32328   #
32329   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32330   # It is also a way to make sure we got the proper file name for the real test later on.
32331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32332   if test "x$test_shortpath" = x; then
32333     # Short path failed, file does not exist as specified.
32334     # Try adding .exe or .cmd
32335     if test -f "${new_path}.exe"; then
32336       input_to_shortpath="${new_path}.exe"
32337     elif test -f "${new_path}.cmd"; then
32338       input_to_shortpath="${new_path}.cmd"
32339     else
32340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32341 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32344       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32345     fi
32346   else
32347     input_to_shortpath="$new_path"
32348   fi
32349 
32350   # Call helper function which possibly converts this using DOS-style short mode.
32351   # If so, the updated path is stored in $new_path.
32352   new_path="$input_to_shortpath"
32353 
32354   input_path="$input_to_shortpath"
32355   # Check if we need to convert this using DOS-style short mode. If the path
32356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32357   # take no chances and rewrite it.
32358   # Note: m4 eats our [], so we need to use [ and ] instead.
32359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32360   if test "x$has_forbidden_chars" != x; then
32361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32365       # Going to short mode and back again did indeed matter. Since short mode is
32366       # case insensitive, let's make it lowercase to improve readability.
32367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32368       # Now convert it back to Unix-style (cygpath)
32369       input_path=`$CYGPATH -u "$shortmode_path"`
32370       new_path="$input_path"
32371     fi
32372   fi
32373 
32374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32375   if test "x$test_cygdrive_prefix" = x; then
32376     # As a simple fix, exclude /usr/bin since it's not a real path.
32377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32379       # a path prefixed by /cygdrive for fixpath to work.
32380       new_path="$CYGWIN_ROOT_PATH$input_path"
32381     fi
32382   fi
32383 
32384   # remove trailing .exe if any
32385   new_path="${new_path/%.exe/}"
32386 
32387     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32388 
32389   # First separate the path from the arguments. This will split at the first
32390   # space.
32391   complete="$VS_ENV_CMD"
32392   path="${complete%% *}"
32393   tmp="$complete EOL"
32394   arguments="${tmp#* }"
32395 
32396   # Input might be given as Windows format, start by converting to
32397   # unix format.
32398   new_path="$path"
32399 
32400   windows_path="$new_path"
32401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402     unix_path=`$CYGPATH -u "$windows_path"`
32403     new_path="$unix_path"
32404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406     new_path="$unix_path"
32407   fi
32408 
32409 
32410   # Now try to locate executable using which
32411   new_path=`$WHICH "$new_path" 2> /dev/null`
32412 
32413   if test "x$new_path" = x; then
32414     # Oops. Which didn't find the executable.
32415     # The splitting of arguments from the executable at a space might have been incorrect,
32416     # since paths with space are more likely in Windows. Give it another try with the whole
32417     # argument.
32418     path="$complete"
32419     arguments="EOL"
32420     new_path="$path"
32421 
32422   windows_path="$new_path"
32423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32424     unix_path=`$CYGPATH -u "$windows_path"`
32425     new_path="$unix_path"
32426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32428     new_path="$unix_path"
32429   fi
32430 
32431 
32432     new_path=`$WHICH "$new_path" 2> /dev/null`
32433     # bat and cmd files are not always considered executable in MSYS causing which
32434     # to not find them
32435     if test "x$new_path" = x \
32436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32438       new_path="$path"
32439 
32440   windows_path="$new_path"
32441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442     unix_path=`$CYGPATH -u "$windows_path"`
32443     new_path="$unix_path"
32444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446     new_path="$unix_path"
32447   fi
32448 
32449     fi
32450 
32451     if test "x$new_path" = x; then
32452       # It's still not found. Now this is an unrecoverable error.
32453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32454 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32455       has_space=`$ECHO "$complete" | $GREP " "`
32456       if test "x$has_space" != x; then
32457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32459       fi
32460       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32461     fi
32462   fi
32463 
32464   # Now new_path has a complete unix path to the binary
32465   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32466     # Keep paths in /bin as-is, but remove trailing .exe if any
32467     new_path="${new_path/%.exe/}"
32468     # Do not save /bin paths to all_fixpath_prefixes!
32469   else
32470     # Not in mixed or Windows style, start by that.
32471     new_path=`cmd //c echo $new_path`
32472 
32473   input_path="$new_path"
32474   # Check if we need to convert this using DOS-style short mode. If the path
32475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32476   # take no chances and rewrite it.
32477   # Note: m4 eats our [], so we need to use [ and ] instead.
32478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32479   if test "x$has_forbidden_chars" != x; then
32480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32482   fi
32483 
32484     # Output is in $new_path
32485 
32486   windows_path="$new_path"
32487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32488     unix_path=`$CYGPATH -u "$windows_path"`
32489     new_path="$unix_path"
32490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32492     new_path="$unix_path"
32493   fi
32494 
32495     # remove trailing .exe if any
32496     new_path="${new_path/%.exe/}"
32497 
32498     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32499     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32500   fi
32501 
32502     else
32503       # We're on a unix platform. Hooray! :)
32504       # First separate the path from the arguments. This will split at the first
32505       # space.
32506       complete="$VS_ENV_CMD"
32507       path="${complete%% *}"
32508       tmp="$complete EOL"
32509       arguments="${tmp#* }"
32510 
32511       # Cannot rely on the command "which" here since it doesn't always work.
32512       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32513       if test -z "$is_absolute_path"; then
32514         # Path to executable is not absolute. Find it.
32515         IFS_save="$IFS"
32516         IFS=:
32517         for p in $PATH; do
32518           if test -f "$p/$path" && test -x "$p/$path"; then
32519             new_path="$p/$path"
32520             break
32521           fi
32522         done
32523         IFS="$IFS_save"
32524       else
32525         # This is an absolute path, we can use it without further modifications.
32526         new_path="$path"
32527       fi
32528 
32529       if test "x$new_path" = x; then
32530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32531 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32532         has_space=`$ECHO "$complete" | $GREP " "`
32533         if test "x$has_space" != x; then
32534           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32535 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32536         fi
32537         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32538       fi
32539     fi
32540 
32541     # Now join together the path and the arguments once again
32542     if test "x$arguments" != xEOL; then
32543       new_complete="$new_path ${arguments% *}"
32544     else
32545       new_complete="$new_path"
32546     fi
32547 
32548     if test "x$complete" != "x$new_complete"; then
32549       VS_ENV_CMD="$new_complete"
32550       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32551 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32552     fi
32553   fi
32554 
32555 
32556       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32557       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32558 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32559 
32560       # We need to create a couple of temporary files.
32561       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32562       $MKDIR -p $VS_ENV_TMP_DIR
32563 
32564       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32565       # Instead create a shell script which will set the relevant variables when run.
32566       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32567 
32568   unix_path="$WINPATH_VS_ENV_CMD"
32569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32570     windows_path=`$CYGPATH -m "$unix_path"`
32571     WINPATH_VS_ENV_CMD="$windows_path"
32572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32573     windows_path=`cmd //c echo $unix_path`
32574     WINPATH_VS_ENV_CMD="$windows_path"
32575   fi
32576 
32577       WINPATH_BASH="$BASH"
32578 
32579   unix_path="$WINPATH_BASH"
32580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32581     windows_path=`$CYGPATH -m "$unix_path"`
32582     WINPATH_BASH="$windows_path"
32583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32584     windows_path=`cmd //c echo $unix_path`
32585     WINPATH_BASH="$windows_path"
32586   fi
32587 
32588 
32589       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32590       # script (executable by bash) that will setup the important variables.
32591       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32592       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32593       # This will end up something like:
32594       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32595       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32596       # These will end up something like:
32597       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32598       # The trailing space for everyone except PATH is no typo, but is needed due
32599       # to trailing \ in the Windows paths. These will be stripped later.
32600       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32601           >> $EXTRACT_VC_ENV_BAT_FILE
32602       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32603           >> $EXTRACT_VC_ENV_BAT_FILE
32604       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32605           >> $EXTRACT_VC_ENV_BAT_FILE
32606       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32607           >> $EXTRACT_VC_ENV_BAT_FILE
32608       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32609           >> $EXTRACT_VC_ENV_BAT_FILE
32610       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32611           >> $EXTRACT_VC_ENV_BAT_FILE
32612 
32613       # Now execute the newly created bat file.
32614       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32615       # Change directory so we don't need to mess with Windows paths in redirects.
32616       cd $VS_ENV_TMP_DIR
32617       cmd /c extract-vs-env.bat | $CAT
32618       cd $CURDIR
32619 
32620       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32621         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32622 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32623         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32624 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32625         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32626 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32627         as_fn_error $? "Cannot continue" "$LINENO" 5
32628       fi
32629 
32630       # Now set all paths and other env variables. This will allow the rest of
32631       # the configure script to find and run the compiler in the proper way.
32632       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32633 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32634       . $VS_ENV_TMP_DIR/set-vs-env.sh
32635       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32636       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32637     else
32638       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32639       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32640 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32641     fi
32642   fi
32643 
32644   # At this point, we should have correct variables in the environment, or we can't continue.
32645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32646 $as_echo_n "checking for Visual Studio variables... " >&6; }
32647 
32648   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32649       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32650     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32651       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32652 $as_echo "present but broken" >&6; }
32653       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32654     else
32655       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32656 $as_echo "ok" >&6; }
32657       # Remove any trailing "\" ";" and " " from the variables.
32658       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32659       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32660       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32661       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32662       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32663       # Remove any paths containing # (typically F#) as that messes up make. This
32664       # is needed if visual studio was installed with F# support.
32665       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32666 
32667 
32668 
32669 
32670 
32671       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32672       OLDIFS="$IFS"
32673       IFS=";"
32674       for i in $VS_INCLUDE; do
32675         ipath=$i
32676         # Only process non-empty elements
32677         if test "x$ipath" != x; then
32678           IFS="$OLDIFS"
32679           # Check that directory exists before calling fixup_path
32680           testpath=$ipath
32681 
32682   windows_path="$testpath"
32683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32684     unix_path=`$CYGPATH -u "$windows_path"`
32685     testpath="$unix_path"
32686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32688     testpath="$unix_path"
32689   fi
32690 
32691           if test -d "$testpath"; then
32692 
32693   # Only process if variable expands to non-empty
32694 
32695   if test "x$ipath" != x; then
32696     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32697 
32698   # Input might be given as Windows format, start by converting to
32699   # unix format.
32700   path="$ipath"
32701   new_path=`$CYGPATH -u "$path"`
32702 
32703   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32704   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32705   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32706   # "foo.exe" is OK but "foo" is an error.
32707   #
32708   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32709   # It is also a way to make sure we got the proper file name for the real test later on.
32710   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32711   if test "x$test_shortpath" = x; then
32712     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32713 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32714     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32715   fi
32716 
32717   # Call helper function which possibly converts this using DOS-style short mode.
32718   # If so, the updated path is stored in $new_path.
32719 
32720   input_path="$new_path"
32721   # Check if we need to convert this using DOS-style short mode. If the path
32722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32723   # take no chances and rewrite it.
32724   # Note: m4 eats our [], so we need to use [ and ] instead.
32725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32726   if test "x$has_forbidden_chars" != x; then
32727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32728     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32729     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32730     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32731       # Going to short mode and back again did indeed matter. Since short mode is
32732       # case insensitive, let's make it lowercase to improve readability.
32733       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32734       # Now convert it back to Unix-style (cygpath)
32735       input_path=`$CYGPATH -u "$shortmode_path"`
32736       new_path="$input_path"
32737     fi
32738   fi
32739 
32740   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32741   if test "x$test_cygdrive_prefix" = x; then
32742     # As a simple fix, exclude /usr/bin since it's not a real path.
32743     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32744       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32745       # a path prefixed by /cygdrive for fixpath to work.
32746       new_path="$CYGWIN_ROOT_PATH$input_path"
32747     fi
32748   fi
32749 
32750 
32751   if test "x$path" != "x$new_path"; then
32752     ipath="$new_path"
32753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32754 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32755   fi
32756 
32757     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32758 
32759   path="$ipath"
32760   has_colon=`$ECHO $path | $GREP ^.:`
32761   new_path="$path"
32762   if test "x$has_colon" = x; then
32763     # Not in mixed or Windows style, start by that.
32764     new_path=`cmd //c echo $path`
32765   fi
32766 
32767 
32768   input_path="$new_path"
32769   # Check if we need to convert this using DOS-style short mode. If the path
32770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32771   # take no chances and rewrite it.
32772   # Note: m4 eats our [], so we need to use [ and ] instead.
32773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32774   if test "x$has_forbidden_chars" != x; then
32775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32776     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32777   fi
32778 
32779 
32780   windows_path="$new_path"
32781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32782     unix_path=`$CYGPATH -u "$windows_path"`
32783     new_path="$unix_path"
32784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32786     new_path="$unix_path"
32787   fi
32788 
32789   if test "x$path" != "x$new_path"; then
32790     ipath="$new_path"
32791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32792 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32793   fi
32794 
32795   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32796   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32797 
32798     else
32799       # We're on a unix platform. Hooray! :)
32800       path="$ipath"
32801       has_space=`$ECHO "$path" | $GREP " "`
32802       if test "x$has_space" != x; then
32803         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32804 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32805         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32806       fi
32807 
32808       # Use eval to expand a potential ~
32809       eval path="$path"
32810       if test ! -f "$path" && test ! -d "$path"; then
32811         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32812       fi
32813 
32814       if test -d "$path"; then
32815         ipath="`cd "$path"; $THEPWDCMD -L`"
32816       else
32817         dir="`$DIRNAME "$path"`"
32818         base="`$BASENAME "$path"`"
32819         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32820       fi
32821     fi
32822   fi
32823 
32824             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32825           fi
32826           IFS=";"
32827         fi
32828       done
32829       # Convert VS_LIB into SYSROOT_LDFLAGS
32830       for i in $VS_LIB; do
32831         libpath=$i
32832         # Only process non-empty elements
32833         if test "x$libpath" != x; then
32834           IFS="$OLDIFS"
32835           # Check that directory exists before calling fixup_path
32836           testpath=$libpath
32837 
32838   windows_path="$testpath"
32839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32840     unix_path=`$CYGPATH -u "$windows_path"`
32841     testpath="$unix_path"
32842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32844     testpath="$unix_path"
32845   fi
32846 
32847           if test -d "$testpath"; then
32848 
32849   # Only process if variable expands to non-empty
32850 
32851   if test "x$libpath" != x; then
32852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32853 
32854   # Input might be given as Windows format, start by converting to
32855   # unix format.
32856   path="$libpath"
32857   new_path=`$CYGPATH -u "$path"`
32858 
32859   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32860   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32861   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32862   # "foo.exe" is OK but "foo" is an error.
32863   #
32864   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32865   # It is also a way to make sure we got the proper file name for the real test later on.
32866   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32867   if test "x$test_shortpath" = x; then
32868     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32869 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32870     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32871   fi
32872 
32873   # Call helper function which possibly converts this using DOS-style short mode.
32874   # If so, the updated path is stored in $new_path.
32875 
32876   input_path="$new_path"
32877   # Check if we need to convert this using DOS-style short mode. If the path
32878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32879   # take no chances and rewrite it.
32880   # Note: m4 eats our [], so we need to use [ and ] instead.
32881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32882   if test "x$has_forbidden_chars" != x; then
32883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32887       # Going to short mode and back again did indeed matter. Since short mode is
32888       # case insensitive, let's make it lowercase to improve readability.
32889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32890       # Now convert it back to Unix-style (cygpath)
32891       input_path=`$CYGPATH -u "$shortmode_path"`
32892       new_path="$input_path"
32893     fi
32894   fi
32895 
32896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32897   if test "x$test_cygdrive_prefix" = x; then
32898     # As a simple fix, exclude /usr/bin since it's not a real path.
32899     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32901       # a path prefixed by /cygdrive for fixpath to work.
32902       new_path="$CYGWIN_ROOT_PATH$input_path"
32903     fi
32904   fi
32905 
32906 
32907   if test "x$path" != "x$new_path"; then
32908     libpath="$new_path"
32909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32910 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32911   fi
32912 
32913     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32914 
32915   path="$libpath"
32916   has_colon=`$ECHO $path | $GREP ^.:`
32917   new_path="$path"
32918   if test "x$has_colon" = x; then
32919     # Not in mixed or Windows style, start by that.
32920     new_path=`cmd //c echo $path`
32921   fi
32922 
32923 
32924   input_path="$new_path"
32925   # Check if we need to convert this using DOS-style short mode. If the path
32926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32927   # take no chances and rewrite it.
32928   # Note: m4 eats our [], so we need to use [ and ] instead.
32929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32930   if test "x$has_forbidden_chars" != x; then
32931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32932     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32933   fi
32934 
32935 
32936   windows_path="$new_path"
32937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32938     unix_path=`$CYGPATH -u "$windows_path"`
32939     new_path="$unix_path"
32940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32942     new_path="$unix_path"
32943   fi
32944 
32945   if test "x$path" != "x$new_path"; then
32946     libpath="$new_path"
32947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32948 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32949   fi
32950 
32951   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32952   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32953 
32954     else
32955       # We're on a unix platform. Hooray! :)
32956       path="$libpath"
32957       has_space=`$ECHO "$path" | $GREP " "`
32958       if test "x$has_space" != x; then
32959         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32960 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32961         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32962       fi
32963 
32964       # Use eval to expand a potential ~
32965       eval path="$path"
32966       if test ! -f "$path" && test ! -d "$path"; then
32967         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32968       fi
32969 
32970       if test -d "$path"; then
32971         libpath="`cd "$path"; $THEPWDCMD -L`"
32972       else
32973         dir="`$DIRNAME "$path"`"
32974         base="`$BASENAME "$path"`"
32975         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32976       fi
32977     fi
32978   fi
32979 
32980             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32981           fi
32982           IFS=";"
32983         fi
32984       done
32985       IFS="$OLDIFS"
32986     fi
32987   else
32988     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32989 $as_echo "not found" >&6; }
32990 
32991     if test "x$VS_ENV_CMD" = x; then
32992       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32993 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32994       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32995 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32996     else
32997       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32998 $as_echo "$as_me: Running the extraction script failed." >&6;}
32999     fi
33000     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33001 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33002     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33003 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33004     as_fn_error $? "Cannot continue" "$LINENO" 5
33005   fi
33006 
33007     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33008     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33009     PATH="$VS_PATH"
33010     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33011     export INCLUDE="$VS_INCLUDE"
33012     export LIB="$VS_LIB"
33013   else
33014     if test "x$XCODE_VERSION_OUTPUT" != x; then
33015       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33016       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33017       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33018     else
33019       # Currently we do not define this for other toolchains. This might change as the need arise.
33020       TOOLCHAIN_VERSION=
33021     fi
33022   fi
33023 
33024 
33025   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33026   # override all other locations.
33027   if test "x$TOOLCHAIN_PATH" != x; then
33028     PATH=$TOOLCHAIN_PATH:$PATH
33029   fi
33030 
33031 
33032   #
33033   # Setup the compilers (CC and CXX)
33034   #
33035 
33036   COMPILER_NAME=C
33037   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33038 
33039   if test "x$CC" != x; then
33040     # User has supplied compiler name already, always let that override.
33041     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33042 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33043     if test "x`basename $CC`" = "x$CC"; then
33044       # A command without a complete path is provided, search $PATH.
33045 
33046       for ac_prog in $CC
33047 do
33048   # Extract the first word of "$ac_prog", so it can be a program name with args.
33049 set dummy $ac_prog; ac_word=$2
33050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33051 $as_echo_n "checking for $ac_word... " >&6; }
33052 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33053   $as_echo_n "(cached) " >&6
33054 else
33055   case $POTENTIAL_CC in
33056   [\\/]* | ?:[\\/]*)
33057   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33058   ;;
33059   *)
33060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33061 for as_dir in $PATH
33062 do
33063   IFS=$as_save_IFS
33064   test -z "$as_dir" && as_dir=.
33065     for ac_exec_ext in '' $ac_executable_extensions; do
33066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33067     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33069     break 2
33070   fi
33071 done
33072   done
33073 IFS=$as_save_IFS
33074 
33075   ;;
33076 esac
33077 fi
33078 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33079 if test -n "$POTENTIAL_CC"; then
33080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33081 $as_echo "$POTENTIAL_CC" >&6; }
33082 else
33083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33084 $as_echo "no" >&6; }
33085 fi
33086 
33087 
33088   test -n "$POTENTIAL_CC" && break
33089 done
33090 
33091       if test "x$POTENTIAL_CC" != x; then
33092         CC=$POTENTIAL_CC
33093       else
33094         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33095       fi
33096     else
33097       # Otherwise it might already be a complete path
33098       if test ! -x "$CC"; then
33099         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33100       fi
33101     fi
33102   else
33103     # No user supplied value. Locate compiler ourselves.
33104 
33105     # If we are cross compiling, assume cross compilation tools follows the
33106     # cross compilation standard where they are prefixed with the autoconf
33107     # standard name for the target. For example the binary
33108     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33109     # If we are not cross compiling, then the default compiler name will be
33110     # used.
33111 
33112     CC=
33113     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33114     # before checking the rest of the PATH.
33115     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33116     # step, this should not be necessary.
33117     if test -n "$TOOLCHAIN_PATH"; then
33118       PATH_save="$PATH"
33119       PATH="$TOOLCHAIN_PATH"
33120       for ac_prog in $SEARCH_LIST
33121 do
33122   # Extract the first word of "$ac_prog", so it can be a program name with args.
33123 set dummy $ac_prog; ac_word=$2
33124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33125 $as_echo_n "checking for $ac_word... " >&6; }
33126 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33127   $as_echo_n "(cached) " >&6
33128 else
33129   case $TOOLCHAIN_PATH_CC in
33130   [\\/]* | ?:[\\/]*)
33131   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33132   ;;
33133   *)
33134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33135 for as_dir in $PATH
33136 do
33137   IFS=$as_save_IFS
33138   test -z "$as_dir" && as_dir=.
33139     for ac_exec_ext in '' $ac_executable_extensions; do
33140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33141     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33143     break 2
33144   fi
33145 done
33146   done
33147 IFS=$as_save_IFS
33148 
33149   ;;
33150 esac
33151 fi
33152 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33153 if test -n "$TOOLCHAIN_PATH_CC"; then
33154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33155 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33156 else
33157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33158 $as_echo "no" >&6; }
33159 fi
33160 
33161 
33162   test -n "$TOOLCHAIN_PATH_CC" && break
33163 done
33164 
33165       CC=$TOOLCHAIN_PATH_CC
33166       PATH="$PATH_save"
33167     fi
33168 
33169     # AC_PATH_PROGS can't be run multiple times with the same variable,
33170     # so create a new name for this run.
33171     if test "x$CC" = x; then
33172       for ac_prog in $SEARCH_LIST
33173 do
33174   # Extract the first word of "$ac_prog", so it can be a program name with args.
33175 set dummy $ac_prog; ac_word=$2
33176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33177 $as_echo_n "checking for $ac_word... " >&6; }
33178 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33179   $as_echo_n "(cached) " >&6
33180 else
33181   case $POTENTIAL_CC in
33182   [\\/]* | ?:[\\/]*)
33183   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33184   ;;
33185   *)
33186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33187 for as_dir in $PATH
33188 do
33189   IFS=$as_save_IFS
33190   test -z "$as_dir" && as_dir=.
33191     for ac_exec_ext in '' $ac_executable_extensions; do
33192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33193     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33195     break 2
33196   fi
33197 done
33198   done
33199 IFS=$as_save_IFS
33200 
33201   ;;
33202 esac
33203 fi
33204 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33205 if test -n "$POTENTIAL_CC"; then
33206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33207 $as_echo "$POTENTIAL_CC" >&6; }
33208 else
33209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33210 $as_echo "no" >&6; }
33211 fi
33212 
33213 
33214   test -n "$POTENTIAL_CC" && break
33215 done
33216 
33217       CC=$POTENTIAL_CC
33218     fi
33219 
33220     if test "x$CC" = x; then
33221 
33222   # Print a helpful message on how to acquire the necessary build dependency.
33223   # devkit is the help tag: freetype, cups, alsa etc
33224   MISSING_DEPENDENCY=devkit
33225 
33226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33227     cygwin_help $MISSING_DEPENDENCY
33228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33229     msys_help $MISSING_DEPENDENCY
33230   else
33231     PKGHANDLER_COMMAND=
33232 
33233     case $PKGHANDLER in
33234       apt-get)
33235         apt_help     $MISSING_DEPENDENCY ;;
33236       yum)
33237         yum_help     $MISSING_DEPENDENCY ;;
33238       port)
33239         port_help    $MISSING_DEPENDENCY ;;
33240       pkgutil)
33241         pkgutil_help $MISSING_DEPENDENCY ;;
33242       pkgadd)
33243         pkgadd_help  $MISSING_DEPENDENCY ;;
33244     esac
33245 
33246     if test "x$PKGHANDLER_COMMAND" != x; then
33247       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33248     fi
33249   fi
33250 
33251       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33252     fi
33253   fi
33254 
33255   # Now we have a compiler binary in CC. Make sure it's okay.
33256 
33257   # Only process if variable expands to non-empty
33258 
33259   if test "x$CC" != x; then
33260     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261 
33262   # First separate the path from the arguments. This will split at the first
33263   # space.
33264   complete="$CC"
33265   path="${complete%% *}"
33266   tmp="$complete EOL"
33267   arguments="${tmp#* }"
33268 
33269   # Input might be given as Windows format, start by converting to
33270   # unix format.
33271   new_path=`$CYGPATH -u "$path"`
33272 
33273   # Now try to locate executable using which
33274   new_path=`$WHICH "$new_path" 2> /dev/null`
33275   # bat and cmd files are not always considered executable in cygwin causing which
33276   # to not find them
33277   if test "x$new_path" = x \
33278       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33279       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33280     new_path=`$CYGPATH -u "$path"`
33281   fi
33282   if test "x$new_path" = x; then
33283     # Oops. Which didn't find the executable.
33284     # The splitting of arguments from the executable at a space might have been incorrect,
33285     # since paths with space are more likely in Windows. Give it another try with the whole
33286     # argument.
33287     path="$complete"
33288     arguments="EOL"
33289     new_path=`$CYGPATH -u "$path"`
33290     new_path=`$WHICH "$new_path" 2> /dev/null`
33291     # bat and cmd files are not always considered executable in cygwin causing which
33292     # to not find them
33293     if test "x$new_path" = x \
33294         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33295         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33296       new_path=`$CYGPATH -u "$path"`
33297     fi
33298     if test "x$new_path" = x; then
33299       # It's still not found. Now this is an unrecoverable error.
33300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33301 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33302       has_space=`$ECHO "$complete" | $GREP " "`
33303       if test "x$has_space" != x; then
33304         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33305 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33306       fi
33307       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33308     fi
33309   fi
33310 
33311   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33312   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33313   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33314   # "foo.exe" is OK but "foo" is an error.
33315   #
33316   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33317   # It is also a way to make sure we got the proper file name for the real test later on.
33318   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33319   if test "x$test_shortpath" = x; then
33320     # Short path failed, file does not exist as specified.
33321     # Try adding .exe or .cmd
33322     if test -f "${new_path}.exe"; then
33323       input_to_shortpath="${new_path}.exe"
33324     elif test -f "${new_path}.cmd"; then
33325       input_to_shortpath="${new_path}.cmd"
33326     else
33327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33328 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33329       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33330 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33331       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33332     fi
33333   else
33334     input_to_shortpath="$new_path"
33335   fi
33336 
33337   # Call helper function which possibly converts this using DOS-style short mode.
33338   # If so, the updated path is stored in $new_path.
33339   new_path="$input_to_shortpath"
33340 
33341   input_path="$input_to_shortpath"
33342   # Check if we need to convert this using DOS-style short mode. If the path
33343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33344   # take no chances and rewrite it.
33345   # Note: m4 eats our [], so we need to use [ and ] instead.
33346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33347   if test "x$has_forbidden_chars" != x; then
33348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33349     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33350     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33351     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33352       # Going to short mode and back again did indeed matter. Since short mode is
33353       # case insensitive, let's make it lowercase to improve readability.
33354       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33355       # Now convert it back to Unix-style (cygpath)
33356       input_path=`$CYGPATH -u "$shortmode_path"`
33357       new_path="$input_path"
33358     fi
33359   fi
33360 
33361   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33362   if test "x$test_cygdrive_prefix" = x; then
33363     # As a simple fix, exclude /usr/bin since it's not a real path.
33364     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33365       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33366       # a path prefixed by /cygdrive for fixpath to work.
33367       new_path="$CYGWIN_ROOT_PATH$input_path"
33368     fi
33369   fi
33370 
33371   # remove trailing .exe if any
33372   new_path="${new_path/%.exe/}"
33373 
33374     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33375 
33376   # First separate the path from the arguments. This will split at the first
33377   # space.
33378   complete="$CC"
33379   path="${complete%% *}"
33380   tmp="$complete EOL"
33381   arguments="${tmp#* }"
33382 
33383   # Input might be given as Windows format, start by converting to
33384   # unix format.
33385   new_path="$path"
33386 
33387   windows_path="$new_path"
33388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33389     unix_path=`$CYGPATH -u "$windows_path"`
33390     new_path="$unix_path"
33391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33393     new_path="$unix_path"
33394   fi
33395 
33396 
33397   # Now try to locate executable using which
33398   new_path=`$WHICH "$new_path" 2> /dev/null`
33399 
33400   if test "x$new_path" = x; then
33401     # Oops. Which didn't find the executable.
33402     # The splitting of arguments from the executable at a space might have been incorrect,
33403     # since paths with space are more likely in Windows. Give it another try with the whole
33404     # argument.
33405     path="$complete"
33406     arguments="EOL"
33407     new_path="$path"
33408 
33409   windows_path="$new_path"
33410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33411     unix_path=`$CYGPATH -u "$windows_path"`
33412     new_path="$unix_path"
33413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33415     new_path="$unix_path"
33416   fi
33417 
33418 
33419     new_path=`$WHICH "$new_path" 2> /dev/null`
33420     # bat and cmd files are not always considered executable in MSYS causing which
33421     # to not find them
33422     if test "x$new_path" = x \
33423         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33424         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33425       new_path="$path"
33426 
33427   windows_path="$new_path"
33428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33429     unix_path=`$CYGPATH -u "$windows_path"`
33430     new_path="$unix_path"
33431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33433     new_path="$unix_path"
33434   fi
33435 
33436     fi
33437 
33438     if test "x$new_path" = x; then
33439       # It's still not found. Now this is an unrecoverable error.
33440       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33441 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33442       has_space=`$ECHO "$complete" | $GREP " "`
33443       if test "x$has_space" != x; then
33444         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33445 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33446       fi
33447       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33448     fi
33449   fi
33450 
33451   # Now new_path has a complete unix path to the binary
33452   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33453     # Keep paths in /bin as-is, but remove trailing .exe if any
33454     new_path="${new_path/%.exe/}"
33455     # Do not save /bin paths to all_fixpath_prefixes!
33456   else
33457     # Not in mixed or Windows style, start by that.
33458     new_path=`cmd //c echo $new_path`
33459 
33460   input_path="$new_path"
33461   # Check if we need to convert this using DOS-style short mode. If the path
33462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33463   # take no chances and rewrite it.
33464   # Note: m4 eats our [], so we need to use [ and ] instead.
33465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33466   if test "x$has_forbidden_chars" != x; then
33467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33468     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33469   fi
33470 
33471     # Output is in $new_path
33472 
33473   windows_path="$new_path"
33474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33475     unix_path=`$CYGPATH -u "$windows_path"`
33476     new_path="$unix_path"
33477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33479     new_path="$unix_path"
33480   fi
33481 
33482     # remove trailing .exe if any
33483     new_path="${new_path/%.exe/}"
33484 
33485     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33486     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33487   fi
33488 
33489     else
33490       # We're on a unix platform. Hooray! :)
33491       # First separate the path from the arguments. This will split at the first
33492       # space.
33493       complete="$CC"
33494       path="${complete%% *}"
33495       tmp="$complete EOL"
33496       arguments="${tmp#* }"
33497 
33498       # Cannot rely on the command "which" here since it doesn't always work.
33499       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33500       if test -z "$is_absolute_path"; then
33501         # Path to executable is not absolute. Find it.
33502         IFS_save="$IFS"
33503         IFS=:
33504         for p in $PATH; do
33505           if test -f "$p/$path" && test -x "$p/$path"; then
33506             new_path="$p/$path"
33507             break
33508           fi
33509         done
33510         IFS="$IFS_save"
33511       else
33512         # This is an absolute path, we can use it without further modifications.
33513         new_path="$path"
33514       fi
33515 
33516       if test "x$new_path" = x; then
33517         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33518 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33519         has_space=`$ECHO "$complete" | $GREP " "`
33520         if test "x$has_space" != x; then
33521           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33522 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33523         fi
33524         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33525       fi
33526     fi
33527 
33528     # Now join together the path and the arguments once again
33529     if test "x$arguments" != xEOL; then
33530       new_complete="$new_path ${arguments% *}"
33531     else
33532       new_complete="$new_path"
33533     fi
33534 
33535     if test "x$complete" != "x$new_complete"; then
33536       CC="$new_complete"
33537       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33538 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33539     fi
33540   fi
33541 
33542   TEST_COMPILER="$CC"
33543 
33544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33545 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33546   SYMLINK_ORIGINAL="$TEST_COMPILER"
33547 
33548   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33549     # Follow a chain of symbolic links. Use readlink
33550     # where it exists, else fall back to horribly
33551     # complicated shell code.
33552     if test "x$READLINK_TESTED" != yes; then
33553       # On MacOSX there is a readlink tool with a different
33554       # purpose than the GNU readlink tool. Check the found readlink.
33555       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33556       if test "x$ISGNU" = x; then
33557         # A readlink that we do not know how to use.
33558         # Are there other non-GNU readlinks out there?
33559         READLINK_TESTED=yes
33560         READLINK=
33561       fi
33562     fi
33563 
33564     if test "x$READLINK" != x; then
33565       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33566     else
33567       # Save the current directory for restoring afterwards
33568       STARTDIR=$PWD
33569       COUNTER=0
33570       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33571       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33572       cd $sym_link_dir
33573       # Use -P flag to resolve symlinks in directories.
33574       cd `$THEPWDCMD -P`
33575       sym_link_dir=`$THEPWDCMD -P`
33576       # Resolve file symlinks
33577       while test $COUNTER -lt 20; do
33578         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33579         if test "x$ISLINK" == x; then
33580           # This is not a symbolic link! We are done!
33581           break
33582         fi
33583         # Again resolve directory symlinks since the target of the just found
33584         # link could be in a different directory
33585         cd `$DIRNAME $ISLINK`
33586         sym_link_dir=`$THEPWDCMD -P`
33587         sym_link_file=`$BASENAME $ISLINK`
33588         let COUNTER=COUNTER+1
33589       done
33590       cd $STARTDIR
33591       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33592     fi
33593   fi
33594 
33595   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33596     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33597 $as_echo "no symlink" >&6; }
33598   else
33599     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33600 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33601 
33602     # We can't handle ccache by gcc wrappers, since we need to know if we're
33603     # using ccache. Instead ccache usage must be controlled by a configure option.
33604     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33605     if test "x$COMPILER_BASENAME" = "xccache"; then
33606       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33607 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33608       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33609     fi
33610   fi
33611 
33612 
33613   COMPILER=$CC
33614   COMPILER_NAME=$COMPILER_NAME
33615 
33616   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33617     # cc -V output typically looks like
33618     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33619     # or
33620     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33621     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33622     # Check that this is likely to be the Solaris Studio cc.
33623     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33624     if test $? -ne 0; then
33625       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33626       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33627 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33628       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33629 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33630       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33631 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33632       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33633     fi
33634     # Remove usage instructions (if present), and
33635     # collapse compiler output into a single line
33636     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33637         $SED -e 's/ *[Uu]sage:.*//'`
33638     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33639         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33640   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33641     # xlc -qversion output typically looks like
33642     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33643     #     Version: 11.01.0000.0015
33644     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33645     # Check that this is likely to be the IBM XL C compiler.
33646     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33647     if test $? -ne 0; then
33648       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33649       { $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
33650 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33651       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33652 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33653       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33654 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33655       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33656     fi
33657     # Collapse compiler output into a single line
33658     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33659     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33661   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33662     # There is no specific version flag, but all output starts with a version string.
33663     # First line typically looks something like:
33664     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33665     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33666     # Check that this is likely to be Microsoft CL.EXE.
33667     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33668     if test $? -ne 0; then
33669       { $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
33670 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33671       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33672 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33673       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33674     fi
33675     # Collapse compiler output into a single line
33676     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33677     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33678         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33679   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33680     # gcc --version output typically looks like
33681     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33682     #     Copyright (C) 2013 Free Software Foundation, Inc.
33683     #     This is free software; see the source for copying conditions.  There is NO
33684     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33685     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33686     # Check that this is likely to be GCC.
33687     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33688     if test $? -ne 0; then
33689       { $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
33690 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33691       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33692 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33693       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33694     fi
33695     # Remove Copyright and legalese from version string, and
33696     # collapse into a single line
33697     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33698         $SED -e 's/ *Copyright .*//'`
33699     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33700         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33701   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33702     # clang --version output typically looks like
33703     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33704     #    clang version 3.3 (tags/RELEASE_33/final)
33705     # or
33706     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33707     #    Target: x86_64-pc-linux-gnu
33708     #    Thread model: posix
33709     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33710     # Check that this is likely to be clang
33711     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33712     if test $? -ne 0; then
33713       { $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
33714 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33715       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33716 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33717       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33718     fi
33719     # Collapse compiler output into a single line
33720     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33721     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33722         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33723   else
33724       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33725   fi
33726   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33727   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33728   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33729   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33730 
33731   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33732 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33733 
33734 
33735   # Now that we have resolved CC ourself, let autoconf have its go at it
33736   ac_ext=c
33737 ac_cpp='$CPP $CPPFLAGS'
33738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33741 if test -n "$ac_tool_prefix"; then
33742   for ac_prog in $CC
33743   do
33744     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33745 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747 $as_echo_n "checking for $ac_word... " >&6; }
33748 if ${ac_cv_prog_CC+:} false; then :
33749   $as_echo_n "(cached) " >&6
33750 else
33751   if test -n "$CC"; then
33752   ac_cv_prog_CC="$CC" # Let the user override the test.
33753 else
33754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33755 for as_dir in $PATH
33756 do
33757   IFS=$as_save_IFS
33758   test -z "$as_dir" && as_dir=.
33759     for ac_exec_ext in '' $ac_executable_extensions; do
33760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33761     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33763     break 2
33764   fi
33765 done
33766   done
33767 IFS=$as_save_IFS
33768 
33769 fi
33770 fi
33771 CC=$ac_cv_prog_CC
33772 if test -n "$CC"; then
33773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33774 $as_echo "$CC" >&6; }
33775 else
33776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777 $as_echo "no" >&6; }
33778 fi
33779 
33780 
33781     test -n "$CC" && break
33782   done
33783 fi
33784 if test -z "$CC"; then
33785   ac_ct_CC=$CC
33786   for ac_prog in $CC
33787 do
33788   # Extract the first word of "$ac_prog", so it can be a program name with args.
33789 set dummy $ac_prog; ac_word=$2
33790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33791 $as_echo_n "checking for $ac_word... " >&6; }
33792 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33793   $as_echo_n "(cached) " >&6
33794 else
33795   if test -n "$ac_ct_CC"; then
33796   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33797 else
33798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33799 for as_dir in $PATH
33800 do
33801   IFS=$as_save_IFS
33802   test -z "$as_dir" && as_dir=.
33803     for ac_exec_ext in '' $ac_executable_extensions; do
33804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33805     ac_cv_prog_ac_ct_CC="$ac_prog"
33806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33807     break 2
33808   fi
33809 done
33810   done
33811 IFS=$as_save_IFS
33812 
33813 fi
33814 fi
33815 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33816 if test -n "$ac_ct_CC"; then
33817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33818 $as_echo "$ac_ct_CC" >&6; }
33819 else
33820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33821 $as_echo "no" >&6; }
33822 fi
33823 
33824 
33825   test -n "$ac_ct_CC" && break
33826 done
33827 
33828   if test "x$ac_ct_CC" = x; then
33829     CC=""
33830   else
33831     case $cross_compiling:$ac_tool_warned in
33832 yes:)
33833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33834 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33835 ac_tool_warned=yes ;;
33836 esac
33837     CC=$ac_ct_CC
33838   fi
33839 fi
33840 
33841 
33842 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33844 as_fn_error $? "no acceptable C compiler found in \$PATH
33845 See \`config.log' for more details" "$LINENO" 5; }
33846 
33847 # Provide some information about the compiler.
33848 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33849 set X $ac_compile
33850 ac_compiler=$2
33851 for ac_option in --version -v -V -qversion; do
33852   { { ac_try="$ac_compiler $ac_option >&5"
33853 case "(($ac_try" in
33854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33855   *) ac_try_echo=$ac_try;;
33856 esac
33857 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33858 $as_echo "$ac_try_echo"; } >&5
33859   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33860   ac_status=$?
33861   if test -s conftest.err; then
33862     sed '10a\
33863 ... rest of stderr output deleted ...
33864          10q' conftest.err >conftest.er1
33865     cat conftest.er1 >&5
33866   fi
33867   rm -f conftest.er1 conftest.err
33868   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33869   test $ac_status = 0; }
33870 done
33871 
33872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33873 /* end confdefs.h.  */
33874 
33875 int
33876 main ()
33877 {
33878 
33879   ;
33880   return 0;
33881 }
33882 _ACEOF
33883 ac_clean_files_save=$ac_clean_files
33884 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33885 # Try to create an executable without -o first, disregard a.out.
33886 # It will help us diagnose broken compilers, and finding out an intuition
33887 # of exeext.
33888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33889 $as_echo_n "checking whether the C compiler works... " >&6; }
33890 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33891 
33892 # The possible output files:
33893 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33894 
33895 ac_rmfiles=
33896 for ac_file in $ac_files
33897 do
33898   case $ac_file in
33899     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33900     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33901   esac
33902 done
33903 rm -f $ac_rmfiles
33904 
33905 if { { ac_try="$ac_link_default"
33906 case "(($ac_try" in
33907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33908   *) ac_try_echo=$ac_try;;
33909 esac
33910 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33911 $as_echo "$ac_try_echo"; } >&5
33912   (eval "$ac_link_default") 2>&5
33913   ac_status=$?
33914   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33915   test $ac_status = 0; }; then :
33916   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33917 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33918 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33919 # so that the user can short-circuit this test for compilers unknown to
33920 # Autoconf.
33921 for ac_file in $ac_files ''
33922 do
33923   test -f "$ac_file" || continue
33924   case $ac_file in
33925     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33926         ;;
33927     [ab].out )
33928         # We found the default executable, but exeext='' is most
33929         # certainly right.
33930         break;;
33931     *.* )
33932         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33933         then :; else
33934            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33935         fi
33936         # We set ac_cv_exeext here because the later test for it is not
33937         # safe: cross compilers may not add the suffix if given an `-o'
33938         # argument, so we may need to know it at that point already.
33939         # Even if this section looks crufty: it has the advantage of
33940         # actually working.
33941         break;;
33942     * )
33943         break;;
33944   esac
33945 done
33946 test "$ac_cv_exeext" = no && ac_cv_exeext=
33947 
33948 else
33949   ac_file=''
33950 fi
33951 if test -z "$ac_file"; then :
33952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33953 $as_echo "no" >&6; }
33954 $as_echo "$as_me: failed program was:" >&5
33955 sed 's/^/| /' conftest.$ac_ext >&5
33956 
33957 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33958 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33959 as_fn_error 77 "C compiler cannot create executables
33960 See \`config.log' for more details" "$LINENO" 5; }
33961 else
33962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33963 $as_echo "yes" >&6; }
33964 fi
33965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33966 $as_echo_n "checking for C compiler default output file name... " >&6; }
33967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33968 $as_echo "$ac_file" >&6; }
33969 ac_exeext=$ac_cv_exeext
33970 
33971 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33972 ac_clean_files=$ac_clean_files_save
33973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33974 $as_echo_n "checking for suffix of executables... " >&6; }
33975 if { { ac_try="$ac_link"
33976 case "(($ac_try" in
33977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33978   *) ac_try_echo=$ac_try;;
33979 esac
33980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33981 $as_echo "$ac_try_echo"; } >&5
33982   (eval "$ac_link") 2>&5
33983   ac_status=$?
33984   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33985   test $ac_status = 0; }; then :
33986   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33987 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33988 # work properly (i.e., refer to `conftest.exe'), while it won't with
33989 # `rm'.
33990 for ac_file in conftest.exe conftest conftest.*; do
33991   test -f "$ac_file" || continue
33992   case $ac_file in
33993     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33994     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33995           break;;
33996     * ) break;;
33997   esac
33998 done
33999 else
34000   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34001 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34002 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34003 See \`config.log' for more details" "$LINENO" 5; }
34004 fi
34005 rm -f conftest conftest$ac_cv_exeext
34006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34007 $as_echo "$ac_cv_exeext" >&6; }
34008 
34009 rm -f conftest.$ac_ext
34010 EXEEXT=$ac_cv_exeext
34011 ac_exeext=$EXEEXT
34012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34013 /* end confdefs.h.  */
34014 #include <stdio.h>
34015 int
34016 main ()
34017 {
34018 FILE *f = fopen ("conftest.out", "w");
34019  return ferror (f) || fclose (f) != 0;
34020 
34021   ;
34022   return 0;
34023 }
34024 _ACEOF
34025 ac_clean_files="$ac_clean_files conftest.out"
34026 # Check that the compiler produces executables we can run.  If not, either
34027 # the compiler is broken, or we cross compile.
34028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34029 $as_echo_n "checking whether we are cross compiling... " >&6; }
34030 if test "$cross_compiling" != yes; then
34031   { { ac_try="$ac_link"
34032 case "(($ac_try" in
34033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34034   *) ac_try_echo=$ac_try;;
34035 esac
34036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34037 $as_echo "$ac_try_echo"; } >&5
34038   (eval "$ac_link") 2>&5
34039   ac_status=$?
34040   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34041   test $ac_status = 0; }
34042   if { ac_try='./conftest$ac_cv_exeext'
34043   { { case "(($ac_try" in
34044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34045   *) ac_try_echo=$ac_try;;
34046 esac
34047 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34048 $as_echo "$ac_try_echo"; } >&5
34049   (eval "$ac_try") 2>&5
34050   ac_status=$?
34051   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34052   test $ac_status = 0; }; }; then
34053     cross_compiling=no
34054   else
34055     if test "$cross_compiling" = maybe; then
34056         cross_compiling=yes
34057     else
34058         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34060 as_fn_error $? "cannot run C compiled programs.
34061 If you meant to cross compile, use \`--host'.
34062 See \`config.log' for more details" "$LINENO" 5; }
34063     fi
34064   fi
34065 fi
34066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34067 $as_echo "$cross_compiling" >&6; }
34068 
34069 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34070 ac_clean_files=$ac_clean_files_save
34071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34072 $as_echo_n "checking for suffix of object files... " >&6; }
34073 if ${ac_cv_objext+:} false; then :
34074   $as_echo_n "(cached) " >&6
34075 else
34076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34077 /* end confdefs.h.  */
34078 
34079 int
34080 main ()
34081 {
34082 
34083   ;
34084   return 0;
34085 }
34086 _ACEOF
34087 rm -f conftest.o conftest.obj
34088 if { { ac_try="$ac_compile"
34089 case "(($ac_try" in
34090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34091   *) ac_try_echo=$ac_try;;
34092 esac
34093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34094 $as_echo "$ac_try_echo"; } >&5
34095   (eval "$ac_compile") 2>&5
34096   ac_status=$?
34097   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34098   test $ac_status = 0; }; then :
34099   for ac_file in conftest.o conftest.obj conftest.*; do
34100   test -f "$ac_file" || continue;
34101   case $ac_file in
34102     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34103     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34104        break;;
34105   esac
34106 done
34107 else
34108   $as_echo "$as_me: failed program was:" >&5
34109 sed 's/^/| /' conftest.$ac_ext >&5
34110 
34111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34112 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34113 as_fn_error $? "cannot compute suffix of object files: cannot compile
34114 See \`config.log' for more details" "$LINENO" 5; }
34115 fi
34116 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34117 fi
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34119 $as_echo "$ac_cv_objext" >&6; }
34120 OBJEXT=$ac_cv_objext
34121 ac_objext=$OBJEXT
34122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34123 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34124 if ${ac_cv_c_compiler_gnu+:} false; then :
34125   $as_echo_n "(cached) " >&6
34126 else
34127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34128 /* end confdefs.h.  */
34129 
34130 int
34131 main ()
34132 {
34133 #ifndef __GNUC__
34134        choke me
34135 #endif
34136 
34137   ;
34138   return 0;
34139 }
34140 _ACEOF
34141 if ac_fn_c_try_compile "$LINENO"; then :
34142   ac_compiler_gnu=yes
34143 else
34144   ac_compiler_gnu=no
34145 fi
34146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34147 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34148 
34149 fi
34150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34151 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34152 if test $ac_compiler_gnu = yes; then
34153   GCC=yes
34154 else
34155   GCC=
34156 fi
34157 ac_test_CFLAGS=${CFLAGS+set}
34158 ac_save_CFLAGS=$CFLAGS
34159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34160 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34161 if ${ac_cv_prog_cc_g+:} false; then :
34162   $as_echo_n "(cached) " >&6
34163 else
34164   ac_save_c_werror_flag=$ac_c_werror_flag
34165    ac_c_werror_flag=yes
34166    ac_cv_prog_cc_g=no
34167    CFLAGS="-g"
34168    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34169 /* end confdefs.h.  */
34170 
34171 int
34172 main ()
34173 {
34174 
34175   ;
34176   return 0;
34177 }
34178 _ACEOF
34179 if ac_fn_c_try_compile "$LINENO"; then :
34180   ac_cv_prog_cc_g=yes
34181 else
34182   CFLAGS=""
34183       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34184 /* end confdefs.h.  */
34185 
34186 int
34187 main ()
34188 {
34189 
34190   ;
34191   return 0;
34192 }
34193 _ACEOF
34194 if ac_fn_c_try_compile "$LINENO"; then :
34195 
34196 else
34197   ac_c_werror_flag=$ac_save_c_werror_flag
34198          CFLAGS="-g"
34199          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34200 /* end confdefs.h.  */
34201 
34202 int
34203 main ()
34204 {
34205 
34206   ;
34207   return 0;
34208 }
34209 _ACEOF
34210 if ac_fn_c_try_compile "$LINENO"; then :
34211   ac_cv_prog_cc_g=yes
34212 fi
34213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34214 fi
34215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34216 fi
34217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34218    ac_c_werror_flag=$ac_save_c_werror_flag
34219 fi
34220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34221 $as_echo "$ac_cv_prog_cc_g" >&6; }
34222 if test "$ac_test_CFLAGS" = set; then
34223   CFLAGS=$ac_save_CFLAGS
34224 elif test $ac_cv_prog_cc_g = yes; then
34225   if test "$GCC" = yes; then
34226     CFLAGS="-g -O2"
34227   else
34228     CFLAGS="-g"
34229   fi
34230 else
34231   if test "$GCC" = yes; then
34232     CFLAGS="-O2"
34233   else
34234     CFLAGS=
34235   fi
34236 fi
34237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34238 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34239 if ${ac_cv_prog_cc_c89+:} false; then :
34240   $as_echo_n "(cached) " >&6
34241 else
34242   ac_cv_prog_cc_c89=no
34243 ac_save_CC=$CC
34244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34245 /* end confdefs.h.  */
34246 #include <stdarg.h>
34247 #include <stdio.h>
34248 struct stat;
34249 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34250 struct buf { int x; };
34251 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34252 static char *e (p, i)
34253      char **p;
34254      int i;
34255 {
34256   return p[i];
34257 }
34258 static char *f (char * (*g) (char **, int), char **p, ...)
34259 {
34260   char *s;
34261   va_list v;
34262   va_start (v,p);
34263   s = g (p, va_arg (v,int));
34264   va_end (v);
34265   return s;
34266 }
34267 
34268 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34269    function prototypes and stuff, but not '\xHH' hex character constants.
34270    These don't provoke an error unfortunately, instead are silently treated
34271    as 'x'.  The following induces an error, until -std is added to get
34272    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34273    array size at least.  It's necessary to write '\x00'==0 to get something
34274    that's true only with -std.  */
34275 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34276 
34277 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34278    inside strings and character constants.  */
34279 #define FOO(x) 'x'
34280 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34281 
34282 int test (int i, double x);
34283 struct s1 {int (*f) (int a);};
34284 struct s2 {int (*f) (double a);};
34285 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34286 int argc;
34287 char **argv;
34288 int
34289 main ()
34290 {
34291 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34292   ;
34293   return 0;
34294 }
34295 _ACEOF
34296 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34297         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34298 do
34299   CC="$ac_save_CC $ac_arg"
34300   if ac_fn_c_try_compile "$LINENO"; then :
34301   ac_cv_prog_cc_c89=$ac_arg
34302 fi
34303 rm -f core conftest.err conftest.$ac_objext
34304   test "x$ac_cv_prog_cc_c89" != "xno" && break
34305 done
34306 rm -f conftest.$ac_ext
34307 CC=$ac_save_CC
34308 
34309 fi
34310 # AC_CACHE_VAL
34311 case "x$ac_cv_prog_cc_c89" in
34312   x)
34313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34314 $as_echo "none needed" >&6; } ;;
34315   xno)
34316     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34317 $as_echo "unsupported" >&6; } ;;
34318   *)
34319     CC="$CC $ac_cv_prog_cc_c89"
34320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34321 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34322 esac
34323 if test "x$ac_cv_prog_cc_c89" != xno; then :
34324 
34325 fi
34326 
34327 ac_ext=cpp
34328 ac_cpp='$CXXCPP $CPPFLAGS'
34329 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34330 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34331 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34332 
34333 
34334 
34335   COMPILER_NAME=C++
34336   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34337 
34338   if test "x$CXX" != x; then
34339     # User has supplied compiler name already, always let that override.
34340     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34341 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34342     if test "x`basename $CXX`" = "x$CXX"; then
34343       # A command without a complete path is provided, search $PATH.
34344 
34345       for ac_prog in $CXX
34346 do
34347   # Extract the first word of "$ac_prog", so it can be a program name with args.
34348 set dummy $ac_prog; ac_word=$2
34349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34350 $as_echo_n "checking for $ac_word... " >&6; }
34351 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34352   $as_echo_n "(cached) " >&6
34353 else
34354   case $POTENTIAL_CXX in
34355   [\\/]* | ?:[\\/]*)
34356   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34357   ;;
34358   *)
34359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34360 for as_dir in $PATH
34361 do
34362   IFS=$as_save_IFS
34363   test -z "$as_dir" && as_dir=.
34364     for ac_exec_ext in '' $ac_executable_extensions; do
34365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34366     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34368     break 2
34369   fi
34370 done
34371   done
34372 IFS=$as_save_IFS
34373 
34374   ;;
34375 esac
34376 fi
34377 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34378 if test -n "$POTENTIAL_CXX"; then
34379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34380 $as_echo "$POTENTIAL_CXX" >&6; }
34381 else
34382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34383 $as_echo "no" >&6; }
34384 fi
34385 
34386 
34387   test -n "$POTENTIAL_CXX" && break
34388 done
34389 
34390       if test "x$POTENTIAL_CXX" != x; then
34391         CXX=$POTENTIAL_CXX
34392       else
34393         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34394       fi
34395     else
34396       # Otherwise it might already be a complete path
34397       if test ! -x "$CXX"; then
34398         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34399       fi
34400     fi
34401   else
34402     # No user supplied value. Locate compiler ourselves.
34403 
34404     # If we are cross compiling, assume cross compilation tools follows the
34405     # cross compilation standard where they are prefixed with the autoconf
34406     # standard name for the target. For example the binary
34407     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34408     # If we are not cross compiling, then the default compiler name will be
34409     # used.
34410 
34411     CXX=
34412     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34413     # before checking the rest of the PATH.
34414     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34415     # step, this should not be necessary.
34416     if test -n "$TOOLCHAIN_PATH"; then
34417       PATH_save="$PATH"
34418       PATH="$TOOLCHAIN_PATH"
34419       for ac_prog in $SEARCH_LIST
34420 do
34421   # Extract the first word of "$ac_prog", so it can be a program name with args.
34422 set dummy $ac_prog; ac_word=$2
34423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34424 $as_echo_n "checking for $ac_word... " >&6; }
34425 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34426   $as_echo_n "(cached) " >&6
34427 else
34428   case $TOOLCHAIN_PATH_CXX in
34429   [\\/]* | ?:[\\/]*)
34430   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34431   ;;
34432   *)
34433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34434 for as_dir in $PATH
34435 do
34436   IFS=$as_save_IFS
34437   test -z "$as_dir" && as_dir=.
34438     for ac_exec_ext in '' $ac_executable_extensions; do
34439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34440     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34442     break 2
34443   fi
34444 done
34445   done
34446 IFS=$as_save_IFS
34447 
34448   ;;
34449 esac
34450 fi
34451 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34452 if test -n "$TOOLCHAIN_PATH_CXX"; then
34453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34454 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34455 else
34456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34457 $as_echo "no" >&6; }
34458 fi
34459 
34460 
34461   test -n "$TOOLCHAIN_PATH_CXX" && break
34462 done
34463 
34464       CXX=$TOOLCHAIN_PATH_CXX
34465       PATH="$PATH_save"
34466     fi
34467 
34468     # AC_PATH_PROGS can't be run multiple times with the same variable,
34469     # so create a new name for this run.
34470     if test "x$CXX" = x; then
34471       for ac_prog in $SEARCH_LIST
34472 do
34473   # Extract the first word of "$ac_prog", so it can be a program name with args.
34474 set dummy $ac_prog; ac_word=$2
34475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34476 $as_echo_n "checking for $ac_word... " >&6; }
34477 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34478   $as_echo_n "(cached) " >&6
34479 else
34480   case $POTENTIAL_CXX in
34481   [\\/]* | ?:[\\/]*)
34482   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34483   ;;
34484   *)
34485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34486 for as_dir in $PATH
34487 do
34488   IFS=$as_save_IFS
34489   test -z "$as_dir" && as_dir=.
34490     for ac_exec_ext in '' $ac_executable_extensions; do
34491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34492     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34494     break 2
34495   fi
34496 done
34497   done
34498 IFS=$as_save_IFS
34499 
34500   ;;
34501 esac
34502 fi
34503 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34504 if test -n "$POTENTIAL_CXX"; then
34505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34506 $as_echo "$POTENTIAL_CXX" >&6; }
34507 else
34508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34509 $as_echo "no" >&6; }
34510 fi
34511 
34512 
34513   test -n "$POTENTIAL_CXX" && break
34514 done
34515 
34516       CXX=$POTENTIAL_CXX
34517     fi
34518 
34519     if test "x$CXX" = x; then
34520 
34521   # Print a helpful message on how to acquire the necessary build dependency.
34522   # devkit is the help tag: freetype, cups, alsa etc
34523   MISSING_DEPENDENCY=devkit
34524 
34525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34526     cygwin_help $MISSING_DEPENDENCY
34527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34528     msys_help $MISSING_DEPENDENCY
34529   else
34530     PKGHANDLER_COMMAND=
34531 
34532     case $PKGHANDLER in
34533       apt-get)
34534         apt_help     $MISSING_DEPENDENCY ;;
34535       yum)
34536         yum_help     $MISSING_DEPENDENCY ;;
34537       port)
34538         port_help    $MISSING_DEPENDENCY ;;
34539       pkgutil)
34540         pkgutil_help $MISSING_DEPENDENCY ;;
34541       pkgadd)
34542         pkgadd_help  $MISSING_DEPENDENCY ;;
34543     esac
34544 
34545     if test "x$PKGHANDLER_COMMAND" != x; then
34546       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34547     fi
34548   fi
34549 
34550       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34551     fi
34552   fi
34553 
34554   # Now we have a compiler binary in CXX. Make sure it's okay.
34555 
34556   # Only process if variable expands to non-empty
34557 
34558   if test "x$CXX" != x; then
34559     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34560 
34561   # First separate the path from the arguments. This will split at the first
34562   # space.
34563   complete="$CXX"
34564   path="${complete%% *}"
34565   tmp="$complete EOL"
34566   arguments="${tmp#* }"
34567 
34568   # Input might be given as Windows format, start by converting to
34569   # unix format.
34570   new_path=`$CYGPATH -u "$path"`
34571 
34572   # Now try to locate executable using which
34573   new_path=`$WHICH "$new_path" 2> /dev/null`
34574   # bat and cmd files are not always considered executable in cygwin causing which
34575   # to not find them
34576   if test "x$new_path" = x \
34577       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34578       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34579     new_path=`$CYGPATH -u "$path"`
34580   fi
34581   if test "x$new_path" = x; then
34582     # Oops. Which didn't find the executable.
34583     # The splitting of arguments from the executable at a space might have been incorrect,
34584     # since paths with space are more likely in Windows. Give it another try with the whole
34585     # argument.
34586     path="$complete"
34587     arguments="EOL"
34588     new_path=`$CYGPATH -u "$path"`
34589     new_path=`$WHICH "$new_path" 2> /dev/null`
34590     # bat and cmd files are not always considered executable in cygwin causing which
34591     # to not find them
34592     if test "x$new_path" = x \
34593         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34594         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34595       new_path=`$CYGPATH -u "$path"`
34596     fi
34597     if test "x$new_path" = x; then
34598       # It's still not found. Now this is an unrecoverable error.
34599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34600 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34601       has_space=`$ECHO "$complete" | $GREP " "`
34602       if test "x$has_space" != x; then
34603         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34604 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34605       fi
34606       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34607     fi
34608   fi
34609 
34610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34613   # "foo.exe" is OK but "foo" is an error.
34614   #
34615   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34616   # It is also a way to make sure we got the proper file name for the real test later on.
34617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34618   if test "x$test_shortpath" = x; then
34619     # Short path failed, file does not exist as specified.
34620     # Try adding .exe or .cmd
34621     if test -f "${new_path}.exe"; then
34622       input_to_shortpath="${new_path}.exe"
34623     elif test -f "${new_path}.cmd"; then
34624       input_to_shortpath="${new_path}.cmd"
34625     else
34626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34627 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34628       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34629 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34630       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34631     fi
34632   else
34633     input_to_shortpath="$new_path"
34634   fi
34635 
34636   # Call helper function which possibly converts this using DOS-style short mode.
34637   # If so, the updated path is stored in $new_path.
34638   new_path="$input_to_shortpath"
34639 
34640   input_path="$input_to_shortpath"
34641   # Check if we need to convert this using DOS-style short mode. If the path
34642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34643   # take no chances and rewrite it.
34644   # Note: m4 eats our [], so we need to use [ and ] instead.
34645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34646   if test "x$has_forbidden_chars" != x; then
34647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34651       # Going to short mode and back again did indeed matter. Since short mode is
34652       # case insensitive, let's make it lowercase to improve readability.
34653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34654       # Now convert it back to Unix-style (cygpath)
34655       input_path=`$CYGPATH -u "$shortmode_path"`
34656       new_path="$input_path"
34657     fi
34658   fi
34659 
34660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34661   if test "x$test_cygdrive_prefix" = x; then
34662     # As a simple fix, exclude /usr/bin since it's not a real path.
34663     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34665       # a path prefixed by /cygdrive for fixpath to work.
34666       new_path="$CYGWIN_ROOT_PATH$input_path"
34667     fi
34668   fi
34669 
34670   # remove trailing .exe if any
34671   new_path="${new_path/%.exe/}"
34672 
34673     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34674 
34675   # First separate the path from the arguments. This will split at the first
34676   # space.
34677   complete="$CXX"
34678   path="${complete%% *}"
34679   tmp="$complete EOL"
34680   arguments="${tmp#* }"
34681 
34682   # Input might be given as Windows format, start by converting to
34683   # unix format.
34684   new_path="$path"
34685 
34686   windows_path="$new_path"
34687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34688     unix_path=`$CYGPATH -u "$windows_path"`
34689     new_path="$unix_path"
34690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34692     new_path="$unix_path"
34693   fi
34694 
34695 
34696   # Now try to locate executable using which
34697   new_path=`$WHICH "$new_path" 2> /dev/null`
34698 
34699   if test "x$new_path" = x; then
34700     # Oops. Which didn't find the executable.
34701     # The splitting of arguments from the executable at a space might have been incorrect,
34702     # since paths with space are more likely in Windows. Give it another try with the whole
34703     # argument.
34704     path="$complete"
34705     arguments="EOL"
34706     new_path="$path"
34707 
34708   windows_path="$new_path"
34709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34710     unix_path=`$CYGPATH -u "$windows_path"`
34711     new_path="$unix_path"
34712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34714     new_path="$unix_path"
34715   fi
34716 
34717 
34718     new_path=`$WHICH "$new_path" 2> /dev/null`
34719     # bat and cmd files are not always considered executable in MSYS causing which
34720     # to not find them
34721     if test "x$new_path" = x \
34722         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34723         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34724       new_path="$path"
34725 
34726   windows_path="$new_path"
34727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34728     unix_path=`$CYGPATH -u "$windows_path"`
34729     new_path="$unix_path"
34730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34732     new_path="$unix_path"
34733   fi
34734 
34735     fi
34736 
34737     if test "x$new_path" = x; then
34738       # It's still not found. Now this is an unrecoverable error.
34739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34740 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34741       has_space=`$ECHO "$complete" | $GREP " "`
34742       if test "x$has_space" != x; then
34743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34745       fi
34746       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34747     fi
34748   fi
34749 
34750   # Now new_path has a complete unix path to the binary
34751   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34752     # Keep paths in /bin as-is, but remove trailing .exe if any
34753     new_path="${new_path/%.exe/}"
34754     # Do not save /bin paths to all_fixpath_prefixes!
34755   else
34756     # Not in mixed or Windows style, start by that.
34757     new_path=`cmd //c echo $new_path`
34758 
34759   input_path="$new_path"
34760   # Check if we need to convert this using DOS-style short mode. If the path
34761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34762   # take no chances and rewrite it.
34763   # Note: m4 eats our [], so we need to use [ and ] instead.
34764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34765   if test "x$has_forbidden_chars" != x; then
34766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34768   fi
34769 
34770     # Output is in $new_path
34771 
34772   windows_path="$new_path"
34773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34774     unix_path=`$CYGPATH -u "$windows_path"`
34775     new_path="$unix_path"
34776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34778     new_path="$unix_path"
34779   fi
34780 
34781     # remove trailing .exe if any
34782     new_path="${new_path/%.exe/}"
34783 
34784     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34785     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34786   fi
34787 
34788     else
34789       # We're on a unix platform. Hooray! :)
34790       # First separate the path from the arguments. This will split at the first
34791       # space.
34792       complete="$CXX"
34793       path="${complete%% *}"
34794       tmp="$complete EOL"
34795       arguments="${tmp#* }"
34796 
34797       # Cannot rely on the command "which" here since it doesn't always work.
34798       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34799       if test -z "$is_absolute_path"; then
34800         # Path to executable is not absolute. Find it.
34801         IFS_save="$IFS"
34802         IFS=:
34803         for p in $PATH; do
34804           if test -f "$p/$path" && test -x "$p/$path"; then
34805             new_path="$p/$path"
34806             break
34807           fi
34808         done
34809         IFS="$IFS_save"
34810       else
34811         # This is an absolute path, we can use it without further modifications.
34812         new_path="$path"
34813       fi
34814 
34815       if test "x$new_path" = x; then
34816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34817 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34818         has_space=`$ECHO "$complete" | $GREP " "`
34819         if test "x$has_space" != x; then
34820           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34821 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34822         fi
34823         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34824       fi
34825     fi
34826 
34827     # Now join together the path and the arguments once again
34828     if test "x$arguments" != xEOL; then
34829       new_complete="$new_path ${arguments% *}"
34830     else
34831       new_complete="$new_path"
34832     fi
34833 
34834     if test "x$complete" != "x$new_complete"; then
34835       CXX="$new_complete"
34836       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34837 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34838     fi
34839   fi
34840 
34841   TEST_COMPILER="$CXX"
34842 
34843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34844 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34845   SYMLINK_ORIGINAL="$TEST_COMPILER"
34846 
34847   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34848     # Follow a chain of symbolic links. Use readlink
34849     # where it exists, else fall back to horribly
34850     # complicated shell code.
34851     if test "x$READLINK_TESTED" != yes; then
34852       # On MacOSX there is a readlink tool with a different
34853       # purpose than the GNU readlink tool. Check the found readlink.
34854       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34855       if test "x$ISGNU" = x; then
34856         # A readlink that we do not know how to use.
34857         # Are there other non-GNU readlinks out there?
34858         READLINK_TESTED=yes
34859         READLINK=
34860       fi
34861     fi
34862 
34863     if test "x$READLINK" != x; then
34864       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34865     else
34866       # Save the current directory for restoring afterwards
34867       STARTDIR=$PWD
34868       COUNTER=0
34869       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34870       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34871       cd $sym_link_dir
34872       # Use -P flag to resolve symlinks in directories.
34873       cd `$THEPWDCMD -P`
34874       sym_link_dir=`$THEPWDCMD -P`
34875       # Resolve file symlinks
34876       while test $COUNTER -lt 20; do
34877         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34878         if test "x$ISLINK" == x; then
34879           # This is not a symbolic link! We are done!
34880           break
34881         fi
34882         # Again resolve directory symlinks since the target of the just found
34883         # link could be in a different directory
34884         cd `$DIRNAME $ISLINK`
34885         sym_link_dir=`$THEPWDCMD -P`
34886         sym_link_file=`$BASENAME $ISLINK`
34887         let COUNTER=COUNTER+1
34888       done
34889       cd $STARTDIR
34890       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34891     fi
34892   fi
34893 
34894   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34895     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34896 $as_echo "no symlink" >&6; }
34897   else
34898     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34899 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34900 
34901     # We can't handle ccache by gcc wrappers, since we need to know if we're
34902     # using ccache. Instead ccache usage must be controlled by a configure option.
34903     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34904     if test "x$COMPILER_BASENAME" = "xccache"; then
34905       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34906 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34907       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34908     fi
34909   fi
34910 
34911 
34912   COMPILER=$CXX
34913   COMPILER_NAME=$COMPILER_NAME
34914 
34915   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34916     # cc -V output typically looks like
34917     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34918     # or
34919     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34920     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34921     # Check that this is likely to be the Solaris Studio cc.
34922     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34923     if test $? -ne 0; then
34924       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34925       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34926 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34927       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34928 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34929       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34930 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34931       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34932     fi
34933     # Remove usage instructions (if present), and
34934     # collapse compiler output into a single line
34935     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34936         $SED -e 's/ *[Uu]sage:.*//'`
34937     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34938         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34939   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34940     # xlc -qversion output typically looks like
34941     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34942     #     Version: 11.01.0000.0015
34943     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34944     # Check that this is likely to be the IBM XL C compiler.
34945     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34946     if test $? -ne 0; then
34947       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34948       { $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
34949 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34950       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34951 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34952       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34953 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34954       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34955     fi
34956     # Collapse compiler output into a single line
34957     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34958     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34959         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34960   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34961     # There is no specific version flag, but all output starts with a version string.
34962     # First line typically looks something like:
34963     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34964     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34965     # Check that this is likely to be Microsoft CL.EXE.
34966     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34967     if test $? -ne 0; then
34968       { $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
34969 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34970       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34971 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34972       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34973     fi
34974     # Collapse compiler output into a single line
34975     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34976     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34977         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34978   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34979     # gcc --version output typically looks like
34980     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34981     #     Copyright (C) 2013 Free Software Foundation, Inc.
34982     #     This is free software; see the source for copying conditions.  There is NO
34983     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34984     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34985     # Check that this is likely to be GCC.
34986     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34987     if test $? -ne 0; then
34988       { $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
34989 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34990       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34991 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34992       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34993     fi
34994     # Remove Copyright and legalese from version string, and
34995     # collapse into a single line
34996     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34997         $SED -e 's/ *Copyright .*//'`
34998     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34999         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35000   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35001     # clang --version output typically looks like
35002     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35003     #    clang version 3.3 (tags/RELEASE_33/final)
35004     # or
35005     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35006     #    Target: x86_64-pc-linux-gnu
35007     #    Thread model: posix
35008     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35009     # Check that this is likely to be clang
35010     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35011     if test $? -ne 0; then
35012       { $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
35013 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35014       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35015 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35016       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35017     fi
35018     # Collapse compiler output into a single line
35019     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35020     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35021         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35022   else
35023       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35024   fi
35025   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35026   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35027   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35028   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35029 
35030   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35031 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35032 
35033 
35034   # Now that we have resolved CXX ourself, let autoconf have its go at it
35035   ac_ext=cpp
35036 ac_cpp='$CXXCPP $CPPFLAGS'
35037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35040 if test -z "$CXX"; then
35041   if test -n "$CCC"; then
35042     CXX=$CCC
35043   else
35044     if test -n "$ac_tool_prefix"; then
35045   for ac_prog in $CXX
35046   do
35047     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35048 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35050 $as_echo_n "checking for $ac_word... " >&6; }
35051 if ${ac_cv_prog_CXX+:} false; then :
35052   $as_echo_n "(cached) " >&6
35053 else
35054   if test -n "$CXX"; then
35055   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35056 else
35057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35058 for as_dir in $PATH
35059 do
35060   IFS=$as_save_IFS
35061   test -z "$as_dir" && as_dir=.
35062     for ac_exec_ext in '' $ac_executable_extensions; do
35063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35064     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35066     break 2
35067   fi
35068 done
35069   done
35070 IFS=$as_save_IFS
35071 
35072 fi
35073 fi
35074 CXX=$ac_cv_prog_CXX
35075 if test -n "$CXX"; then
35076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35077 $as_echo "$CXX" >&6; }
35078 else
35079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35080 $as_echo "no" >&6; }
35081 fi
35082 
35083 
35084     test -n "$CXX" && break
35085   done
35086 fi
35087 if test -z "$CXX"; then
35088   ac_ct_CXX=$CXX
35089   for ac_prog in $CXX
35090 do
35091   # Extract the first word of "$ac_prog", so it can be a program name with args.
35092 set dummy $ac_prog; ac_word=$2
35093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094 $as_echo_n "checking for $ac_word... " >&6; }
35095 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35096   $as_echo_n "(cached) " >&6
35097 else
35098   if test -n "$ac_ct_CXX"; then
35099   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35100 else
35101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102 for as_dir in $PATH
35103 do
35104   IFS=$as_save_IFS
35105   test -z "$as_dir" && as_dir=.
35106     for ac_exec_ext in '' $ac_executable_extensions; do
35107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108     ac_cv_prog_ac_ct_CXX="$ac_prog"
35109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110     break 2
35111   fi
35112 done
35113   done
35114 IFS=$as_save_IFS
35115 
35116 fi
35117 fi
35118 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35119 if test -n "$ac_ct_CXX"; then
35120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35121 $as_echo "$ac_ct_CXX" >&6; }
35122 else
35123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35124 $as_echo "no" >&6; }
35125 fi
35126 
35127 
35128   test -n "$ac_ct_CXX" && break
35129 done
35130 
35131   if test "x$ac_ct_CXX" = x; then
35132     CXX="g++"
35133   else
35134     case $cross_compiling:$ac_tool_warned in
35135 yes:)
35136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35137 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35138 ac_tool_warned=yes ;;
35139 esac
35140     CXX=$ac_ct_CXX
35141   fi
35142 fi
35143 
35144   fi
35145 fi
35146 # Provide some information about the compiler.
35147 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35148 set X $ac_compile
35149 ac_compiler=$2
35150 for ac_option in --version -v -V -qversion; do
35151   { { ac_try="$ac_compiler $ac_option >&5"
35152 case "(($ac_try" in
35153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35154   *) ac_try_echo=$ac_try;;
35155 esac
35156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35157 $as_echo "$ac_try_echo"; } >&5
35158   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35159   ac_status=$?
35160   if test -s conftest.err; then
35161     sed '10a\
35162 ... rest of stderr output deleted ...
35163          10q' conftest.err >conftest.er1
35164     cat conftest.er1 >&5
35165   fi
35166   rm -f conftest.er1 conftest.err
35167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35168   test $ac_status = 0; }
35169 done
35170 
35171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35172 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35173 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35174   $as_echo_n "(cached) " >&6
35175 else
35176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35177 /* end confdefs.h.  */
35178 
35179 int
35180 main ()
35181 {
35182 #ifndef __GNUC__
35183        choke me
35184 #endif
35185 
35186   ;
35187   return 0;
35188 }
35189 _ACEOF
35190 if ac_fn_cxx_try_compile "$LINENO"; then :
35191   ac_compiler_gnu=yes
35192 else
35193   ac_compiler_gnu=no
35194 fi
35195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35196 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35197 
35198 fi
35199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35200 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35201 if test $ac_compiler_gnu = yes; then
35202   GXX=yes
35203 else
35204   GXX=
35205 fi
35206 ac_test_CXXFLAGS=${CXXFLAGS+set}
35207 ac_save_CXXFLAGS=$CXXFLAGS
35208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35209 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35210 if ${ac_cv_prog_cxx_g+:} false; then :
35211   $as_echo_n "(cached) " >&6
35212 else
35213   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35214    ac_cxx_werror_flag=yes
35215    ac_cv_prog_cxx_g=no
35216    CXXFLAGS="-g"
35217    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218 /* end confdefs.h.  */
35219 
35220 int
35221 main ()
35222 {
35223 
35224   ;
35225   return 0;
35226 }
35227 _ACEOF
35228 if ac_fn_cxx_try_compile "$LINENO"; then :
35229   ac_cv_prog_cxx_g=yes
35230 else
35231   CXXFLAGS=""
35232       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35233 /* end confdefs.h.  */
35234 
35235 int
35236 main ()
35237 {
35238 
35239   ;
35240   return 0;
35241 }
35242 _ACEOF
35243 if ac_fn_cxx_try_compile "$LINENO"; then :
35244 
35245 else
35246   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35247          CXXFLAGS="-g"
35248          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35249 /* end confdefs.h.  */
35250 
35251 int
35252 main ()
35253 {
35254 
35255   ;
35256   return 0;
35257 }
35258 _ACEOF
35259 if ac_fn_cxx_try_compile "$LINENO"; then :
35260   ac_cv_prog_cxx_g=yes
35261 fi
35262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35263 fi
35264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35265 fi
35266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35267    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35268 fi
35269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35270 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35271 if test "$ac_test_CXXFLAGS" = set; then
35272   CXXFLAGS=$ac_save_CXXFLAGS
35273 elif test $ac_cv_prog_cxx_g = yes; then
35274   if test "$GXX" = yes; then
35275     CXXFLAGS="-g -O2"
35276   else
35277     CXXFLAGS="-g"
35278   fi
35279 else
35280   if test "$GXX" = yes; then
35281     CXXFLAGS="-O2"
35282   else
35283     CXXFLAGS=
35284   fi
35285 fi
35286 ac_ext=cpp
35287 ac_cpp='$CXXCPP $CPPFLAGS'
35288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35291 
35292 
35293   # This is the compiler version number on the form X.Y[.Z]
35294 
35295 
35296 
35297 
35298   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35299     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35300 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35301     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35302 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35303   fi
35304 
35305   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35306   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35307     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35308 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35309   fi
35310 
35311   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35312     { $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
35313 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35314   fi
35315 
35316   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35317 
35318 
35319   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35320 
35321 
35322 
35323 
35324 
35325 
35326 
35327 
35328 
35329 
35330 
35331 
35332 
35333 
35334 
35335 
35336 
35337 
35338 
35339 
35340 
35341 
35342 
35343 
35344 
35345 
35346 
35347 
35348 
35349 
35350 
35351 
35352 
35353 
35354 
35355 
35356 
35357 
35358 
35359 
35360 
35361 
35362 
35363 
35364 
35365 
35366 
35367 
35368 
35369     # Execute function body
35370 
35371   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35372   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35373 
35374   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35375     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35376   fi
35377 
35378   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35379     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35380   fi
35381 
35382   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35383   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35384 
35385   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35386     :
35387 
35388   else
35389     :
35390 
35391           { $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
35392 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35393 
35394 
35395   fi
35396 
35397 
35398 
35399 
35400 
35401 
35402 
35403 
35404 
35405 
35406 
35407 
35408 
35409 
35410   fi
35411 
35412   #
35413   # Setup the preprocessor (CPP and CXXCPP)
35414   #
35415   ac_ext=c
35416 ac_cpp='$CPP $CPPFLAGS'
35417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35421 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35422 # On Suns, sometimes $CPP names a directory.
35423 if test -n "$CPP" && test -d "$CPP"; then
35424   CPP=
35425 fi
35426 if test -z "$CPP"; then
35427   if ${ac_cv_prog_CPP+:} false; then :
35428   $as_echo_n "(cached) " >&6
35429 else
35430       # Double quotes because CPP needs to be expanded
35431     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35432     do
35433       ac_preproc_ok=false
35434 for ac_c_preproc_warn_flag in '' yes
35435 do
35436   # Use a header file that comes with gcc, so configuring glibc
35437   # with a fresh cross-compiler works.
35438   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35439   # <limits.h> exists even on freestanding compilers.
35440   # On the NeXT, cc -E runs the code through the compiler's parser,
35441   # not just through cpp. "Syntax error" is here to catch this case.
35442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35443 /* end confdefs.h.  */
35444 #ifdef __STDC__
35445 # include <limits.h>
35446 #else
35447 # include <assert.h>
35448 #endif
35449                      Syntax error
35450 _ACEOF
35451 if ac_fn_c_try_cpp "$LINENO"; then :
35452 
35453 else
35454   # Broken: fails on valid input.
35455 continue
35456 fi
35457 rm -f conftest.err conftest.i conftest.$ac_ext
35458 
35459   # OK, works on sane cases.  Now check whether nonexistent headers
35460   # can be detected and how.
35461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35462 /* end confdefs.h.  */
35463 #include <ac_nonexistent.h>
35464 _ACEOF
35465 if ac_fn_c_try_cpp "$LINENO"; then :
35466   # Broken: success on invalid input.
35467 continue
35468 else
35469   # Passes both tests.
35470 ac_preproc_ok=:
35471 break
35472 fi
35473 rm -f conftest.err conftest.i conftest.$ac_ext
35474 
35475 done
35476 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35477 rm -f conftest.i conftest.err conftest.$ac_ext
35478 if $ac_preproc_ok; then :
35479   break
35480 fi
35481 
35482     done
35483     ac_cv_prog_CPP=$CPP
35484 
35485 fi
35486   CPP=$ac_cv_prog_CPP
35487 else
35488   ac_cv_prog_CPP=$CPP
35489 fi
35490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35491 $as_echo "$CPP" >&6; }
35492 ac_preproc_ok=false
35493 for ac_c_preproc_warn_flag in '' yes
35494 do
35495   # Use a header file that comes with gcc, so configuring glibc
35496   # with a fresh cross-compiler works.
35497   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35498   # <limits.h> exists even on freestanding compilers.
35499   # On the NeXT, cc -E runs the code through the compiler's parser,
35500   # not just through cpp. "Syntax error" is here to catch this case.
35501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35502 /* end confdefs.h.  */
35503 #ifdef __STDC__
35504 # include <limits.h>
35505 #else
35506 # include <assert.h>
35507 #endif
35508                      Syntax error
35509 _ACEOF
35510 if ac_fn_c_try_cpp "$LINENO"; then :
35511 
35512 else
35513   # Broken: fails on valid input.
35514 continue
35515 fi
35516 rm -f conftest.err conftest.i conftest.$ac_ext
35517 
35518   # OK, works on sane cases.  Now check whether nonexistent headers
35519   # can be detected and how.
35520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35521 /* end confdefs.h.  */
35522 #include <ac_nonexistent.h>
35523 _ACEOF
35524 if ac_fn_c_try_cpp "$LINENO"; then :
35525   # Broken: success on invalid input.
35526 continue
35527 else
35528   # Passes both tests.
35529 ac_preproc_ok=:
35530 break
35531 fi
35532 rm -f conftest.err conftest.i conftest.$ac_ext
35533 
35534 done
35535 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35536 rm -f conftest.i conftest.err conftest.$ac_ext
35537 if $ac_preproc_ok; then :
35538 
35539 else
35540   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35542 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35543 See \`config.log' for more details" "$LINENO" 5; }
35544 fi
35545 
35546 ac_ext=cpp
35547 ac_cpp='$CXXCPP $CPPFLAGS'
35548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35551 
35552 
35553   # Only process if variable expands to non-empty
35554 
35555   if test "x$CPP" != x; then
35556     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35557 
35558   # First separate the path from the arguments. This will split at the first
35559   # space.
35560   complete="$CPP"
35561   path="${complete%% *}"
35562   tmp="$complete EOL"
35563   arguments="${tmp#* }"
35564 
35565   # Input might be given as Windows format, start by converting to
35566   # unix format.
35567   new_path=`$CYGPATH -u "$path"`
35568 
35569   # Now try to locate executable using which
35570   new_path=`$WHICH "$new_path" 2> /dev/null`
35571   # bat and cmd files are not always considered executable in cygwin causing which
35572   # to not find them
35573   if test "x$new_path" = x \
35574       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35575       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35576     new_path=`$CYGPATH -u "$path"`
35577   fi
35578   if test "x$new_path" = x; then
35579     # Oops. Which didn't find the executable.
35580     # The splitting of arguments from the executable at a space might have been incorrect,
35581     # since paths with space are more likely in Windows. Give it another try with the whole
35582     # argument.
35583     path="$complete"
35584     arguments="EOL"
35585     new_path=`$CYGPATH -u "$path"`
35586     new_path=`$WHICH "$new_path" 2> /dev/null`
35587     # bat and cmd files are not always considered executable in cygwin causing which
35588     # to not find them
35589     if test "x$new_path" = x \
35590         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35591         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35592       new_path=`$CYGPATH -u "$path"`
35593     fi
35594     if test "x$new_path" = x; then
35595       # It's still not found. Now this is an unrecoverable error.
35596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35597 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35598       has_space=`$ECHO "$complete" | $GREP " "`
35599       if test "x$has_space" != x; then
35600         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35601 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35602       fi
35603       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35604     fi
35605   fi
35606 
35607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35610   # "foo.exe" is OK but "foo" is an error.
35611   #
35612   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35613   # It is also a way to make sure we got the proper file name for the real test later on.
35614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35615   if test "x$test_shortpath" = x; then
35616     # Short path failed, file does not exist as specified.
35617     # Try adding .exe or .cmd
35618     if test -f "${new_path}.exe"; then
35619       input_to_shortpath="${new_path}.exe"
35620     elif test -f "${new_path}.cmd"; then
35621       input_to_shortpath="${new_path}.cmd"
35622     else
35623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35624 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35625       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35626 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35627       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35628     fi
35629   else
35630     input_to_shortpath="$new_path"
35631   fi
35632 
35633   # Call helper function which possibly converts this using DOS-style short mode.
35634   # If so, the updated path is stored in $new_path.
35635   new_path="$input_to_shortpath"
35636 
35637   input_path="$input_to_shortpath"
35638   # Check if we need to convert this using DOS-style short mode. If the path
35639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35640   # take no chances and rewrite it.
35641   # Note: m4 eats our [], so we need to use [ and ] instead.
35642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35643   if test "x$has_forbidden_chars" != x; then
35644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35648       # Going to short mode and back again did indeed matter. Since short mode is
35649       # case insensitive, let's make it lowercase to improve readability.
35650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35651       # Now convert it back to Unix-style (cygpath)
35652       input_path=`$CYGPATH -u "$shortmode_path"`
35653       new_path="$input_path"
35654     fi
35655   fi
35656 
35657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35658   if test "x$test_cygdrive_prefix" = x; then
35659     # As a simple fix, exclude /usr/bin since it's not a real path.
35660     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35662       # a path prefixed by /cygdrive for fixpath to work.
35663       new_path="$CYGWIN_ROOT_PATH$input_path"
35664     fi
35665   fi
35666 
35667   # remove trailing .exe if any
35668   new_path="${new_path/%.exe/}"
35669 
35670     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35671 
35672   # First separate the path from the arguments. This will split at the first
35673   # space.
35674   complete="$CPP"
35675   path="${complete%% *}"
35676   tmp="$complete EOL"
35677   arguments="${tmp#* }"
35678 
35679   # Input might be given as Windows format, start by converting to
35680   # unix format.
35681   new_path="$path"
35682 
35683   windows_path="$new_path"
35684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35685     unix_path=`$CYGPATH -u "$windows_path"`
35686     new_path="$unix_path"
35687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35689     new_path="$unix_path"
35690   fi
35691 
35692 
35693   # Now try to locate executable using which
35694   new_path=`$WHICH "$new_path" 2> /dev/null`
35695 
35696   if test "x$new_path" = x; then
35697     # Oops. Which didn't find the executable.
35698     # The splitting of arguments from the executable at a space might have been incorrect,
35699     # since paths with space are more likely in Windows. Give it another try with the whole
35700     # argument.
35701     path="$complete"
35702     arguments="EOL"
35703     new_path="$path"
35704 
35705   windows_path="$new_path"
35706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35707     unix_path=`$CYGPATH -u "$windows_path"`
35708     new_path="$unix_path"
35709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35711     new_path="$unix_path"
35712   fi
35713 
35714 
35715     new_path=`$WHICH "$new_path" 2> /dev/null`
35716     # bat and cmd files are not always considered executable in MSYS causing which
35717     # to not find them
35718     if test "x$new_path" = x \
35719         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35720         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35721       new_path="$path"
35722 
35723   windows_path="$new_path"
35724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35725     unix_path=`$CYGPATH -u "$windows_path"`
35726     new_path="$unix_path"
35727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35729     new_path="$unix_path"
35730   fi
35731 
35732     fi
35733 
35734     if test "x$new_path" = x; then
35735       # It's still not found. Now this is an unrecoverable error.
35736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35737 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35738       has_space=`$ECHO "$complete" | $GREP " "`
35739       if test "x$has_space" != x; then
35740         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35741 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35742       fi
35743       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35744     fi
35745   fi
35746 
35747   # Now new_path has a complete unix path to the binary
35748   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35749     # Keep paths in /bin as-is, but remove trailing .exe if any
35750     new_path="${new_path/%.exe/}"
35751     # Do not save /bin paths to all_fixpath_prefixes!
35752   else
35753     # Not in mixed or Windows style, start by that.
35754     new_path=`cmd //c echo $new_path`
35755 
35756   input_path="$new_path"
35757   # Check if we need to convert this using DOS-style short mode. If the path
35758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35759   # take no chances and rewrite it.
35760   # Note: m4 eats our [], so we need to use [ and ] instead.
35761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35762   if test "x$has_forbidden_chars" != x; then
35763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35764     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35765   fi
35766 
35767     # Output is in $new_path
35768 
35769   windows_path="$new_path"
35770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35771     unix_path=`$CYGPATH -u "$windows_path"`
35772     new_path="$unix_path"
35773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35775     new_path="$unix_path"
35776   fi
35777 
35778     # remove trailing .exe if any
35779     new_path="${new_path/%.exe/}"
35780 
35781     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35782     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35783   fi
35784 
35785     else
35786       # We're on a unix platform. Hooray! :)
35787       # First separate the path from the arguments. This will split at the first
35788       # space.
35789       complete="$CPP"
35790       path="${complete%% *}"
35791       tmp="$complete EOL"
35792       arguments="${tmp#* }"
35793 
35794       # Cannot rely on the command "which" here since it doesn't always work.
35795       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35796       if test -z "$is_absolute_path"; then
35797         # Path to executable is not absolute. Find it.
35798         IFS_save="$IFS"
35799         IFS=:
35800         for p in $PATH; do
35801           if test -f "$p/$path" && test -x "$p/$path"; then
35802             new_path="$p/$path"
35803             break
35804           fi
35805         done
35806         IFS="$IFS_save"
35807       else
35808         # This is an absolute path, we can use it without further modifications.
35809         new_path="$path"
35810       fi
35811 
35812       if test "x$new_path" = x; then
35813         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35814 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35815         has_space=`$ECHO "$complete" | $GREP " "`
35816         if test "x$has_space" != x; then
35817           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35818 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35819         fi
35820         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35821       fi
35822     fi
35823 
35824     # Now join together the path and the arguments once again
35825     if test "x$arguments" != xEOL; then
35826       new_complete="$new_path ${arguments% *}"
35827     else
35828       new_complete="$new_path"
35829     fi
35830 
35831     if test "x$complete" != "x$new_complete"; then
35832       CPP="$new_complete"
35833       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35834 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35835     fi
35836   fi
35837 
35838   ac_ext=cpp
35839 ac_cpp='$CXXCPP $CPPFLAGS'
35840 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35841 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35842 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35844 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35845 if test -z "$CXXCPP"; then
35846   if ${ac_cv_prog_CXXCPP+:} false; then :
35847   $as_echo_n "(cached) " >&6
35848 else
35849       # Double quotes because CXXCPP needs to be expanded
35850     for CXXCPP in "$CXX -E" "/lib/cpp"
35851     do
35852       ac_preproc_ok=false
35853 for ac_cxx_preproc_warn_flag in '' yes
35854 do
35855   # Use a header file that comes with gcc, so configuring glibc
35856   # with a fresh cross-compiler works.
35857   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35858   # <limits.h> exists even on freestanding compilers.
35859   # On the NeXT, cc -E runs the code through the compiler's parser,
35860   # not just through cpp. "Syntax error" is here to catch this case.
35861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35862 /* end confdefs.h.  */
35863 #ifdef __STDC__
35864 # include <limits.h>
35865 #else
35866 # include <assert.h>
35867 #endif
35868                      Syntax error
35869 _ACEOF
35870 if ac_fn_cxx_try_cpp "$LINENO"; then :
35871 
35872 else
35873   # Broken: fails on valid input.
35874 continue
35875 fi
35876 rm -f conftest.err conftest.i conftest.$ac_ext
35877 
35878   # OK, works on sane cases.  Now check whether nonexistent headers
35879   # can be detected and how.
35880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35881 /* end confdefs.h.  */
35882 #include <ac_nonexistent.h>
35883 _ACEOF
35884 if ac_fn_cxx_try_cpp "$LINENO"; then :
35885   # Broken: success on invalid input.
35886 continue
35887 else
35888   # Passes both tests.
35889 ac_preproc_ok=:
35890 break
35891 fi
35892 rm -f conftest.err conftest.i conftest.$ac_ext
35893 
35894 done
35895 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35896 rm -f conftest.i conftest.err conftest.$ac_ext
35897 if $ac_preproc_ok; then :
35898   break
35899 fi
35900 
35901     done
35902     ac_cv_prog_CXXCPP=$CXXCPP
35903 
35904 fi
35905   CXXCPP=$ac_cv_prog_CXXCPP
35906 else
35907   ac_cv_prog_CXXCPP=$CXXCPP
35908 fi
35909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35910 $as_echo "$CXXCPP" >&6; }
35911 ac_preproc_ok=false
35912 for ac_cxx_preproc_warn_flag in '' yes
35913 do
35914   # Use a header file that comes with gcc, so configuring glibc
35915   # with a fresh cross-compiler works.
35916   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35917   # <limits.h> exists even on freestanding compilers.
35918   # On the NeXT, cc -E runs the code through the compiler's parser,
35919   # not just through cpp. "Syntax error" is here to catch this case.
35920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35921 /* end confdefs.h.  */
35922 #ifdef __STDC__
35923 # include <limits.h>
35924 #else
35925 # include <assert.h>
35926 #endif
35927                      Syntax error
35928 _ACEOF
35929 if ac_fn_cxx_try_cpp "$LINENO"; then :
35930 
35931 else
35932   # Broken: fails on valid input.
35933 continue
35934 fi
35935 rm -f conftest.err conftest.i conftest.$ac_ext
35936 
35937   # OK, works on sane cases.  Now check whether nonexistent headers
35938   # can be detected and how.
35939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35940 /* end confdefs.h.  */
35941 #include <ac_nonexistent.h>
35942 _ACEOF
35943 if ac_fn_cxx_try_cpp "$LINENO"; then :
35944   # Broken: success on invalid input.
35945 continue
35946 else
35947   # Passes both tests.
35948 ac_preproc_ok=:
35949 break
35950 fi
35951 rm -f conftest.err conftest.i conftest.$ac_ext
35952 
35953 done
35954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35955 rm -f conftest.i conftest.err conftest.$ac_ext
35956 if $ac_preproc_ok; then :
35957 
35958 else
35959   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35960 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35961 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35962 See \`config.log' for more details" "$LINENO" 5; }
35963 fi
35964 
35965 ac_ext=cpp
35966 ac_cpp='$CXXCPP $CPPFLAGS'
35967 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35968 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35969 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35970 
35971 
35972   # Only process if variable expands to non-empty
35973 
35974   if test "x$CXXCPP" != x; then
35975     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35976 
35977   # First separate the path from the arguments. This will split at the first
35978   # space.
35979   complete="$CXXCPP"
35980   path="${complete%% *}"
35981   tmp="$complete EOL"
35982   arguments="${tmp#* }"
35983 
35984   # Input might be given as Windows format, start by converting to
35985   # unix format.
35986   new_path=`$CYGPATH -u "$path"`
35987 
35988   # Now try to locate executable using which
35989   new_path=`$WHICH "$new_path" 2> /dev/null`
35990   # bat and cmd files are not always considered executable in cygwin causing which
35991   # to not find them
35992   if test "x$new_path" = x \
35993       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35994       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35995     new_path=`$CYGPATH -u "$path"`
35996   fi
35997   if test "x$new_path" = x; then
35998     # Oops. Which didn't find the executable.
35999     # The splitting of arguments from the executable at a space might have been incorrect,
36000     # since paths with space are more likely in Windows. Give it another try with the whole
36001     # argument.
36002     path="$complete"
36003     arguments="EOL"
36004     new_path=`$CYGPATH -u "$path"`
36005     new_path=`$WHICH "$new_path" 2> /dev/null`
36006     # bat and cmd files are not always considered executable in cygwin causing which
36007     # to not find them
36008     if test "x$new_path" = x \
36009         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36010         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36011       new_path=`$CYGPATH -u "$path"`
36012     fi
36013     if test "x$new_path" = x; then
36014       # It's still not found. Now this is an unrecoverable error.
36015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36016 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36017       has_space=`$ECHO "$complete" | $GREP " "`
36018       if test "x$has_space" != x; then
36019         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36020 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36021       fi
36022       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36023     fi
36024   fi
36025 
36026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36029   # "foo.exe" is OK but "foo" is an error.
36030   #
36031   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36032   # It is also a way to make sure we got the proper file name for the real test later on.
36033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36034   if test "x$test_shortpath" = x; then
36035     # Short path failed, file does not exist as specified.
36036     # Try adding .exe or .cmd
36037     if test -f "${new_path}.exe"; then
36038       input_to_shortpath="${new_path}.exe"
36039     elif test -f "${new_path}.cmd"; then
36040       input_to_shortpath="${new_path}.cmd"
36041     else
36042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36043 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36044       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36045 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36046       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36047     fi
36048   else
36049     input_to_shortpath="$new_path"
36050   fi
36051 
36052   # Call helper function which possibly converts this using DOS-style short mode.
36053   # If so, the updated path is stored in $new_path.
36054   new_path="$input_to_shortpath"
36055 
36056   input_path="$input_to_shortpath"
36057   # Check if we need to convert this using DOS-style short mode. If the path
36058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36059   # take no chances and rewrite it.
36060   # Note: m4 eats our [], so we need to use [ and ] instead.
36061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36062   if test "x$has_forbidden_chars" != x; then
36063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36067       # Going to short mode and back again did indeed matter. Since short mode is
36068       # case insensitive, let's make it lowercase to improve readability.
36069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36070       # Now convert it back to Unix-style (cygpath)
36071       input_path=`$CYGPATH -u "$shortmode_path"`
36072       new_path="$input_path"
36073     fi
36074   fi
36075 
36076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36077   if test "x$test_cygdrive_prefix" = x; then
36078     # As a simple fix, exclude /usr/bin since it's not a real path.
36079     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36081       # a path prefixed by /cygdrive for fixpath to work.
36082       new_path="$CYGWIN_ROOT_PATH$input_path"
36083     fi
36084   fi
36085 
36086   # remove trailing .exe if any
36087   new_path="${new_path/%.exe/}"
36088 
36089     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36090 
36091   # First separate the path from the arguments. This will split at the first
36092   # space.
36093   complete="$CXXCPP"
36094   path="${complete%% *}"
36095   tmp="$complete EOL"
36096   arguments="${tmp#* }"
36097 
36098   # Input might be given as Windows format, start by converting to
36099   # unix format.
36100   new_path="$path"
36101 
36102   windows_path="$new_path"
36103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36104     unix_path=`$CYGPATH -u "$windows_path"`
36105     new_path="$unix_path"
36106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36108     new_path="$unix_path"
36109   fi
36110 
36111 
36112   # Now try to locate executable using which
36113   new_path=`$WHICH "$new_path" 2> /dev/null`
36114 
36115   if test "x$new_path" = x; then
36116     # Oops. Which didn't find the executable.
36117     # The splitting of arguments from the executable at a space might have been incorrect,
36118     # since paths with space are more likely in Windows. Give it another try with the whole
36119     # argument.
36120     path="$complete"
36121     arguments="EOL"
36122     new_path="$path"
36123 
36124   windows_path="$new_path"
36125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36126     unix_path=`$CYGPATH -u "$windows_path"`
36127     new_path="$unix_path"
36128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36130     new_path="$unix_path"
36131   fi
36132 
36133 
36134     new_path=`$WHICH "$new_path" 2> /dev/null`
36135     # bat and cmd files are not always considered executable in MSYS causing which
36136     # to not find them
36137     if test "x$new_path" = x \
36138         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36139         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36140       new_path="$path"
36141 
36142   windows_path="$new_path"
36143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36144     unix_path=`$CYGPATH -u "$windows_path"`
36145     new_path="$unix_path"
36146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36148     new_path="$unix_path"
36149   fi
36150 
36151     fi
36152 
36153     if test "x$new_path" = x; then
36154       # It's still not found. Now this is an unrecoverable error.
36155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36156 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36157       has_space=`$ECHO "$complete" | $GREP " "`
36158       if test "x$has_space" != x; then
36159         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36160 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36161       fi
36162       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36163     fi
36164   fi
36165 
36166   # Now new_path has a complete unix path to the binary
36167   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36168     # Keep paths in /bin as-is, but remove trailing .exe if any
36169     new_path="${new_path/%.exe/}"
36170     # Do not save /bin paths to all_fixpath_prefixes!
36171   else
36172     # Not in mixed or Windows style, start by that.
36173     new_path=`cmd //c echo $new_path`
36174 
36175   input_path="$new_path"
36176   # Check if we need to convert this using DOS-style short mode. If the path
36177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36178   # take no chances and rewrite it.
36179   # Note: m4 eats our [], so we need to use [ and ] instead.
36180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36181   if test "x$has_forbidden_chars" != x; then
36182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36183     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36184   fi
36185 
36186     # Output is in $new_path
36187 
36188   windows_path="$new_path"
36189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36190     unix_path=`$CYGPATH -u "$windows_path"`
36191     new_path="$unix_path"
36192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36194     new_path="$unix_path"
36195   fi
36196 
36197     # remove trailing .exe if any
36198     new_path="${new_path/%.exe/}"
36199 
36200     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36201     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36202   fi
36203 
36204     else
36205       # We're on a unix platform. Hooray! :)
36206       # First separate the path from the arguments. This will split at the first
36207       # space.
36208       complete="$CXXCPP"
36209       path="${complete%% *}"
36210       tmp="$complete EOL"
36211       arguments="${tmp#* }"
36212 
36213       # Cannot rely on the command "which" here since it doesn't always work.
36214       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36215       if test -z "$is_absolute_path"; then
36216         # Path to executable is not absolute. Find it.
36217         IFS_save="$IFS"
36218         IFS=:
36219         for p in $PATH; do
36220           if test -f "$p/$path" && test -x "$p/$path"; then
36221             new_path="$p/$path"
36222             break
36223           fi
36224         done
36225         IFS="$IFS_save"
36226       else
36227         # This is an absolute path, we can use it without further modifications.
36228         new_path="$path"
36229       fi
36230 
36231       if test "x$new_path" = x; then
36232         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36233 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36234         has_space=`$ECHO "$complete" | $GREP " "`
36235         if test "x$has_space" != x; then
36236           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36237 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36238         fi
36239         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36240       fi
36241     fi
36242 
36243     # Now join together the path and the arguments once again
36244     if test "x$arguments" != xEOL; then
36245       new_complete="$new_path ${arguments% *}"
36246     else
36247       new_complete="$new_path"
36248     fi
36249 
36250     if test "x$complete" != "x$new_complete"; then
36251       CXXCPP="$new_complete"
36252       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36253 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36254     fi
36255   fi
36256 
36257 
36258   #
36259   # Setup the linker (LD)
36260   #
36261   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36262     # In the Microsoft toolchain we have a separate LD command "link".
36263     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36264     # a cygwin program for something completely different.
36265     # Extract the first word of "link", so it can be a program name with args.
36266 set dummy link; ac_word=$2
36267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36268 $as_echo_n "checking for $ac_word... " >&6; }
36269 if ${ac_cv_prog_LD+:} false; then :
36270   $as_echo_n "(cached) " >&6
36271 else
36272   if test -n "$LD"; then
36273   ac_cv_prog_LD="$LD" # Let the user override the test.
36274 else
36275   ac_prog_rejected=no
36276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36277 for as_dir in $PATH
36278 do
36279   IFS=$as_save_IFS
36280   test -z "$as_dir" && as_dir=.
36281     for ac_exec_ext in '' $ac_executable_extensions; do
36282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36283     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36284        ac_prog_rejected=yes
36285        continue
36286      fi
36287     ac_cv_prog_LD="link"
36288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289     break 2
36290   fi
36291 done
36292   done
36293 IFS=$as_save_IFS
36294 
36295 if test $ac_prog_rejected = yes; then
36296   # We found a bogon in the path, so make sure we never use it.
36297   set dummy $ac_cv_prog_LD
36298   shift
36299   if test $# != 0; then
36300     # We chose a different compiler from the bogus one.
36301     # However, it has the same basename, so the bogon will be chosen
36302     # first if we set LD to just the basename; use the full file name.
36303     shift
36304     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36305   fi
36306 fi
36307 fi
36308 fi
36309 LD=$ac_cv_prog_LD
36310 if test -n "$LD"; then
36311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36312 $as_echo "$LD" >&6; }
36313 else
36314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36315 $as_echo "no" >&6; }
36316 fi
36317 
36318 
36319 
36320   # Only process if variable expands to non-empty
36321 
36322   if test "x$LD" != x; then
36323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36324 
36325   # First separate the path from the arguments. This will split at the first
36326   # space.
36327   complete="$LD"
36328   path="${complete%% *}"
36329   tmp="$complete EOL"
36330   arguments="${tmp#* }"
36331 
36332   # Input might be given as Windows format, start by converting to
36333   # unix format.
36334   new_path=`$CYGPATH -u "$path"`
36335 
36336   # Now try to locate executable using which
36337   new_path=`$WHICH "$new_path" 2> /dev/null`
36338   # bat and cmd files are not always considered executable in cygwin causing which
36339   # to not find them
36340   if test "x$new_path" = x \
36341       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36342       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36343     new_path=`$CYGPATH -u "$path"`
36344   fi
36345   if test "x$new_path" = x; then
36346     # Oops. Which didn't find the executable.
36347     # The splitting of arguments from the executable at a space might have been incorrect,
36348     # since paths with space are more likely in Windows. Give it another try with the whole
36349     # argument.
36350     path="$complete"
36351     arguments="EOL"
36352     new_path=`$CYGPATH -u "$path"`
36353     new_path=`$WHICH "$new_path" 2> /dev/null`
36354     # bat and cmd files are not always considered executable in cygwin causing which
36355     # to not find them
36356     if test "x$new_path" = x \
36357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36359       new_path=`$CYGPATH -u "$path"`
36360     fi
36361     if test "x$new_path" = x; then
36362       # It's still not found. Now this is an unrecoverable error.
36363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36364 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36365       has_space=`$ECHO "$complete" | $GREP " "`
36366       if test "x$has_space" != x; then
36367         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36368 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36369       fi
36370       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36371     fi
36372   fi
36373 
36374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36377   # "foo.exe" is OK but "foo" is an error.
36378   #
36379   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36380   # It is also a way to make sure we got the proper file name for the real test later on.
36381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36382   if test "x$test_shortpath" = x; then
36383     # Short path failed, file does not exist as specified.
36384     # Try adding .exe or .cmd
36385     if test -f "${new_path}.exe"; then
36386       input_to_shortpath="${new_path}.exe"
36387     elif test -f "${new_path}.cmd"; then
36388       input_to_shortpath="${new_path}.cmd"
36389     else
36390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36391 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36392       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36393 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36394       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36395     fi
36396   else
36397     input_to_shortpath="$new_path"
36398   fi
36399 
36400   # Call helper function which possibly converts this using DOS-style short mode.
36401   # If so, the updated path is stored in $new_path.
36402   new_path="$input_to_shortpath"
36403 
36404   input_path="$input_to_shortpath"
36405   # Check if we need to convert this using DOS-style short mode. If the path
36406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36407   # take no chances and rewrite it.
36408   # Note: m4 eats our [], so we need to use [ and ] instead.
36409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36410   if test "x$has_forbidden_chars" != x; then
36411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36415       # Going to short mode and back again did indeed matter. Since short mode is
36416       # case insensitive, let's make it lowercase to improve readability.
36417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36418       # Now convert it back to Unix-style (cygpath)
36419       input_path=`$CYGPATH -u "$shortmode_path"`
36420       new_path="$input_path"
36421     fi
36422   fi
36423 
36424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36425   if test "x$test_cygdrive_prefix" = x; then
36426     # As a simple fix, exclude /usr/bin since it's not a real path.
36427     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36429       # a path prefixed by /cygdrive for fixpath to work.
36430       new_path="$CYGWIN_ROOT_PATH$input_path"
36431     fi
36432   fi
36433 
36434   # remove trailing .exe if any
36435   new_path="${new_path/%.exe/}"
36436 
36437     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36438 
36439   # First separate the path from the arguments. This will split at the first
36440   # space.
36441   complete="$LD"
36442   path="${complete%% *}"
36443   tmp="$complete EOL"
36444   arguments="${tmp#* }"
36445 
36446   # Input might be given as Windows format, start by converting to
36447   # unix format.
36448   new_path="$path"
36449 
36450   windows_path="$new_path"
36451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36452     unix_path=`$CYGPATH -u "$windows_path"`
36453     new_path="$unix_path"
36454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36456     new_path="$unix_path"
36457   fi
36458 
36459 
36460   # Now try to locate executable using which
36461   new_path=`$WHICH "$new_path" 2> /dev/null`
36462 
36463   if test "x$new_path" = x; then
36464     # Oops. Which didn't find the executable.
36465     # The splitting of arguments from the executable at a space might have been incorrect,
36466     # since paths with space are more likely in Windows. Give it another try with the whole
36467     # argument.
36468     path="$complete"
36469     arguments="EOL"
36470     new_path="$path"
36471 
36472   windows_path="$new_path"
36473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36474     unix_path=`$CYGPATH -u "$windows_path"`
36475     new_path="$unix_path"
36476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36478     new_path="$unix_path"
36479   fi
36480 
36481 
36482     new_path=`$WHICH "$new_path" 2> /dev/null`
36483     # bat and cmd files are not always considered executable in MSYS causing which
36484     # to not find them
36485     if test "x$new_path" = x \
36486         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488       new_path="$path"
36489 
36490   windows_path="$new_path"
36491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492     unix_path=`$CYGPATH -u "$windows_path"`
36493     new_path="$unix_path"
36494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496     new_path="$unix_path"
36497   fi
36498 
36499     fi
36500 
36501     if test "x$new_path" = x; then
36502       # It's still not found. Now this is an unrecoverable error.
36503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36504 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36505       has_space=`$ECHO "$complete" | $GREP " "`
36506       if test "x$has_space" != x; then
36507         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36508 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36509       fi
36510       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36511     fi
36512   fi
36513 
36514   # Now new_path has a complete unix path to the binary
36515   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36516     # Keep paths in /bin as-is, but remove trailing .exe if any
36517     new_path="${new_path/%.exe/}"
36518     # Do not save /bin paths to all_fixpath_prefixes!
36519   else
36520     # Not in mixed or Windows style, start by that.
36521     new_path=`cmd //c echo $new_path`
36522 
36523   input_path="$new_path"
36524   # Check if we need to convert this using DOS-style short mode. If the path
36525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36526   # take no chances and rewrite it.
36527   # Note: m4 eats our [], so we need to use [ and ] instead.
36528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36529   if test "x$has_forbidden_chars" != x; then
36530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36532   fi
36533 
36534     # Output is in $new_path
36535 
36536   windows_path="$new_path"
36537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36538     unix_path=`$CYGPATH -u "$windows_path"`
36539     new_path="$unix_path"
36540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36542     new_path="$unix_path"
36543   fi
36544 
36545     # remove trailing .exe if any
36546     new_path="${new_path/%.exe/}"
36547 
36548     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36549     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36550   fi
36551 
36552     else
36553       # We're on a unix platform. Hooray! :)
36554       # First separate the path from the arguments. This will split at the first
36555       # space.
36556       complete="$LD"
36557       path="${complete%% *}"
36558       tmp="$complete EOL"
36559       arguments="${tmp#* }"
36560 
36561       # Cannot rely on the command "which" here since it doesn't always work.
36562       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36563       if test -z "$is_absolute_path"; then
36564         # Path to executable is not absolute. Find it.
36565         IFS_save="$IFS"
36566         IFS=:
36567         for p in $PATH; do
36568           if test -f "$p/$path" && test -x "$p/$path"; then
36569             new_path="$p/$path"
36570             break
36571           fi
36572         done
36573         IFS="$IFS_save"
36574       else
36575         # This is an absolute path, we can use it without further modifications.
36576         new_path="$path"
36577       fi
36578 
36579       if test "x$new_path" = x; then
36580         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36581 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36582         has_space=`$ECHO "$complete" | $GREP " "`
36583         if test "x$has_space" != x; then
36584           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36585 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36586         fi
36587         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36588       fi
36589     fi
36590 
36591     # Now join together the path and the arguments once again
36592     if test "x$arguments" != xEOL; then
36593       new_complete="$new_path ${arguments% *}"
36594     else
36595       new_complete="$new_path"
36596     fi
36597 
36598     if test "x$complete" != "x$new_complete"; then
36599       LD="$new_complete"
36600       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36601 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36602     fi
36603   fi
36604 
36605     # Verify that we indeed succeeded with this trick.
36606     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36607 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36608     "$LD" --version > /dev/null
36609     if test $? -eq 0 ; then
36610       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36611 $as_echo "no" >&6; }
36612       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36613     else
36614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36615 $as_echo "yes" >&6; }
36616     fi
36617     LDCXX="$LD"
36618   else
36619     # All other toolchains use the compiler to link.
36620     LD="$CC"
36621     LDCXX="$CXX"
36622   fi
36623 
36624   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36625 
36626 
36627   #
36628   # Setup the assembler (AS)
36629   #
36630   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36631 
36632 
36633   # Publish this variable in the help.
36634 
36635 
36636   if [ -z "${AS+x}" ]; then
36637     # The variable is not set by user, try to locate tool using the code snippet
36638     for ac_prog in as
36639 do
36640   # Extract the first word of "$ac_prog", so it can be a program name with args.
36641 set dummy $ac_prog; ac_word=$2
36642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643 $as_echo_n "checking for $ac_word... " >&6; }
36644 if ${ac_cv_path_AS+:} false; then :
36645   $as_echo_n "(cached) " >&6
36646 else
36647   case $AS in
36648   [\\/]* | ?:[\\/]*)
36649   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36650   ;;
36651   *)
36652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36653 for as_dir in $PATH
36654 do
36655   IFS=$as_save_IFS
36656   test -z "$as_dir" && as_dir=.
36657     for ac_exec_ext in '' $ac_executable_extensions; do
36658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36659     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36661     break 2
36662   fi
36663 done
36664   done
36665 IFS=$as_save_IFS
36666 
36667   ;;
36668 esac
36669 fi
36670 AS=$ac_cv_path_AS
36671 if test -n "$AS"; then
36672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36673 $as_echo "$AS" >&6; }
36674 else
36675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36676 $as_echo "no" >&6; }
36677 fi
36678 
36679 
36680   test -n "$AS" && break
36681 done
36682 
36683   else
36684     # The variable is set, but is it from the command line or the environment?
36685 
36686     # Try to remove the string !AS! from our list.
36687     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36688     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36689       # If it failed, the variable was not from the command line. Ignore it,
36690       # but warn the user (except for BASH, which is always set by the calling BASH).
36691       if test "xAS" != xBASH; then
36692         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36693 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36694       fi
36695       # Try to locate tool using the code snippet
36696       for ac_prog in as
36697 do
36698   # Extract the first word of "$ac_prog", so it can be a program name with args.
36699 set dummy $ac_prog; ac_word=$2
36700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36701 $as_echo_n "checking for $ac_word... " >&6; }
36702 if ${ac_cv_path_AS+:} false; then :
36703   $as_echo_n "(cached) " >&6
36704 else
36705   case $AS in
36706   [\\/]* | ?:[\\/]*)
36707   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36708   ;;
36709   *)
36710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36711 for as_dir in $PATH
36712 do
36713   IFS=$as_save_IFS
36714   test -z "$as_dir" && as_dir=.
36715     for ac_exec_ext in '' $ac_executable_extensions; do
36716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36717     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36719     break 2
36720   fi
36721 done
36722   done
36723 IFS=$as_save_IFS
36724 
36725   ;;
36726 esac
36727 fi
36728 AS=$ac_cv_path_AS
36729 if test -n "$AS"; then
36730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36731 $as_echo "$AS" >&6; }
36732 else
36733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36734 $as_echo "no" >&6; }
36735 fi
36736 
36737 
36738   test -n "$AS" && break
36739 done
36740 
36741     else
36742       # If it succeeded, then it was overridden by the user. We will use it
36743       # for the tool.
36744 
36745       # First remove it from the list of overridden variables, so we can test
36746       # for unknown variables in the end.
36747       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36748 
36749       # Check if we try to supply an empty value
36750       if test "x$AS" = x; then
36751         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36752 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36753         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36754 $as_echo_n "checking for AS... " >&6; }
36755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36756 $as_echo "disabled" >&6; }
36757       else
36758         # Check if the provided tool contains a complete path.
36759         tool_specified="$AS"
36760         tool_basename="${tool_specified##*/}"
36761         if test "x$tool_basename" = "x$tool_specified"; then
36762           # A command without a complete path is provided, search $PATH.
36763           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36764 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36765           # Extract the first word of "$tool_basename", so it can be a program name with args.
36766 set dummy $tool_basename; ac_word=$2
36767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36768 $as_echo_n "checking for $ac_word... " >&6; }
36769 if ${ac_cv_path_AS+:} false; then :
36770   $as_echo_n "(cached) " >&6
36771 else
36772   case $AS in
36773   [\\/]* | ?:[\\/]*)
36774   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36775   ;;
36776   *)
36777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36778 for as_dir in $PATH
36779 do
36780   IFS=$as_save_IFS
36781   test -z "$as_dir" && as_dir=.
36782     for ac_exec_ext in '' $ac_executable_extensions; do
36783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36784     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36786     break 2
36787   fi
36788 done
36789   done
36790 IFS=$as_save_IFS
36791 
36792   ;;
36793 esac
36794 fi
36795 AS=$ac_cv_path_AS
36796 if test -n "$AS"; then
36797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36798 $as_echo "$AS" >&6; }
36799 else
36800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36801 $as_echo "no" >&6; }
36802 fi
36803 
36804 
36805           if test "x$AS" = x; then
36806             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36807           fi
36808         else
36809           # Otherwise we believe it is a complete path. Use it as it is.
36810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36811 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36812           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36813 $as_echo_n "checking for AS... " >&6; }
36814           if test ! -x "$tool_specified"; then
36815             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36816 $as_echo "not found" >&6; }
36817             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36818           fi
36819           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36820 $as_echo "$tool_specified" >&6; }
36821         fi
36822       fi
36823     fi
36824 
36825   fi
36826 
36827 
36828 
36829   # Only process if variable expands to non-empty
36830 
36831   if test "x$AS" != x; then
36832     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36833 
36834   # First separate the path from the arguments. This will split at the first
36835   # space.
36836   complete="$AS"
36837   path="${complete%% *}"
36838   tmp="$complete EOL"
36839   arguments="${tmp#* }"
36840 
36841   # Input might be given as Windows format, start by converting to
36842   # unix format.
36843   new_path=`$CYGPATH -u "$path"`
36844 
36845   # Now try to locate executable using which
36846   new_path=`$WHICH "$new_path" 2> /dev/null`
36847   # bat and cmd files are not always considered executable in cygwin causing which
36848   # to not find them
36849   if test "x$new_path" = x \
36850       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36851       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36852     new_path=`$CYGPATH -u "$path"`
36853   fi
36854   if test "x$new_path" = x; then
36855     # Oops. Which didn't find the executable.
36856     # The splitting of arguments from the executable at a space might have been incorrect,
36857     # since paths with space are more likely in Windows. Give it another try with the whole
36858     # argument.
36859     path="$complete"
36860     arguments="EOL"
36861     new_path=`$CYGPATH -u "$path"`
36862     new_path=`$WHICH "$new_path" 2> /dev/null`
36863     # bat and cmd files are not always considered executable in cygwin causing which
36864     # to not find them
36865     if test "x$new_path" = x \
36866         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36867         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36868       new_path=`$CYGPATH -u "$path"`
36869     fi
36870     if test "x$new_path" = x; then
36871       # It's still not found. Now this is an unrecoverable error.
36872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36873 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36874       has_space=`$ECHO "$complete" | $GREP " "`
36875       if test "x$has_space" != x; then
36876         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36877 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36878       fi
36879       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36880     fi
36881   fi
36882 
36883   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36884   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36885   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36886   # "foo.exe" is OK but "foo" is an error.
36887   #
36888   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36889   # It is also a way to make sure we got the proper file name for the real test later on.
36890   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36891   if test "x$test_shortpath" = x; then
36892     # Short path failed, file does not exist as specified.
36893     # Try adding .exe or .cmd
36894     if test -f "${new_path}.exe"; then
36895       input_to_shortpath="${new_path}.exe"
36896     elif test -f "${new_path}.cmd"; then
36897       input_to_shortpath="${new_path}.cmd"
36898     else
36899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36900 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36901       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36902 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36903       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36904     fi
36905   else
36906     input_to_shortpath="$new_path"
36907   fi
36908 
36909   # Call helper function which possibly converts this using DOS-style short mode.
36910   # If so, the updated path is stored in $new_path.
36911   new_path="$input_to_shortpath"
36912 
36913   input_path="$input_to_shortpath"
36914   # Check if we need to convert this using DOS-style short mode. If the path
36915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36916   # take no chances and rewrite it.
36917   # Note: m4 eats our [], so we need to use [ and ] instead.
36918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36919   if test "x$has_forbidden_chars" != x; then
36920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36924       # Going to short mode and back again did indeed matter. Since short mode is
36925       # case insensitive, let's make it lowercase to improve readability.
36926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36927       # Now convert it back to Unix-style (cygpath)
36928       input_path=`$CYGPATH -u "$shortmode_path"`
36929       new_path="$input_path"
36930     fi
36931   fi
36932 
36933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36934   if test "x$test_cygdrive_prefix" = x; then
36935     # As a simple fix, exclude /usr/bin since it's not a real path.
36936     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36938       # a path prefixed by /cygdrive for fixpath to work.
36939       new_path="$CYGWIN_ROOT_PATH$input_path"
36940     fi
36941   fi
36942 
36943   # remove trailing .exe if any
36944   new_path="${new_path/%.exe/}"
36945 
36946     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36947 
36948   # First separate the path from the arguments. This will split at the first
36949   # space.
36950   complete="$AS"
36951   path="${complete%% *}"
36952   tmp="$complete EOL"
36953   arguments="${tmp#* }"
36954 
36955   # Input might be given as Windows format, start by converting to
36956   # unix format.
36957   new_path="$path"
36958 
36959   windows_path="$new_path"
36960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36961     unix_path=`$CYGPATH -u "$windows_path"`
36962     new_path="$unix_path"
36963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36965     new_path="$unix_path"
36966   fi
36967 
36968 
36969   # Now try to locate executable using which
36970   new_path=`$WHICH "$new_path" 2> /dev/null`
36971 
36972   if test "x$new_path" = x; then
36973     # Oops. Which didn't find the executable.
36974     # The splitting of arguments from the executable at a space might have been incorrect,
36975     # since paths with space are more likely in Windows. Give it another try with the whole
36976     # argument.
36977     path="$complete"
36978     arguments="EOL"
36979     new_path="$path"
36980 
36981   windows_path="$new_path"
36982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36983     unix_path=`$CYGPATH -u "$windows_path"`
36984     new_path="$unix_path"
36985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36987     new_path="$unix_path"
36988   fi
36989 
36990 
36991     new_path=`$WHICH "$new_path" 2> /dev/null`
36992     # bat and cmd files are not always considered executable in MSYS causing which
36993     # to not find them
36994     if test "x$new_path" = x \
36995         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36996         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36997       new_path="$path"
36998 
36999   windows_path="$new_path"
37000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37001     unix_path=`$CYGPATH -u "$windows_path"`
37002     new_path="$unix_path"
37003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37005     new_path="$unix_path"
37006   fi
37007 
37008     fi
37009 
37010     if test "x$new_path" = x; then
37011       # It's still not found. Now this is an unrecoverable error.
37012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37013 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37014       has_space=`$ECHO "$complete" | $GREP " "`
37015       if test "x$has_space" != x; then
37016         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37017 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37018       fi
37019       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37020     fi
37021   fi
37022 
37023   # Now new_path has a complete unix path to the binary
37024   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37025     # Keep paths in /bin as-is, but remove trailing .exe if any
37026     new_path="${new_path/%.exe/}"
37027     # Do not save /bin paths to all_fixpath_prefixes!
37028   else
37029     # Not in mixed or Windows style, start by that.
37030     new_path=`cmd //c echo $new_path`
37031 
37032   input_path="$new_path"
37033   # Check if we need to convert this using DOS-style short mode. If the path
37034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37035   # take no chances and rewrite it.
37036   # Note: m4 eats our [], so we need to use [ and ] instead.
37037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37038   if test "x$has_forbidden_chars" != x; then
37039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37041   fi
37042 
37043     # Output is in $new_path
37044 
37045   windows_path="$new_path"
37046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37047     unix_path=`$CYGPATH -u "$windows_path"`
37048     new_path="$unix_path"
37049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37051     new_path="$unix_path"
37052   fi
37053 
37054     # remove trailing .exe if any
37055     new_path="${new_path/%.exe/}"
37056 
37057     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37058     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37059   fi
37060 
37061     else
37062       # We're on a unix platform. Hooray! :)
37063       # First separate the path from the arguments. This will split at the first
37064       # space.
37065       complete="$AS"
37066       path="${complete%% *}"
37067       tmp="$complete EOL"
37068       arguments="${tmp#* }"
37069 
37070       # Cannot rely on the command "which" here since it doesn't always work.
37071       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37072       if test -z "$is_absolute_path"; then
37073         # Path to executable is not absolute. Find it.
37074         IFS_save="$IFS"
37075         IFS=:
37076         for p in $PATH; do
37077           if test -f "$p/$path" && test -x "$p/$path"; then
37078             new_path="$p/$path"
37079             break
37080           fi
37081         done
37082         IFS="$IFS_save"
37083       else
37084         # This is an absolute path, we can use it without further modifications.
37085         new_path="$path"
37086       fi
37087 
37088       if test "x$new_path" = x; then
37089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37090 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37091         has_space=`$ECHO "$complete" | $GREP " "`
37092         if test "x$has_space" != x; then
37093           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37094 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37095         fi
37096         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37097       fi
37098     fi
37099 
37100     # Now join together the path and the arguments once again
37101     if test "x$arguments" != xEOL; then
37102       new_complete="$new_path ${arguments% *}"
37103     else
37104       new_complete="$new_path"
37105     fi
37106 
37107     if test "x$complete" != "x$new_complete"; then
37108       AS="$new_complete"
37109       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37110 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37111     fi
37112   fi
37113 
37114     if test "x$AS" = x; then
37115       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37116     fi
37117   else
37118     # FIXME: is this correct for microsoft?
37119     AS="$CC -c"
37120   fi
37121 
37122 
37123   #
37124   # Setup the archiver (AR)
37125   #
37126   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37127     # The corresponding ar tool is lib.exe (used to create static libraries)
37128     # Extract the first word of "lib", so it can be a program name with args.
37129 set dummy lib; ac_word=$2
37130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37131 $as_echo_n "checking for $ac_word... " >&6; }
37132 if ${ac_cv_prog_AR+:} false; then :
37133   $as_echo_n "(cached) " >&6
37134 else
37135   if test -n "$AR"; then
37136   ac_cv_prog_AR="$AR" # Let the user override the test.
37137 else
37138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37139 for as_dir in $PATH
37140 do
37141   IFS=$as_save_IFS
37142   test -z "$as_dir" && as_dir=.
37143     for ac_exec_ext in '' $ac_executable_extensions; do
37144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37145     ac_cv_prog_AR="lib"
37146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37147     break 2
37148   fi
37149 done
37150   done
37151 IFS=$as_save_IFS
37152 
37153 fi
37154 fi
37155 AR=$ac_cv_prog_AR
37156 if test -n "$AR"; then
37157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37158 $as_echo "$AR" >&6; }
37159 else
37160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37161 $as_echo "no" >&6; }
37162 fi
37163 
37164 
37165   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37166 
37167 
37168   # Publish this variable in the help.
37169 
37170 
37171   if [ -z "${AR+x}" ]; then
37172     # The variable is not set by user, try to locate tool using the code snippet
37173     if test -n "$ac_tool_prefix"; then
37174   for ac_prog in ar gcc-ar
37175   do
37176     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37177 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37179 $as_echo_n "checking for $ac_word... " >&6; }
37180 if ${ac_cv_prog_AR+:} false; then :
37181   $as_echo_n "(cached) " >&6
37182 else
37183   if test -n "$AR"; then
37184   ac_cv_prog_AR="$AR" # Let the user override the test.
37185 else
37186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37187 for as_dir in $PATH
37188 do
37189   IFS=$as_save_IFS
37190   test -z "$as_dir" && as_dir=.
37191     for ac_exec_ext in '' $ac_executable_extensions; do
37192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37193     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37195     break 2
37196   fi
37197 done
37198   done
37199 IFS=$as_save_IFS
37200 
37201 fi
37202 fi
37203 AR=$ac_cv_prog_AR
37204 if test -n "$AR"; then
37205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37206 $as_echo "$AR" >&6; }
37207 else
37208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37209 $as_echo "no" >&6; }
37210 fi
37211 
37212 
37213     test -n "$AR" && break
37214   done
37215 fi
37216 if test -z "$AR"; then
37217   ac_ct_AR=$AR
37218   for ac_prog in ar gcc-ar
37219 do
37220   # Extract the first word of "$ac_prog", so it can be a program name with args.
37221 set dummy $ac_prog; ac_word=$2
37222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223 $as_echo_n "checking for $ac_word... " >&6; }
37224 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37225   $as_echo_n "(cached) " >&6
37226 else
37227   if test -n "$ac_ct_AR"; then
37228   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37229 else
37230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231 for as_dir in $PATH
37232 do
37233   IFS=$as_save_IFS
37234   test -z "$as_dir" && as_dir=.
37235     for ac_exec_ext in '' $ac_executable_extensions; do
37236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237     ac_cv_prog_ac_ct_AR="$ac_prog"
37238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239     break 2
37240   fi
37241 done
37242   done
37243 IFS=$as_save_IFS
37244 
37245 fi
37246 fi
37247 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37248 if test -n "$ac_ct_AR"; then
37249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37250 $as_echo "$ac_ct_AR" >&6; }
37251 else
37252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37253 $as_echo "no" >&6; }
37254 fi
37255 
37256 
37257   test -n "$ac_ct_AR" && break
37258 done
37259 
37260   if test "x$ac_ct_AR" = x; then
37261     AR=""
37262   else
37263     case $cross_compiling:$ac_tool_warned in
37264 yes:)
37265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37266 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37267 ac_tool_warned=yes ;;
37268 esac
37269     AR=$ac_ct_AR
37270   fi
37271 fi
37272 
37273   else
37274     # The variable is set, but is it from the command line or the environment?
37275 
37276     # Try to remove the string !AR! from our list.
37277     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37278     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37279       # If it failed, the variable was not from the command line. Ignore it,
37280       # but warn the user (except for BASH, which is always set by the calling BASH).
37281       if test "xAR" != xBASH; then
37282         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37283 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37284       fi
37285       # Try to locate tool using the code snippet
37286       if test -n "$ac_tool_prefix"; then
37287   for ac_prog in ar gcc-ar
37288   do
37289     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37290 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37292 $as_echo_n "checking for $ac_word... " >&6; }
37293 if ${ac_cv_prog_AR+:} false; then :
37294   $as_echo_n "(cached) " >&6
37295 else
37296   if test -n "$AR"; then
37297   ac_cv_prog_AR="$AR" # Let the user override the test.
37298 else
37299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37300 for as_dir in $PATH
37301 do
37302   IFS=$as_save_IFS
37303   test -z "$as_dir" && as_dir=.
37304     for ac_exec_ext in '' $ac_executable_extensions; do
37305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37306     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37308     break 2
37309   fi
37310 done
37311   done
37312 IFS=$as_save_IFS
37313 
37314 fi
37315 fi
37316 AR=$ac_cv_prog_AR
37317 if test -n "$AR"; then
37318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37319 $as_echo "$AR" >&6; }
37320 else
37321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37322 $as_echo "no" >&6; }
37323 fi
37324 
37325 
37326     test -n "$AR" && break
37327   done
37328 fi
37329 if test -z "$AR"; then
37330   ac_ct_AR=$AR
37331   for ac_prog in ar gcc-ar
37332 do
37333   # Extract the first word of "$ac_prog", so it can be a program name with args.
37334 set dummy $ac_prog; ac_word=$2
37335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37336 $as_echo_n "checking for $ac_word... " >&6; }
37337 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37338   $as_echo_n "(cached) " >&6
37339 else
37340   if test -n "$ac_ct_AR"; then
37341   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37342 else
37343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37344 for as_dir in $PATH
37345 do
37346   IFS=$as_save_IFS
37347   test -z "$as_dir" && as_dir=.
37348     for ac_exec_ext in '' $ac_executable_extensions; do
37349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37350     ac_cv_prog_ac_ct_AR="$ac_prog"
37351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37352     break 2
37353   fi
37354 done
37355   done
37356 IFS=$as_save_IFS
37357 
37358 fi
37359 fi
37360 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37361 if test -n "$ac_ct_AR"; then
37362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37363 $as_echo "$ac_ct_AR" >&6; }
37364 else
37365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37366 $as_echo "no" >&6; }
37367 fi
37368 
37369 
37370   test -n "$ac_ct_AR" && break
37371 done
37372 
37373   if test "x$ac_ct_AR" = x; then
37374     AR=""
37375   else
37376     case $cross_compiling:$ac_tool_warned in
37377 yes:)
37378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37379 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37380 ac_tool_warned=yes ;;
37381 esac
37382     AR=$ac_ct_AR
37383   fi
37384 fi
37385 
37386     else
37387       # If it succeeded, then it was overridden by the user. We will use it
37388       # for the tool.
37389 
37390       # First remove it from the list of overridden variables, so we can test
37391       # for unknown variables in the end.
37392       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37393 
37394       # Check if we try to supply an empty value
37395       if test "x$AR" = x; then
37396         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37397 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37398         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37399 $as_echo_n "checking for AR... " >&6; }
37400         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37401 $as_echo "disabled" >&6; }
37402       else
37403         # Check if the provided tool contains a complete path.
37404         tool_specified="$AR"
37405         tool_basename="${tool_specified##*/}"
37406         if test "x$tool_basename" = "x$tool_specified"; then
37407           # A command without a complete path is provided, search $PATH.
37408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37409 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37410           # Extract the first word of "$tool_basename", so it can be a program name with args.
37411 set dummy $tool_basename; ac_word=$2
37412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37413 $as_echo_n "checking for $ac_word... " >&6; }
37414 if ${ac_cv_path_AR+:} false; then :
37415   $as_echo_n "(cached) " >&6
37416 else
37417   case $AR in
37418   [\\/]* | ?:[\\/]*)
37419   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37420   ;;
37421   *)
37422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37423 for as_dir in $PATH
37424 do
37425   IFS=$as_save_IFS
37426   test -z "$as_dir" && as_dir=.
37427     for ac_exec_ext in '' $ac_executable_extensions; do
37428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37429     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37431     break 2
37432   fi
37433 done
37434   done
37435 IFS=$as_save_IFS
37436 
37437   ;;
37438 esac
37439 fi
37440 AR=$ac_cv_path_AR
37441 if test -n "$AR"; then
37442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37443 $as_echo "$AR" >&6; }
37444 else
37445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37446 $as_echo "no" >&6; }
37447 fi
37448 
37449 
37450           if test "x$AR" = x; then
37451             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37452           fi
37453         else
37454           # Otherwise we believe it is a complete path. Use it as it is.
37455           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37456 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37457           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37458 $as_echo_n "checking for AR... " >&6; }
37459           if test ! -x "$tool_specified"; then
37460             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37461 $as_echo "not found" >&6; }
37462             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37463           fi
37464           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37465 $as_echo "$tool_specified" >&6; }
37466         fi
37467       fi
37468     fi
37469 
37470   fi
37471 
37472 
37473   else
37474 
37475 
37476   # Publish this variable in the help.
37477 
37478 
37479   if [ -z "${AR+x}" ]; then
37480     # The variable is not set by user, try to locate tool using the code snippet
37481     if test -n "$ac_tool_prefix"; then
37482   for ac_prog in ar
37483   do
37484     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37485 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37487 $as_echo_n "checking for $ac_word... " >&6; }
37488 if ${ac_cv_prog_AR+:} false; then :
37489   $as_echo_n "(cached) " >&6
37490 else
37491   if test -n "$AR"; then
37492   ac_cv_prog_AR="$AR" # Let the user override the test.
37493 else
37494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37495 for as_dir in $PATH
37496 do
37497   IFS=$as_save_IFS
37498   test -z "$as_dir" && as_dir=.
37499     for ac_exec_ext in '' $ac_executable_extensions; do
37500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37501     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37503     break 2
37504   fi
37505 done
37506   done
37507 IFS=$as_save_IFS
37508 
37509 fi
37510 fi
37511 AR=$ac_cv_prog_AR
37512 if test -n "$AR"; then
37513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37514 $as_echo "$AR" >&6; }
37515 else
37516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37517 $as_echo "no" >&6; }
37518 fi
37519 
37520 
37521     test -n "$AR" && break
37522   done
37523 fi
37524 if test -z "$AR"; then
37525   ac_ct_AR=$AR
37526   for ac_prog in ar
37527 do
37528   # Extract the first word of "$ac_prog", so it can be a program name with args.
37529 set dummy $ac_prog; ac_word=$2
37530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37531 $as_echo_n "checking for $ac_word... " >&6; }
37532 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37533   $as_echo_n "(cached) " >&6
37534 else
37535   if test -n "$ac_ct_AR"; then
37536   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37537 else
37538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37539 for as_dir in $PATH
37540 do
37541   IFS=$as_save_IFS
37542   test -z "$as_dir" && as_dir=.
37543     for ac_exec_ext in '' $ac_executable_extensions; do
37544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37545     ac_cv_prog_ac_ct_AR="$ac_prog"
37546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547     break 2
37548   fi
37549 done
37550   done
37551 IFS=$as_save_IFS
37552 
37553 fi
37554 fi
37555 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37556 if test -n "$ac_ct_AR"; then
37557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37558 $as_echo "$ac_ct_AR" >&6; }
37559 else
37560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561 $as_echo "no" >&6; }
37562 fi
37563 
37564 
37565   test -n "$ac_ct_AR" && break
37566 done
37567 
37568   if test "x$ac_ct_AR" = x; then
37569     AR=""
37570   else
37571     case $cross_compiling:$ac_tool_warned in
37572 yes:)
37573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37574 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37575 ac_tool_warned=yes ;;
37576 esac
37577     AR=$ac_ct_AR
37578   fi
37579 fi
37580 
37581   else
37582     # The variable is set, but is it from the command line or the environment?
37583 
37584     # Try to remove the string !AR! from our list.
37585     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37586     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37587       # If it failed, the variable was not from the command line. Ignore it,
37588       # but warn the user (except for BASH, which is always set by the calling BASH).
37589       if test "xAR" != xBASH; then
37590         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37591 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37592       fi
37593       # Try to locate tool using the code snippet
37594       if test -n "$ac_tool_prefix"; then
37595   for ac_prog in ar
37596   do
37597     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37598 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37600 $as_echo_n "checking for $ac_word... " >&6; }
37601 if ${ac_cv_prog_AR+:} false; then :
37602   $as_echo_n "(cached) " >&6
37603 else
37604   if test -n "$AR"; then
37605   ac_cv_prog_AR="$AR" # Let the user override the test.
37606 else
37607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37608 for as_dir in $PATH
37609 do
37610   IFS=$as_save_IFS
37611   test -z "$as_dir" && as_dir=.
37612     for ac_exec_ext in '' $ac_executable_extensions; do
37613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37614     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37616     break 2
37617   fi
37618 done
37619   done
37620 IFS=$as_save_IFS
37621 
37622 fi
37623 fi
37624 AR=$ac_cv_prog_AR
37625 if test -n "$AR"; then
37626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37627 $as_echo "$AR" >&6; }
37628 else
37629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37630 $as_echo "no" >&6; }
37631 fi
37632 
37633 
37634     test -n "$AR" && break
37635   done
37636 fi
37637 if test -z "$AR"; then
37638   ac_ct_AR=$AR
37639   for ac_prog in ar
37640 do
37641   # Extract the first word of "$ac_prog", so it can be a program name with args.
37642 set dummy $ac_prog; ac_word=$2
37643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37644 $as_echo_n "checking for $ac_word... " >&6; }
37645 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37646   $as_echo_n "(cached) " >&6
37647 else
37648   if test -n "$ac_ct_AR"; then
37649   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37650 else
37651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37652 for as_dir in $PATH
37653 do
37654   IFS=$as_save_IFS
37655   test -z "$as_dir" && as_dir=.
37656     for ac_exec_ext in '' $ac_executable_extensions; do
37657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37658     ac_cv_prog_ac_ct_AR="$ac_prog"
37659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37660     break 2
37661   fi
37662 done
37663   done
37664 IFS=$as_save_IFS
37665 
37666 fi
37667 fi
37668 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37669 if test -n "$ac_ct_AR"; then
37670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37671 $as_echo "$ac_ct_AR" >&6; }
37672 else
37673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674 $as_echo "no" >&6; }
37675 fi
37676 
37677 
37678   test -n "$ac_ct_AR" && break
37679 done
37680 
37681   if test "x$ac_ct_AR" = x; then
37682     AR=""
37683   else
37684     case $cross_compiling:$ac_tool_warned in
37685 yes:)
37686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37687 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37688 ac_tool_warned=yes ;;
37689 esac
37690     AR=$ac_ct_AR
37691   fi
37692 fi
37693 
37694     else
37695       # If it succeeded, then it was overridden by the user. We will use it
37696       # for the tool.
37697 
37698       # First remove it from the list of overridden variables, so we can test
37699       # for unknown variables in the end.
37700       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37701 
37702       # Check if we try to supply an empty value
37703       if test "x$AR" = x; then
37704         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37705 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37706         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37707 $as_echo_n "checking for AR... " >&6; }
37708         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37709 $as_echo "disabled" >&6; }
37710       else
37711         # Check if the provided tool contains a complete path.
37712         tool_specified="$AR"
37713         tool_basename="${tool_specified##*/}"
37714         if test "x$tool_basename" = "x$tool_specified"; then
37715           # A command without a complete path is provided, search $PATH.
37716           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37717 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37718           # Extract the first word of "$tool_basename", so it can be a program name with args.
37719 set dummy $tool_basename; ac_word=$2
37720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37721 $as_echo_n "checking for $ac_word... " >&6; }
37722 if ${ac_cv_path_AR+:} false; then :
37723   $as_echo_n "(cached) " >&6
37724 else
37725   case $AR in
37726   [\\/]* | ?:[\\/]*)
37727   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37728   ;;
37729   *)
37730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37731 for as_dir in $PATH
37732 do
37733   IFS=$as_save_IFS
37734   test -z "$as_dir" && as_dir=.
37735     for ac_exec_ext in '' $ac_executable_extensions; do
37736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37737     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37739     break 2
37740   fi
37741 done
37742   done
37743 IFS=$as_save_IFS
37744 
37745   ;;
37746 esac
37747 fi
37748 AR=$ac_cv_path_AR
37749 if test -n "$AR"; then
37750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37751 $as_echo "$AR" >&6; }
37752 else
37753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754 $as_echo "no" >&6; }
37755 fi
37756 
37757 
37758           if test "x$AR" = x; then
37759             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37760           fi
37761         else
37762           # Otherwise we believe it is a complete path. Use it as it is.
37763           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37764 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37765           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37766 $as_echo_n "checking for AR... " >&6; }
37767           if test ! -x "$tool_specified"; then
37768             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37769 $as_echo "not found" >&6; }
37770             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37771           fi
37772           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37773 $as_echo "$tool_specified" >&6; }
37774         fi
37775       fi
37776     fi
37777 
37778   fi
37779 
37780 
37781   fi
37782 
37783   # Only process if variable expands to non-empty
37784 
37785   if test "x$AR" != x; then
37786     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37787 
37788   # First separate the path from the arguments. This will split at the first
37789   # space.
37790   complete="$AR"
37791   path="${complete%% *}"
37792   tmp="$complete EOL"
37793   arguments="${tmp#* }"
37794 
37795   # Input might be given as Windows format, start by converting to
37796   # unix format.
37797   new_path=`$CYGPATH -u "$path"`
37798 
37799   # Now try to locate executable using which
37800   new_path=`$WHICH "$new_path" 2> /dev/null`
37801   # bat and cmd files are not always considered executable in cygwin causing which
37802   # to not find them
37803   if test "x$new_path" = x \
37804       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37805       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37806     new_path=`$CYGPATH -u "$path"`
37807   fi
37808   if test "x$new_path" = x; then
37809     # Oops. Which didn't find the executable.
37810     # The splitting of arguments from the executable at a space might have been incorrect,
37811     # since paths with space are more likely in Windows. Give it another try with the whole
37812     # argument.
37813     path="$complete"
37814     arguments="EOL"
37815     new_path=`$CYGPATH -u "$path"`
37816     new_path=`$WHICH "$new_path" 2> /dev/null`
37817     # bat and cmd files are not always considered executable in cygwin causing which
37818     # to not find them
37819     if test "x$new_path" = x \
37820         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37821         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37822       new_path=`$CYGPATH -u "$path"`
37823     fi
37824     if test "x$new_path" = x; then
37825       # It's still not found. Now this is an unrecoverable error.
37826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37827 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37828       has_space=`$ECHO "$complete" | $GREP " "`
37829       if test "x$has_space" != x; then
37830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37832       fi
37833       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37834     fi
37835   fi
37836 
37837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37840   # "foo.exe" is OK but "foo" is an error.
37841   #
37842   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37843   # It is also a way to make sure we got the proper file name for the real test later on.
37844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37845   if test "x$test_shortpath" = x; then
37846     # Short path failed, file does not exist as specified.
37847     # Try adding .exe or .cmd
37848     if test -f "${new_path}.exe"; then
37849       input_to_shortpath="${new_path}.exe"
37850     elif test -f "${new_path}.cmd"; then
37851       input_to_shortpath="${new_path}.cmd"
37852     else
37853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37854 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37855       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37856 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37857       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37858     fi
37859   else
37860     input_to_shortpath="$new_path"
37861   fi
37862 
37863   # Call helper function which possibly converts this using DOS-style short mode.
37864   # If so, the updated path is stored in $new_path.
37865   new_path="$input_to_shortpath"
37866 
37867   input_path="$input_to_shortpath"
37868   # Check if we need to convert this using DOS-style short mode. If the path
37869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37870   # take no chances and rewrite it.
37871   # Note: m4 eats our [], so we need to use [ and ] instead.
37872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37873   if test "x$has_forbidden_chars" != x; then
37874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37878       # Going to short mode and back again did indeed matter. Since short mode is
37879       # case insensitive, let's make it lowercase to improve readability.
37880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37881       # Now convert it back to Unix-style (cygpath)
37882       input_path=`$CYGPATH -u "$shortmode_path"`
37883       new_path="$input_path"
37884     fi
37885   fi
37886 
37887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37888   if test "x$test_cygdrive_prefix" = x; then
37889     # As a simple fix, exclude /usr/bin since it's not a real path.
37890     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37892       # a path prefixed by /cygdrive for fixpath to work.
37893       new_path="$CYGWIN_ROOT_PATH$input_path"
37894     fi
37895   fi
37896 
37897   # remove trailing .exe if any
37898   new_path="${new_path/%.exe/}"
37899 
37900     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37901 
37902   # First separate the path from the arguments. This will split at the first
37903   # space.
37904   complete="$AR"
37905   path="${complete%% *}"
37906   tmp="$complete EOL"
37907   arguments="${tmp#* }"
37908 
37909   # Input might be given as Windows format, start by converting to
37910   # unix format.
37911   new_path="$path"
37912 
37913   windows_path="$new_path"
37914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37915     unix_path=`$CYGPATH -u "$windows_path"`
37916     new_path="$unix_path"
37917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37919     new_path="$unix_path"
37920   fi
37921 
37922 
37923   # Now try to locate executable using which
37924   new_path=`$WHICH "$new_path" 2> /dev/null`
37925 
37926   if test "x$new_path" = x; then
37927     # Oops. Which didn't find the executable.
37928     # The splitting of arguments from the executable at a space might have been incorrect,
37929     # since paths with space are more likely in Windows. Give it another try with the whole
37930     # argument.
37931     path="$complete"
37932     arguments="EOL"
37933     new_path="$path"
37934 
37935   windows_path="$new_path"
37936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37937     unix_path=`$CYGPATH -u "$windows_path"`
37938     new_path="$unix_path"
37939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37941     new_path="$unix_path"
37942   fi
37943 
37944 
37945     new_path=`$WHICH "$new_path" 2> /dev/null`
37946     # bat and cmd files are not always considered executable in MSYS causing which
37947     # to not find them
37948     if test "x$new_path" = x \
37949         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37950         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37951       new_path="$path"
37952 
37953   windows_path="$new_path"
37954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955     unix_path=`$CYGPATH -u "$windows_path"`
37956     new_path="$unix_path"
37957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959     new_path="$unix_path"
37960   fi
37961 
37962     fi
37963 
37964     if test "x$new_path" = x; then
37965       # It's still not found. Now this is an unrecoverable error.
37966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37967 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37968       has_space=`$ECHO "$complete" | $GREP " "`
37969       if test "x$has_space" != x; then
37970         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37971 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37972       fi
37973       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37974     fi
37975   fi
37976 
37977   # Now new_path has a complete unix path to the binary
37978   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37979     # Keep paths in /bin as-is, but remove trailing .exe if any
37980     new_path="${new_path/%.exe/}"
37981     # Do not save /bin paths to all_fixpath_prefixes!
37982   else
37983     # Not in mixed or Windows style, start by that.
37984     new_path=`cmd //c echo $new_path`
37985 
37986   input_path="$new_path"
37987   # Check if we need to convert this using DOS-style short mode. If the path
37988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37989   # take no chances and rewrite it.
37990   # Note: m4 eats our [], so we need to use [ and ] instead.
37991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37992   if test "x$has_forbidden_chars" != x; then
37993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37995   fi
37996 
37997     # Output is in $new_path
37998 
37999   windows_path="$new_path"
38000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38001     unix_path=`$CYGPATH -u "$windows_path"`
38002     new_path="$unix_path"
38003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38005     new_path="$unix_path"
38006   fi
38007 
38008     # remove trailing .exe if any
38009     new_path="${new_path/%.exe/}"
38010 
38011     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38012     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38013   fi
38014 
38015     else
38016       # We're on a unix platform. Hooray! :)
38017       # First separate the path from the arguments. This will split at the first
38018       # space.
38019       complete="$AR"
38020       path="${complete%% *}"
38021       tmp="$complete EOL"
38022       arguments="${tmp#* }"
38023 
38024       # Cannot rely on the command "which" here since it doesn't always work.
38025       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38026       if test -z "$is_absolute_path"; then
38027         # Path to executable is not absolute. Find it.
38028         IFS_save="$IFS"
38029         IFS=:
38030         for p in $PATH; do
38031           if test -f "$p/$path" && test -x "$p/$path"; then
38032             new_path="$p/$path"
38033             break
38034           fi
38035         done
38036         IFS="$IFS_save"
38037       else
38038         # This is an absolute path, we can use it without further modifications.
38039         new_path="$path"
38040       fi
38041 
38042       if test "x$new_path" = x; then
38043         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38044 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38045         has_space=`$ECHO "$complete" | $GREP " "`
38046         if test "x$has_space" != x; then
38047           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38048 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38049         fi
38050         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38051       fi
38052     fi
38053 
38054     # Now join together the path and the arguments once again
38055     if test "x$arguments" != xEOL; then
38056       new_complete="$new_path ${arguments% *}"
38057     else
38058       new_complete="$new_path"
38059     fi
38060 
38061     if test "x$complete" != "x$new_complete"; then
38062       AR="$new_complete"
38063       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38064 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38065     fi
38066   fi
38067 
38068 
38069 
38070   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38071 
38072 
38073   # Publish this variable in the help.
38074 
38075 
38076   if [ -z "${LIPO+x}" ]; then
38077     # The variable is not set by user, try to locate tool using the code snippet
38078     for ac_prog in lipo
38079 do
38080   # Extract the first word of "$ac_prog", so it can be a program name with args.
38081 set dummy $ac_prog; ac_word=$2
38082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38083 $as_echo_n "checking for $ac_word... " >&6; }
38084 if ${ac_cv_path_LIPO+:} false; then :
38085   $as_echo_n "(cached) " >&6
38086 else
38087   case $LIPO in
38088   [\\/]* | ?:[\\/]*)
38089   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38090   ;;
38091   *)
38092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38093 for as_dir in $PATH
38094 do
38095   IFS=$as_save_IFS
38096   test -z "$as_dir" && as_dir=.
38097     for ac_exec_ext in '' $ac_executable_extensions; do
38098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38099     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38101     break 2
38102   fi
38103 done
38104   done
38105 IFS=$as_save_IFS
38106 
38107   ;;
38108 esac
38109 fi
38110 LIPO=$ac_cv_path_LIPO
38111 if test -n "$LIPO"; then
38112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38113 $as_echo "$LIPO" >&6; }
38114 else
38115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38116 $as_echo "no" >&6; }
38117 fi
38118 
38119 
38120   test -n "$LIPO" && break
38121 done
38122 
38123   else
38124     # The variable is set, but is it from the command line or the environment?
38125 
38126     # Try to remove the string !LIPO! from our list.
38127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38129       # If it failed, the variable was not from the command line. Ignore it,
38130       # but warn the user (except for BASH, which is always set by the calling BASH).
38131       if test "xLIPO" != xBASH; then
38132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38133 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38134       fi
38135       # Try to locate tool using the code snippet
38136       for ac_prog in lipo
38137 do
38138   # Extract the first word of "$ac_prog", so it can be a program name with args.
38139 set dummy $ac_prog; ac_word=$2
38140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38141 $as_echo_n "checking for $ac_word... " >&6; }
38142 if ${ac_cv_path_LIPO+:} false; then :
38143   $as_echo_n "(cached) " >&6
38144 else
38145   case $LIPO in
38146   [\\/]* | ?:[\\/]*)
38147   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38148   ;;
38149   *)
38150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38151 for as_dir in $PATH
38152 do
38153   IFS=$as_save_IFS
38154   test -z "$as_dir" && as_dir=.
38155     for ac_exec_ext in '' $ac_executable_extensions; do
38156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38157     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38159     break 2
38160   fi
38161 done
38162   done
38163 IFS=$as_save_IFS
38164 
38165   ;;
38166 esac
38167 fi
38168 LIPO=$ac_cv_path_LIPO
38169 if test -n "$LIPO"; then
38170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38171 $as_echo "$LIPO" >&6; }
38172 else
38173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38174 $as_echo "no" >&6; }
38175 fi
38176 
38177 
38178   test -n "$LIPO" && break
38179 done
38180 
38181     else
38182       # If it succeeded, then it was overridden by the user. We will use it
38183       # for the tool.
38184 
38185       # First remove it from the list of overridden variables, so we can test
38186       # for unknown variables in the end.
38187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38188 
38189       # Check if we try to supply an empty value
38190       if test "x$LIPO" = x; then
38191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38192 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38194 $as_echo_n "checking for LIPO... " >&6; }
38195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38196 $as_echo "disabled" >&6; }
38197       else
38198         # Check if the provided tool contains a complete path.
38199         tool_specified="$LIPO"
38200         tool_basename="${tool_specified##*/}"
38201         if test "x$tool_basename" = "x$tool_specified"; then
38202           # A command without a complete path is provided, search $PATH.
38203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38204 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38205           # Extract the first word of "$tool_basename", so it can be a program name with args.
38206 set dummy $tool_basename; ac_word=$2
38207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208 $as_echo_n "checking for $ac_word... " >&6; }
38209 if ${ac_cv_path_LIPO+:} false; then :
38210   $as_echo_n "(cached) " >&6
38211 else
38212   case $LIPO in
38213   [\\/]* | ?:[\\/]*)
38214   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38215   ;;
38216   *)
38217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38218 for as_dir in $PATH
38219 do
38220   IFS=$as_save_IFS
38221   test -z "$as_dir" && as_dir=.
38222     for ac_exec_ext in '' $ac_executable_extensions; do
38223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38224     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38226     break 2
38227   fi
38228 done
38229   done
38230 IFS=$as_save_IFS
38231 
38232   ;;
38233 esac
38234 fi
38235 LIPO=$ac_cv_path_LIPO
38236 if test -n "$LIPO"; then
38237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38238 $as_echo "$LIPO" >&6; }
38239 else
38240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38241 $as_echo "no" >&6; }
38242 fi
38243 
38244 
38245           if test "x$LIPO" = x; then
38246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38247           fi
38248         else
38249           # Otherwise we believe it is a complete path. Use it as it is.
38250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38251 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38253 $as_echo_n "checking for LIPO... " >&6; }
38254           if test ! -x "$tool_specified"; then
38255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38256 $as_echo "not found" >&6; }
38257             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38258           fi
38259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38260 $as_echo "$tool_specified" >&6; }
38261         fi
38262       fi
38263     fi
38264 
38265   fi
38266 
38267 
38268 
38269   # Only process if variable expands to non-empty
38270 
38271   if test "x$LIPO" != x; then
38272     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38273 
38274   # First separate the path from the arguments. This will split at the first
38275   # space.
38276   complete="$LIPO"
38277   path="${complete%% *}"
38278   tmp="$complete EOL"
38279   arguments="${tmp#* }"
38280 
38281   # Input might be given as Windows format, start by converting to
38282   # unix format.
38283   new_path=`$CYGPATH -u "$path"`
38284 
38285   # Now try to locate executable using which
38286   new_path=`$WHICH "$new_path" 2> /dev/null`
38287   # bat and cmd files are not always considered executable in cygwin causing which
38288   # to not find them
38289   if test "x$new_path" = x \
38290       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38291       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38292     new_path=`$CYGPATH -u "$path"`
38293   fi
38294   if test "x$new_path" = x; then
38295     # Oops. Which didn't find the executable.
38296     # The splitting of arguments from the executable at a space might have been incorrect,
38297     # since paths with space are more likely in Windows. Give it another try with the whole
38298     # argument.
38299     path="$complete"
38300     arguments="EOL"
38301     new_path=`$CYGPATH -u "$path"`
38302     new_path=`$WHICH "$new_path" 2> /dev/null`
38303     # bat and cmd files are not always considered executable in cygwin causing which
38304     # to not find them
38305     if test "x$new_path" = x \
38306         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38307         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38308       new_path=`$CYGPATH -u "$path"`
38309     fi
38310     if test "x$new_path" = x; then
38311       # It's still not found. Now this is an unrecoverable error.
38312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38313 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38314       has_space=`$ECHO "$complete" | $GREP " "`
38315       if test "x$has_space" != x; then
38316         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38317 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38318       fi
38319       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38320     fi
38321   fi
38322 
38323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38326   # "foo.exe" is OK but "foo" is an error.
38327   #
38328   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38329   # It is also a way to make sure we got the proper file name for the real test later on.
38330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38331   if test "x$test_shortpath" = x; then
38332     # Short path failed, file does not exist as specified.
38333     # Try adding .exe or .cmd
38334     if test -f "${new_path}.exe"; then
38335       input_to_shortpath="${new_path}.exe"
38336     elif test -f "${new_path}.cmd"; then
38337       input_to_shortpath="${new_path}.cmd"
38338     else
38339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38340 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38341       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38342 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38343       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38344     fi
38345   else
38346     input_to_shortpath="$new_path"
38347   fi
38348 
38349   # Call helper function which possibly converts this using DOS-style short mode.
38350   # If so, the updated path is stored in $new_path.
38351   new_path="$input_to_shortpath"
38352 
38353   input_path="$input_to_shortpath"
38354   # Check if we need to convert this using DOS-style short mode. If the path
38355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38356   # take no chances and rewrite it.
38357   # Note: m4 eats our [], so we need to use [ and ] instead.
38358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38359   if test "x$has_forbidden_chars" != x; then
38360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38364       # Going to short mode and back again did indeed matter. Since short mode is
38365       # case insensitive, let's make it lowercase to improve readability.
38366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38367       # Now convert it back to Unix-style (cygpath)
38368       input_path=`$CYGPATH -u "$shortmode_path"`
38369       new_path="$input_path"
38370     fi
38371   fi
38372 
38373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38374   if test "x$test_cygdrive_prefix" = x; then
38375     # As a simple fix, exclude /usr/bin since it's not a real path.
38376     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38378       # a path prefixed by /cygdrive for fixpath to work.
38379       new_path="$CYGWIN_ROOT_PATH$input_path"
38380     fi
38381   fi
38382 
38383   # remove trailing .exe if any
38384   new_path="${new_path/%.exe/}"
38385 
38386     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38387 
38388   # First separate the path from the arguments. This will split at the first
38389   # space.
38390   complete="$LIPO"
38391   path="${complete%% *}"
38392   tmp="$complete EOL"
38393   arguments="${tmp#* }"
38394 
38395   # Input might be given as Windows format, start by converting to
38396   # unix format.
38397   new_path="$path"
38398 
38399   windows_path="$new_path"
38400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38401     unix_path=`$CYGPATH -u "$windows_path"`
38402     new_path="$unix_path"
38403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38405     new_path="$unix_path"
38406   fi
38407 
38408 
38409   # Now try to locate executable using which
38410   new_path=`$WHICH "$new_path" 2> /dev/null`
38411 
38412   if test "x$new_path" = x; then
38413     # Oops. Which didn't find the executable.
38414     # The splitting of arguments from the executable at a space might have been incorrect,
38415     # since paths with space are more likely in Windows. Give it another try with the whole
38416     # argument.
38417     path="$complete"
38418     arguments="EOL"
38419     new_path="$path"
38420 
38421   windows_path="$new_path"
38422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38423     unix_path=`$CYGPATH -u "$windows_path"`
38424     new_path="$unix_path"
38425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38427     new_path="$unix_path"
38428   fi
38429 
38430 
38431     new_path=`$WHICH "$new_path" 2> /dev/null`
38432     # bat and cmd files are not always considered executable in MSYS causing which
38433     # to not find them
38434     if test "x$new_path" = x \
38435         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38436         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38437       new_path="$path"
38438 
38439   windows_path="$new_path"
38440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38441     unix_path=`$CYGPATH -u "$windows_path"`
38442     new_path="$unix_path"
38443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38445     new_path="$unix_path"
38446   fi
38447 
38448     fi
38449 
38450     if test "x$new_path" = x; then
38451       # It's still not found. Now this is an unrecoverable error.
38452       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38453 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38454       has_space=`$ECHO "$complete" | $GREP " "`
38455       if test "x$has_space" != x; then
38456         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38457 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38458       fi
38459       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38460     fi
38461   fi
38462 
38463   # Now new_path has a complete unix path to the binary
38464   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38465     # Keep paths in /bin as-is, but remove trailing .exe if any
38466     new_path="${new_path/%.exe/}"
38467     # Do not save /bin paths to all_fixpath_prefixes!
38468   else
38469     # Not in mixed or Windows style, start by that.
38470     new_path=`cmd //c echo $new_path`
38471 
38472   input_path="$new_path"
38473   # Check if we need to convert this using DOS-style short mode. If the path
38474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38475   # take no chances and rewrite it.
38476   # Note: m4 eats our [], so we need to use [ and ] instead.
38477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38478   if test "x$has_forbidden_chars" != x; then
38479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38480     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38481   fi
38482 
38483     # Output is in $new_path
38484 
38485   windows_path="$new_path"
38486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38487     unix_path=`$CYGPATH -u "$windows_path"`
38488     new_path="$unix_path"
38489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38491     new_path="$unix_path"
38492   fi
38493 
38494     # remove trailing .exe if any
38495     new_path="${new_path/%.exe/}"
38496 
38497     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38498     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38499   fi
38500 
38501     else
38502       # We're on a unix platform. Hooray! :)
38503       # First separate the path from the arguments. This will split at the first
38504       # space.
38505       complete="$LIPO"
38506       path="${complete%% *}"
38507       tmp="$complete EOL"
38508       arguments="${tmp#* }"
38509 
38510       # Cannot rely on the command "which" here since it doesn't always work.
38511       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38512       if test -z "$is_absolute_path"; then
38513         # Path to executable is not absolute. Find it.
38514         IFS_save="$IFS"
38515         IFS=:
38516         for p in $PATH; do
38517           if test -f "$p/$path" && test -x "$p/$path"; then
38518             new_path="$p/$path"
38519             break
38520           fi
38521         done
38522         IFS="$IFS_save"
38523       else
38524         # This is an absolute path, we can use it without further modifications.
38525         new_path="$path"
38526       fi
38527 
38528       if test "x$new_path" = x; then
38529         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38530 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38531         has_space=`$ECHO "$complete" | $GREP " "`
38532         if test "x$has_space" != x; then
38533           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38534 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38535         fi
38536         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38537       fi
38538     fi
38539 
38540     # Now join together the path and the arguments once again
38541     if test "x$arguments" != xEOL; then
38542       new_complete="$new_path ${arguments% *}"
38543     else
38544       new_complete="$new_path"
38545     fi
38546 
38547     if test "x$complete" != "x$new_complete"; then
38548       LIPO="$new_complete"
38549       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38550 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38551     fi
38552   fi
38553 
38554   fi
38555 
38556   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38557     # Extract the first word of "mt", so it can be a program name with args.
38558 set dummy mt; ac_word=$2
38559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38560 $as_echo_n "checking for $ac_word... " >&6; }
38561 if ${ac_cv_prog_MT+:} false; then :
38562   $as_echo_n "(cached) " >&6
38563 else
38564   if test -n "$MT"; then
38565   ac_cv_prog_MT="$MT" # Let the user override the test.
38566 else
38567   ac_prog_rejected=no
38568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38569 for as_dir in $PATH
38570 do
38571   IFS=$as_save_IFS
38572   test -z "$as_dir" && as_dir=.
38573     for ac_exec_ext in '' $ac_executable_extensions; do
38574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38575     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38576        ac_prog_rejected=yes
38577        continue
38578      fi
38579     ac_cv_prog_MT="mt"
38580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38581     break 2
38582   fi
38583 done
38584   done
38585 IFS=$as_save_IFS
38586 
38587 if test $ac_prog_rejected = yes; then
38588   # We found a bogon in the path, so make sure we never use it.
38589   set dummy $ac_cv_prog_MT
38590   shift
38591   if test $# != 0; then
38592     # We chose a different compiler from the bogus one.
38593     # However, it has the same basename, so the bogon will be chosen
38594     # first if we set MT to just the basename; use the full file name.
38595     shift
38596     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38597   fi
38598 fi
38599 fi
38600 fi
38601 MT=$ac_cv_prog_MT
38602 if test -n "$MT"; then
38603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38604 $as_echo "$MT" >&6; }
38605 else
38606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38607 $as_echo "no" >&6; }
38608 fi
38609 
38610 
38611 
38612   # Only process if variable expands to non-empty
38613 
38614   if test "x$MT" != x; then
38615     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38616 
38617   # First separate the path from the arguments. This will split at the first
38618   # space.
38619   complete="$MT"
38620   path="${complete%% *}"
38621   tmp="$complete EOL"
38622   arguments="${tmp#* }"
38623 
38624   # Input might be given as Windows format, start by converting to
38625   # unix format.
38626   new_path=`$CYGPATH -u "$path"`
38627 
38628   # Now try to locate executable using which
38629   new_path=`$WHICH "$new_path" 2> /dev/null`
38630   # bat and cmd files are not always considered executable in cygwin causing which
38631   # to not find them
38632   if test "x$new_path" = x \
38633       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38634       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38635     new_path=`$CYGPATH -u "$path"`
38636   fi
38637   if test "x$new_path" = x; then
38638     # Oops. Which didn't find the executable.
38639     # The splitting of arguments from the executable at a space might have been incorrect,
38640     # since paths with space are more likely in Windows. Give it another try with the whole
38641     # argument.
38642     path="$complete"
38643     arguments="EOL"
38644     new_path=`$CYGPATH -u "$path"`
38645     new_path=`$WHICH "$new_path" 2> /dev/null`
38646     # bat and cmd files are not always considered executable in cygwin causing which
38647     # to not find them
38648     if test "x$new_path" = x \
38649         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38650         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38651       new_path=`$CYGPATH -u "$path"`
38652     fi
38653     if test "x$new_path" = x; then
38654       # It's still not found. Now this is an unrecoverable error.
38655       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38656 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38657       has_space=`$ECHO "$complete" | $GREP " "`
38658       if test "x$has_space" != x; then
38659         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38660 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38661       fi
38662       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38663     fi
38664   fi
38665 
38666   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38667   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38668   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38669   # "foo.exe" is OK but "foo" is an error.
38670   #
38671   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38672   # It is also a way to make sure we got the proper file name for the real test later on.
38673   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38674   if test "x$test_shortpath" = x; then
38675     # Short path failed, file does not exist as specified.
38676     # Try adding .exe or .cmd
38677     if test -f "${new_path}.exe"; then
38678       input_to_shortpath="${new_path}.exe"
38679     elif test -f "${new_path}.cmd"; then
38680       input_to_shortpath="${new_path}.cmd"
38681     else
38682       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38683 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38684       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38685 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38686       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38687     fi
38688   else
38689     input_to_shortpath="$new_path"
38690   fi
38691 
38692   # Call helper function which possibly converts this using DOS-style short mode.
38693   # If so, the updated path is stored in $new_path.
38694   new_path="$input_to_shortpath"
38695 
38696   input_path="$input_to_shortpath"
38697   # Check if we need to convert this using DOS-style short mode. If the path
38698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38699   # take no chances and rewrite it.
38700   # Note: m4 eats our [], so we need to use [ and ] instead.
38701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38702   if test "x$has_forbidden_chars" != x; then
38703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38704     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38705     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38706     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38707       # Going to short mode and back again did indeed matter. Since short mode is
38708       # case insensitive, let's make it lowercase to improve readability.
38709       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38710       # Now convert it back to Unix-style (cygpath)
38711       input_path=`$CYGPATH -u "$shortmode_path"`
38712       new_path="$input_path"
38713     fi
38714   fi
38715 
38716   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38717   if test "x$test_cygdrive_prefix" = x; then
38718     # As a simple fix, exclude /usr/bin since it's not a real path.
38719     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38720       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38721       # a path prefixed by /cygdrive for fixpath to work.
38722       new_path="$CYGWIN_ROOT_PATH$input_path"
38723     fi
38724   fi
38725 
38726   # remove trailing .exe if any
38727   new_path="${new_path/%.exe/}"
38728 
38729     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38730 
38731   # First separate the path from the arguments. This will split at the first
38732   # space.
38733   complete="$MT"
38734   path="${complete%% *}"
38735   tmp="$complete EOL"
38736   arguments="${tmp#* }"
38737 
38738   # Input might be given as Windows format, start by converting to
38739   # unix format.
38740   new_path="$path"
38741 
38742   windows_path="$new_path"
38743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744     unix_path=`$CYGPATH -u "$windows_path"`
38745     new_path="$unix_path"
38746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38748     new_path="$unix_path"
38749   fi
38750 
38751 
38752   # Now try to locate executable using which
38753   new_path=`$WHICH "$new_path" 2> /dev/null`
38754 
38755   if test "x$new_path" = x; then
38756     # Oops. Which didn't find the executable.
38757     # The splitting of arguments from the executable at a space might have been incorrect,
38758     # since paths with space are more likely in Windows. Give it another try with the whole
38759     # argument.
38760     path="$complete"
38761     arguments="EOL"
38762     new_path="$path"
38763 
38764   windows_path="$new_path"
38765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38766     unix_path=`$CYGPATH -u "$windows_path"`
38767     new_path="$unix_path"
38768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38770     new_path="$unix_path"
38771   fi
38772 
38773 
38774     new_path=`$WHICH "$new_path" 2> /dev/null`
38775     # bat and cmd files are not always considered executable in MSYS causing which
38776     # to not find them
38777     if test "x$new_path" = x \
38778         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38779         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38780       new_path="$path"
38781 
38782   windows_path="$new_path"
38783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38784     unix_path=`$CYGPATH -u "$windows_path"`
38785     new_path="$unix_path"
38786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38788     new_path="$unix_path"
38789   fi
38790 
38791     fi
38792 
38793     if test "x$new_path" = x; then
38794       # It's still not found. Now this is an unrecoverable error.
38795       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38796 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38797       has_space=`$ECHO "$complete" | $GREP " "`
38798       if test "x$has_space" != x; then
38799         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38800 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38801       fi
38802       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38803     fi
38804   fi
38805 
38806   # Now new_path has a complete unix path to the binary
38807   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38808     # Keep paths in /bin as-is, but remove trailing .exe if any
38809     new_path="${new_path/%.exe/}"
38810     # Do not save /bin paths to all_fixpath_prefixes!
38811   else
38812     # Not in mixed or Windows style, start by that.
38813     new_path=`cmd //c echo $new_path`
38814 
38815   input_path="$new_path"
38816   # Check if we need to convert this using DOS-style short mode. If the path
38817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38818   # take no chances and rewrite it.
38819   # Note: m4 eats our [], so we need to use [ and ] instead.
38820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38821   if test "x$has_forbidden_chars" != x; then
38822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38823     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38824   fi
38825 
38826     # Output is in $new_path
38827 
38828   windows_path="$new_path"
38829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38830     unix_path=`$CYGPATH -u "$windows_path"`
38831     new_path="$unix_path"
38832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38834     new_path="$unix_path"
38835   fi
38836 
38837     # remove trailing .exe if any
38838     new_path="${new_path/%.exe/}"
38839 
38840     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38841     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38842   fi
38843 
38844     else
38845       # We're on a unix platform. Hooray! :)
38846       # First separate the path from the arguments. This will split at the first
38847       # space.
38848       complete="$MT"
38849       path="${complete%% *}"
38850       tmp="$complete EOL"
38851       arguments="${tmp#* }"
38852 
38853       # Cannot rely on the command "which" here since it doesn't always work.
38854       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38855       if test -z "$is_absolute_path"; then
38856         # Path to executable is not absolute. Find it.
38857         IFS_save="$IFS"
38858         IFS=:
38859         for p in $PATH; do
38860           if test -f "$p/$path" && test -x "$p/$path"; then
38861             new_path="$p/$path"
38862             break
38863           fi
38864         done
38865         IFS="$IFS_save"
38866       else
38867         # This is an absolute path, we can use it without further modifications.
38868         new_path="$path"
38869       fi
38870 
38871       if test "x$new_path" = x; then
38872         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38873 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38874         has_space=`$ECHO "$complete" | $GREP " "`
38875         if test "x$has_space" != x; then
38876           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38877 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38878         fi
38879         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38880       fi
38881     fi
38882 
38883     # Now join together the path and the arguments once again
38884     if test "x$arguments" != xEOL; then
38885       new_complete="$new_path ${arguments% *}"
38886     else
38887       new_complete="$new_path"
38888     fi
38889 
38890     if test "x$complete" != "x$new_complete"; then
38891       MT="$new_complete"
38892       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38893 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38894     fi
38895   fi
38896 
38897     # Setup the resource compiler (RC)
38898     # Extract the first word of "rc", so it can be a program name with args.
38899 set dummy rc; ac_word=$2
38900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38901 $as_echo_n "checking for $ac_word... " >&6; }
38902 if ${ac_cv_prog_RC+:} false; then :
38903   $as_echo_n "(cached) " >&6
38904 else
38905   if test -n "$RC"; then
38906   ac_cv_prog_RC="$RC" # Let the user override the test.
38907 else
38908   ac_prog_rejected=no
38909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38910 for as_dir in $PATH
38911 do
38912   IFS=$as_save_IFS
38913   test -z "$as_dir" && as_dir=.
38914     for ac_exec_ext in '' $ac_executable_extensions; do
38915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38916     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38917        ac_prog_rejected=yes
38918        continue
38919      fi
38920     ac_cv_prog_RC="rc"
38921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38922     break 2
38923   fi
38924 done
38925   done
38926 IFS=$as_save_IFS
38927 
38928 if test $ac_prog_rejected = yes; then
38929   # We found a bogon in the path, so make sure we never use it.
38930   set dummy $ac_cv_prog_RC
38931   shift
38932   if test $# != 0; then
38933     # We chose a different compiler from the bogus one.
38934     # However, it has the same basename, so the bogon will be chosen
38935     # first if we set RC to just the basename; use the full file name.
38936     shift
38937     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38938   fi
38939 fi
38940 fi
38941 fi
38942 RC=$ac_cv_prog_RC
38943 if test -n "$RC"; then
38944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38945 $as_echo "$RC" >&6; }
38946 else
38947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38948 $as_echo "no" >&6; }
38949 fi
38950 
38951 
38952 
38953   # Only process if variable expands to non-empty
38954 
38955   if test "x$RC" != x; then
38956     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38957 
38958   # First separate the path from the arguments. This will split at the first
38959   # space.
38960   complete="$RC"
38961   path="${complete%% *}"
38962   tmp="$complete EOL"
38963   arguments="${tmp#* }"
38964 
38965   # Input might be given as Windows format, start by converting to
38966   # unix format.
38967   new_path=`$CYGPATH -u "$path"`
38968 
38969   # Now try to locate executable using which
38970   new_path=`$WHICH "$new_path" 2> /dev/null`
38971   # bat and cmd files are not always considered executable in cygwin causing which
38972   # to not find them
38973   if test "x$new_path" = x \
38974       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38975       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38976     new_path=`$CYGPATH -u "$path"`
38977   fi
38978   if test "x$new_path" = x; then
38979     # Oops. Which didn't find the executable.
38980     # The splitting of arguments from the executable at a space might have been incorrect,
38981     # since paths with space are more likely in Windows. Give it another try with the whole
38982     # argument.
38983     path="$complete"
38984     arguments="EOL"
38985     new_path=`$CYGPATH -u "$path"`
38986     new_path=`$WHICH "$new_path" 2> /dev/null`
38987     # bat and cmd files are not always considered executable in cygwin causing which
38988     # to not find them
38989     if test "x$new_path" = x \
38990         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38991         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38992       new_path=`$CYGPATH -u "$path"`
38993     fi
38994     if test "x$new_path" = x; then
38995       # It's still not found. Now this is an unrecoverable error.
38996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38997 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38998       has_space=`$ECHO "$complete" | $GREP " "`
38999       if test "x$has_space" != x; then
39000         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39001 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39002       fi
39003       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39004     fi
39005   fi
39006 
39007   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39008   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39009   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39010   # "foo.exe" is OK but "foo" is an error.
39011   #
39012   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39013   # It is also a way to make sure we got the proper file name for the real test later on.
39014   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39015   if test "x$test_shortpath" = x; then
39016     # Short path failed, file does not exist as specified.
39017     # Try adding .exe or .cmd
39018     if test -f "${new_path}.exe"; then
39019       input_to_shortpath="${new_path}.exe"
39020     elif test -f "${new_path}.cmd"; then
39021       input_to_shortpath="${new_path}.cmd"
39022     else
39023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39024 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39025       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39026 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39027       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39028     fi
39029   else
39030     input_to_shortpath="$new_path"
39031   fi
39032 
39033   # Call helper function which possibly converts this using DOS-style short mode.
39034   # If so, the updated path is stored in $new_path.
39035   new_path="$input_to_shortpath"
39036 
39037   input_path="$input_to_shortpath"
39038   # Check if we need to convert this using DOS-style short mode. If the path
39039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39040   # take no chances and rewrite it.
39041   # Note: m4 eats our [], so we need to use [ and ] instead.
39042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39043   if test "x$has_forbidden_chars" != x; then
39044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39045     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39046     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39047     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39048       # Going to short mode and back again did indeed matter. Since short mode is
39049       # case insensitive, let's make it lowercase to improve readability.
39050       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39051       # Now convert it back to Unix-style (cygpath)
39052       input_path=`$CYGPATH -u "$shortmode_path"`
39053       new_path="$input_path"
39054     fi
39055   fi
39056 
39057   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39058   if test "x$test_cygdrive_prefix" = x; then
39059     # As a simple fix, exclude /usr/bin since it's not a real path.
39060     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39061       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39062       # a path prefixed by /cygdrive for fixpath to work.
39063       new_path="$CYGWIN_ROOT_PATH$input_path"
39064     fi
39065   fi
39066 
39067   # remove trailing .exe if any
39068   new_path="${new_path/%.exe/}"
39069 
39070     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39071 
39072   # First separate the path from the arguments. This will split at the first
39073   # space.
39074   complete="$RC"
39075   path="${complete%% *}"
39076   tmp="$complete EOL"
39077   arguments="${tmp#* }"
39078 
39079   # Input might be given as Windows format, start by converting to
39080   # unix format.
39081   new_path="$path"
39082 
39083   windows_path="$new_path"
39084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39085     unix_path=`$CYGPATH -u "$windows_path"`
39086     new_path="$unix_path"
39087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39089     new_path="$unix_path"
39090   fi
39091 
39092 
39093   # Now try to locate executable using which
39094   new_path=`$WHICH "$new_path" 2> /dev/null`
39095 
39096   if test "x$new_path" = x; then
39097     # Oops. Which didn't find the executable.
39098     # The splitting of arguments from the executable at a space might have been incorrect,
39099     # since paths with space are more likely in Windows. Give it another try with the whole
39100     # argument.
39101     path="$complete"
39102     arguments="EOL"
39103     new_path="$path"
39104 
39105   windows_path="$new_path"
39106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39107     unix_path=`$CYGPATH -u "$windows_path"`
39108     new_path="$unix_path"
39109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39111     new_path="$unix_path"
39112   fi
39113 
39114 
39115     new_path=`$WHICH "$new_path" 2> /dev/null`
39116     # bat and cmd files are not always considered executable in MSYS causing which
39117     # to not find them
39118     if test "x$new_path" = x \
39119         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39120         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39121       new_path="$path"
39122 
39123   windows_path="$new_path"
39124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39125     unix_path=`$CYGPATH -u "$windows_path"`
39126     new_path="$unix_path"
39127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39129     new_path="$unix_path"
39130   fi
39131 
39132     fi
39133 
39134     if test "x$new_path" = x; then
39135       # It's still not found. Now this is an unrecoverable error.
39136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39137 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39138       has_space=`$ECHO "$complete" | $GREP " "`
39139       if test "x$has_space" != x; then
39140         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39141 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39142       fi
39143       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39144     fi
39145   fi
39146 
39147   # Now new_path has a complete unix path to the binary
39148   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39149     # Keep paths in /bin as-is, but remove trailing .exe if any
39150     new_path="${new_path/%.exe/}"
39151     # Do not save /bin paths to all_fixpath_prefixes!
39152   else
39153     # Not in mixed or Windows style, start by that.
39154     new_path=`cmd //c echo $new_path`
39155 
39156   input_path="$new_path"
39157   # Check if we need to convert this using DOS-style short mode. If the path
39158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39159   # take no chances and rewrite it.
39160   # Note: m4 eats our [], so we need to use [ and ] instead.
39161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39162   if test "x$has_forbidden_chars" != x; then
39163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39164     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39165   fi
39166 
39167     # Output is in $new_path
39168 
39169   windows_path="$new_path"
39170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171     unix_path=`$CYGPATH -u "$windows_path"`
39172     new_path="$unix_path"
39173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39175     new_path="$unix_path"
39176   fi
39177 
39178     # remove trailing .exe if any
39179     new_path="${new_path/%.exe/}"
39180 
39181     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39182     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39183   fi
39184 
39185     else
39186       # We're on a unix platform. Hooray! :)
39187       # First separate the path from the arguments. This will split at the first
39188       # space.
39189       complete="$RC"
39190       path="${complete%% *}"
39191       tmp="$complete EOL"
39192       arguments="${tmp#* }"
39193 
39194       # Cannot rely on the command "which" here since it doesn't always work.
39195       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39196       if test -z "$is_absolute_path"; then
39197         # Path to executable is not absolute. Find it.
39198         IFS_save="$IFS"
39199         IFS=:
39200         for p in $PATH; do
39201           if test -f "$p/$path" && test -x "$p/$path"; then
39202             new_path="$p/$path"
39203             break
39204           fi
39205         done
39206         IFS="$IFS_save"
39207       else
39208         # This is an absolute path, we can use it without further modifications.
39209         new_path="$path"
39210       fi
39211 
39212       if test "x$new_path" = x; then
39213         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39214 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39215         has_space=`$ECHO "$complete" | $GREP " "`
39216         if test "x$has_space" != x; then
39217           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39218 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39219         fi
39220         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39221       fi
39222     fi
39223 
39224     # Now join together the path and the arguments once again
39225     if test "x$arguments" != xEOL; then
39226       new_complete="$new_path ${arguments% *}"
39227     else
39228       new_complete="$new_path"
39229     fi
39230 
39231     if test "x$complete" != "x$new_complete"; then
39232       RC="$new_complete"
39233       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39234 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39235     fi
39236   fi
39237 
39238     # Extract the first word of "dumpbin", so it can be a program name with args.
39239 set dummy dumpbin; ac_word=$2
39240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39241 $as_echo_n "checking for $ac_word... " >&6; }
39242 if ${ac_cv_prog_DUMPBIN+:} false; then :
39243   $as_echo_n "(cached) " >&6
39244 else
39245   if test -n "$DUMPBIN"; then
39246   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39247 else
39248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39249 for as_dir in $PATH
39250 do
39251   IFS=$as_save_IFS
39252   test -z "$as_dir" && as_dir=.
39253     for ac_exec_ext in '' $ac_executable_extensions; do
39254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39255     ac_cv_prog_DUMPBIN="dumpbin"
39256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39257     break 2
39258   fi
39259 done
39260   done
39261 IFS=$as_save_IFS
39262 
39263 fi
39264 fi
39265 DUMPBIN=$ac_cv_prog_DUMPBIN
39266 if test -n "$DUMPBIN"; then
39267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39268 $as_echo "$DUMPBIN" >&6; }
39269 else
39270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39271 $as_echo "no" >&6; }
39272 fi
39273 
39274 
39275 
39276   # Only process if variable expands to non-empty
39277 
39278   if test "x$DUMPBIN" != x; then
39279     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39280 
39281   # First separate the path from the arguments. This will split at the first
39282   # space.
39283   complete="$DUMPBIN"
39284   path="${complete%% *}"
39285   tmp="$complete EOL"
39286   arguments="${tmp#* }"
39287 
39288   # Input might be given as Windows format, start by converting to
39289   # unix format.
39290   new_path=`$CYGPATH -u "$path"`
39291 
39292   # Now try to locate executable using which
39293   new_path=`$WHICH "$new_path" 2> /dev/null`
39294   # bat and cmd files are not always considered executable in cygwin causing which
39295   # to not find them
39296   if test "x$new_path" = x \
39297       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39298       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39299     new_path=`$CYGPATH -u "$path"`
39300   fi
39301   if test "x$new_path" = x; then
39302     # Oops. Which didn't find the executable.
39303     # The splitting of arguments from the executable at a space might have been incorrect,
39304     # since paths with space are more likely in Windows. Give it another try with the whole
39305     # argument.
39306     path="$complete"
39307     arguments="EOL"
39308     new_path=`$CYGPATH -u "$path"`
39309     new_path=`$WHICH "$new_path" 2> /dev/null`
39310     # bat and cmd files are not always considered executable in cygwin causing which
39311     # to not find them
39312     if test "x$new_path" = x \
39313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39315       new_path=`$CYGPATH -u "$path"`
39316     fi
39317     if test "x$new_path" = x; then
39318       # It's still not found. Now this is an unrecoverable error.
39319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39320 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39321       has_space=`$ECHO "$complete" | $GREP " "`
39322       if test "x$has_space" != x; then
39323         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39325       fi
39326       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39327     fi
39328   fi
39329 
39330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39333   # "foo.exe" is OK but "foo" is an error.
39334   #
39335   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39336   # It is also a way to make sure we got the proper file name for the real test later on.
39337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39338   if test "x$test_shortpath" = x; then
39339     # Short path failed, file does not exist as specified.
39340     # Try adding .exe or .cmd
39341     if test -f "${new_path}.exe"; then
39342       input_to_shortpath="${new_path}.exe"
39343     elif test -f "${new_path}.cmd"; then
39344       input_to_shortpath="${new_path}.cmd"
39345     else
39346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39347 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39348       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39350       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39351     fi
39352   else
39353     input_to_shortpath="$new_path"
39354   fi
39355 
39356   # Call helper function which possibly converts this using DOS-style short mode.
39357   # If so, the updated path is stored in $new_path.
39358   new_path="$input_to_shortpath"
39359 
39360   input_path="$input_to_shortpath"
39361   # Check if we need to convert this using DOS-style short mode. If the path
39362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39363   # take no chances and rewrite it.
39364   # Note: m4 eats our [], so we need to use [ and ] instead.
39365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39366   if test "x$has_forbidden_chars" != x; then
39367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39371       # Going to short mode and back again did indeed matter. Since short mode is
39372       # case insensitive, let's make it lowercase to improve readability.
39373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39374       # Now convert it back to Unix-style (cygpath)
39375       input_path=`$CYGPATH -u "$shortmode_path"`
39376       new_path="$input_path"
39377     fi
39378   fi
39379 
39380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39381   if test "x$test_cygdrive_prefix" = x; then
39382     # As a simple fix, exclude /usr/bin since it's not a real path.
39383     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39385       # a path prefixed by /cygdrive for fixpath to work.
39386       new_path="$CYGWIN_ROOT_PATH$input_path"
39387     fi
39388   fi
39389 
39390   # remove trailing .exe if any
39391   new_path="${new_path/%.exe/}"
39392 
39393     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39394 
39395   # First separate the path from the arguments. This will split at the first
39396   # space.
39397   complete="$DUMPBIN"
39398   path="${complete%% *}"
39399   tmp="$complete EOL"
39400   arguments="${tmp#* }"
39401 
39402   # Input might be given as Windows format, start by converting to
39403   # unix format.
39404   new_path="$path"
39405 
39406   windows_path="$new_path"
39407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39408     unix_path=`$CYGPATH -u "$windows_path"`
39409     new_path="$unix_path"
39410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39412     new_path="$unix_path"
39413   fi
39414 
39415 
39416   # Now try to locate executable using which
39417   new_path=`$WHICH "$new_path" 2> /dev/null`
39418 
39419   if test "x$new_path" = x; then
39420     # Oops. Which didn't find the executable.
39421     # The splitting of arguments from the executable at a space might have been incorrect,
39422     # since paths with space are more likely in Windows. Give it another try with the whole
39423     # argument.
39424     path="$complete"
39425     arguments="EOL"
39426     new_path="$path"
39427 
39428   windows_path="$new_path"
39429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39430     unix_path=`$CYGPATH -u "$windows_path"`
39431     new_path="$unix_path"
39432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39434     new_path="$unix_path"
39435   fi
39436 
39437 
39438     new_path=`$WHICH "$new_path" 2> /dev/null`
39439     # bat and cmd files are not always considered executable in MSYS causing which
39440     # to not find them
39441     if test "x$new_path" = x \
39442         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39443         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39444       new_path="$path"
39445 
39446   windows_path="$new_path"
39447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39448     unix_path=`$CYGPATH -u "$windows_path"`
39449     new_path="$unix_path"
39450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39452     new_path="$unix_path"
39453   fi
39454 
39455     fi
39456 
39457     if test "x$new_path" = x; then
39458       # It's still not found. Now this is an unrecoverable error.
39459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39460 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39461       has_space=`$ECHO "$complete" | $GREP " "`
39462       if test "x$has_space" != x; then
39463         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39464 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39465       fi
39466       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39467     fi
39468   fi
39469 
39470   # Now new_path has a complete unix path to the binary
39471   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39472     # Keep paths in /bin as-is, but remove trailing .exe if any
39473     new_path="${new_path/%.exe/}"
39474     # Do not save /bin paths to all_fixpath_prefixes!
39475   else
39476     # Not in mixed or Windows style, start by that.
39477     new_path=`cmd //c echo $new_path`
39478 
39479   input_path="$new_path"
39480   # Check if we need to convert this using DOS-style short mode. If the path
39481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39482   # take no chances and rewrite it.
39483   # Note: m4 eats our [], so we need to use [ and ] instead.
39484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39485   if test "x$has_forbidden_chars" != x; then
39486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39488   fi
39489 
39490     # Output is in $new_path
39491 
39492   windows_path="$new_path"
39493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39494     unix_path=`$CYGPATH -u "$windows_path"`
39495     new_path="$unix_path"
39496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39498     new_path="$unix_path"
39499   fi
39500 
39501     # remove trailing .exe if any
39502     new_path="${new_path/%.exe/}"
39503 
39504     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39505     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39506   fi
39507 
39508     else
39509       # We're on a unix platform. Hooray! :)
39510       # First separate the path from the arguments. This will split at the first
39511       # space.
39512       complete="$DUMPBIN"
39513       path="${complete%% *}"
39514       tmp="$complete EOL"
39515       arguments="${tmp#* }"
39516 
39517       # Cannot rely on the command "which" here since it doesn't always work.
39518       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39519       if test -z "$is_absolute_path"; then
39520         # Path to executable is not absolute. Find it.
39521         IFS_save="$IFS"
39522         IFS=:
39523         for p in $PATH; do
39524           if test -f "$p/$path" && test -x "$p/$path"; then
39525             new_path="$p/$path"
39526             break
39527           fi
39528         done
39529         IFS="$IFS_save"
39530       else
39531         # This is an absolute path, we can use it without further modifications.
39532         new_path="$path"
39533       fi
39534 
39535       if test "x$new_path" = x; then
39536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39537 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39538         has_space=`$ECHO "$complete" | $GREP " "`
39539         if test "x$has_space" != x; then
39540           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39541 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39542         fi
39543         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39544       fi
39545     fi
39546 
39547     # Now join together the path and the arguments once again
39548     if test "x$arguments" != xEOL; then
39549       new_complete="$new_path ${arguments% *}"
39550     else
39551       new_complete="$new_path"
39552     fi
39553 
39554     if test "x$complete" != "x$new_complete"; then
39555       DUMPBIN="$new_complete"
39556       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39557 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39558     fi
39559   fi
39560 
39561     # We need to check for 'msbuild.exe' because at the place where we expect to
39562     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39563     # won't find the 'msbuild.exe' executable in that case (and the
39564     # 'ac_executable_extensions' is unusable due to performance reasons).
39565     # Notice that we intentionally don't fix up the path to MSBUILD because we
39566     # will call it in a DOS shell during freetype detection on Windows (see
39567     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39568     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39569 set dummy msbuild.exe; ac_word=$2
39570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39571 $as_echo_n "checking for $ac_word... " >&6; }
39572 if ${ac_cv_prog_MSBUILD+:} false; then :
39573   $as_echo_n "(cached) " >&6
39574 else
39575   if test -n "$MSBUILD"; then
39576   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39577 else
39578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39579 for as_dir in $PATH
39580 do
39581   IFS=$as_save_IFS
39582   test -z "$as_dir" && as_dir=.
39583     for ac_exec_ext in '' $ac_executable_extensions; do
39584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39585     ac_cv_prog_MSBUILD="msbuild.exe"
39586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39587     break 2
39588   fi
39589 done
39590   done
39591 IFS=$as_save_IFS
39592 
39593 fi
39594 fi
39595 MSBUILD=$ac_cv_prog_MSBUILD
39596 if test -n "$MSBUILD"; then
39597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39598 $as_echo "$MSBUILD" >&6; }
39599 else
39600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39601 $as_echo "no" >&6; }
39602 fi
39603 
39604 
39605   fi
39606 
39607   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39608 
39609 
39610   # Publish this variable in the help.
39611 
39612 
39613   if [ -z "${STRIP+x}" ]; then
39614     # The variable is not set by user, try to locate tool using the code snippet
39615     for ac_prog in strip
39616 do
39617   # Extract the first word of "$ac_prog", so it can be a program name with args.
39618 set dummy $ac_prog; ac_word=$2
39619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39620 $as_echo_n "checking for $ac_word... " >&6; }
39621 if ${ac_cv_path_STRIP+:} false; then :
39622   $as_echo_n "(cached) " >&6
39623 else
39624   case $STRIP in
39625   [\\/]* | ?:[\\/]*)
39626   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39627   ;;
39628   *)
39629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39630 for as_dir in $PATH
39631 do
39632   IFS=$as_save_IFS
39633   test -z "$as_dir" && as_dir=.
39634     for ac_exec_ext in '' $ac_executable_extensions; do
39635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39636     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39638     break 2
39639   fi
39640 done
39641   done
39642 IFS=$as_save_IFS
39643 
39644   ;;
39645 esac
39646 fi
39647 STRIP=$ac_cv_path_STRIP
39648 if test -n "$STRIP"; then
39649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39650 $as_echo "$STRIP" >&6; }
39651 else
39652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39653 $as_echo "no" >&6; }
39654 fi
39655 
39656 
39657   test -n "$STRIP" && break
39658 done
39659 
39660   else
39661     # The variable is set, but is it from the command line or the environment?
39662 
39663     # Try to remove the string !STRIP! from our list.
39664     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39665     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39666       # If it failed, the variable was not from the command line. Ignore it,
39667       # but warn the user (except for BASH, which is always set by the calling BASH).
39668       if test "xSTRIP" != xBASH; then
39669         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39670 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39671       fi
39672       # Try to locate tool using the code snippet
39673       for ac_prog in strip
39674 do
39675   # Extract the first word of "$ac_prog", so it can be a program name with args.
39676 set dummy $ac_prog; ac_word=$2
39677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39678 $as_echo_n "checking for $ac_word... " >&6; }
39679 if ${ac_cv_path_STRIP+:} false; then :
39680   $as_echo_n "(cached) " >&6
39681 else
39682   case $STRIP in
39683   [\\/]* | ?:[\\/]*)
39684   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39685   ;;
39686   *)
39687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39688 for as_dir in $PATH
39689 do
39690   IFS=$as_save_IFS
39691   test -z "$as_dir" && as_dir=.
39692     for ac_exec_ext in '' $ac_executable_extensions; do
39693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39694     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39696     break 2
39697   fi
39698 done
39699   done
39700 IFS=$as_save_IFS
39701 
39702   ;;
39703 esac
39704 fi
39705 STRIP=$ac_cv_path_STRIP
39706 if test -n "$STRIP"; then
39707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39708 $as_echo "$STRIP" >&6; }
39709 else
39710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39711 $as_echo "no" >&6; }
39712 fi
39713 
39714 
39715   test -n "$STRIP" && break
39716 done
39717 
39718     else
39719       # If it succeeded, then it was overridden by the user. We will use it
39720       # for the tool.
39721 
39722       # First remove it from the list of overridden variables, so we can test
39723       # for unknown variables in the end.
39724       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39725 
39726       # Check if we try to supply an empty value
39727       if test "x$STRIP" = x; then
39728         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39729 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39731 $as_echo_n "checking for STRIP... " >&6; }
39732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39733 $as_echo "disabled" >&6; }
39734       else
39735         # Check if the provided tool contains a complete path.
39736         tool_specified="$STRIP"
39737         tool_basename="${tool_specified##*/}"
39738         if test "x$tool_basename" = "x$tool_specified"; then
39739           # A command without a complete path is provided, search $PATH.
39740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39741 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39742           # Extract the first word of "$tool_basename", so it can be a program name with args.
39743 set dummy $tool_basename; ac_word=$2
39744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39745 $as_echo_n "checking for $ac_word... " >&6; }
39746 if ${ac_cv_path_STRIP+:} false; then :
39747   $as_echo_n "(cached) " >&6
39748 else
39749   case $STRIP in
39750   [\\/]* | ?:[\\/]*)
39751   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39752   ;;
39753   *)
39754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39755 for as_dir in $PATH
39756 do
39757   IFS=$as_save_IFS
39758   test -z "$as_dir" && as_dir=.
39759     for ac_exec_ext in '' $ac_executable_extensions; do
39760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39761     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39763     break 2
39764   fi
39765 done
39766   done
39767 IFS=$as_save_IFS
39768 
39769   ;;
39770 esac
39771 fi
39772 STRIP=$ac_cv_path_STRIP
39773 if test -n "$STRIP"; then
39774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39775 $as_echo "$STRIP" >&6; }
39776 else
39777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39778 $as_echo "no" >&6; }
39779 fi
39780 
39781 
39782           if test "x$STRIP" = x; then
39783             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39784           fi
39785         else
39786           # Otherwise we believe it is a complete path. Use it as it is.
39787           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39788 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39789           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39790 $as_echo_n "checking for STRIP... " >&6; }
39791           if test ! -x "$tool_specified"; then
39792             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39793 $as_echo "not found" >&6; }
39794             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39795           fi
39796           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39797 $as_echo "$tool_specified" >&6; }
39798         fi
39799       fi
39800     fi
39801 
39802   fi
39803 
39804 
39805 
39806   # Only process if variable expands to non-empty
39807 
39808   if test "x$STRIP" != x; then
39809     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39810 
39811   # First separate the path from the arguments. This will split at the first
39812   # space.
39813   complete="$STRIP"
39814   path="${complete%% *}"
39815   tmp="$complete EOL"
39816   arguments="${tmp#* }"
39817 
39818   # Input might be given as Windows format, start by converting to
39819   # unix format.
39820   new_path=`$CYGPATH -u "$path"`
39821 
39822   # Now try to locate executable using which
39823   new_path=`$WHICH "$new_path" 2> /dev/null`
39824   # bat and cmd files are not always considered executable in cygwin causing which
39825   # to not find them
39826   if test "x$new_path" = x \
39827       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39828       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39829     new_path=`$CYGPATH -u "$path"`
39830   fi
39831   if test "x$new_path" = x; then
39832     # Oops. Which didn't find the executable.
39833     # The splitting of arguments from the executable at a space might have been incorrect,
39834     # since paths with space are more likely in Windows. Give it another try with the whole
39835     # argument.
39836     path="$complete"
39837     arguments="EOL"
39838     new_path=`$CYGPATH -u "$path"`
39839     new_path=`$WHICH "$new_path" 2> /dev/null`
39840     # bat and cmd files are not always considered executable in cygwin causing which
39841     # to not find them
39842     if test "x$new_path" = x \
39843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39845       new_path=`$CYGPATH -u "$path"`
39846     fi
39847     if test "x$new_path" = x; then
39848       # It's still not found. Now this is an unrecoverable error.
39849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39850 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39851       has_space=`$ECHO "$complete" | $GREP " "`
39852       if test "x$has_space" != x; then
39853         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39854 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39855       fi
39856       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39857     fi
39858   fi
39859 
39860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39863   # "foo.exe" is OK but "foo" is an error.
39864   #
39865   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39866   # It is also a way to make sure we got the proper file name for the real test later on.
39867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39868   if test "x$test_shortpath" = x; then
39869     # Short path failed, file does not exist as specified.
39870     # Try adding .exe or .cmd
39871     if test -f "${new_path}.exe"; then
39872       input_to_shortpath="${new_path}.exe"
39873     elif test -f "${new_path}.cmd"; then
39874       input_to_shortpath="${new_path}.cmd"
39875     else
39876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39877 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39878       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39879 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39880       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39881     fi
39882   else
39883     input_to_shortpath="$new_path"
39884   fi
39885 
39886   # Call helper function which possibly converts this using DOS-style short mode.
39887   # If so, the updated path is stored in $new_path.
39888   new_path="$input_to_shortpath"
39889 
39890   input_path="$input_to_shortpath"
39891   # Check if we need to convert this using DOS-style short mode. If the path
39892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39893   # take no chances and rewrite it.
39894   # Note: m4 eats our [], so we need to use [ and ] instead.
39895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39896   if test "x$has_forbidden_chars" != x; then
39897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39901       # Going to short mode and back again did indeed matter. Since short mode is
39902       # case insensitive, let's make it lowercase to improve readability.
39903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39904       # Now convert it back to Unix-style (cygpath)
39905       input_path=`$CYGPATH -u "$shortmode_path"`
39906       new_path="$input_path"
39907     fi
39908   fi
39909 
39910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39911   if test "x$test_cygdrive_prefix" = x; then
39912     # As a simple fix, exclude /usr/bin since it's not a real path.
39913     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39915       # a path prefixed by /cygdrive for fixpath to work.
39916       new_path="$CYGWIN_ROOT_PATH$input_path"
39917     fi
39918   fi
39919 
39920   # remove trailing .exe if any
39921   new_path="${new_path/%.exe/}"
39922 
39923     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924 
39925   # First separate the path from the arguments. This will split at the first
39926   # space.
39927   complete="$STRIP"
39928   path="${complete%% *}"
39929   tmp="$complete EOL"
39930   arguments="${tmp#* }"
39931 
39932   # Input might be given as Windows format, start by converting to
39933   # unix format.
39934   new_path="$path"
39935 
39936   windows_path="$new_path"
39937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938     unix_path=`$CYGPATH -u "$windows_path"`
39939     new_path="$unix_path"
39940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942     new_path="$unix_path"
39943   fi
39944 
39945 
39946   # Now try to locate executable using which
39947   new_path=`$WHICH "$new_path" 2> /dev/null`
39948 
39949   if test "x$new_path" = x; then
39950     # Oops. Which didn't find the executable.
39951     # The splitting of arguments from the executable at a space might have been incorrect,
39952     # since paths with space are more likely in Windows. Give it another try with the whole
39953     # argument.
39954     path="$complete"
39955     arguments="EOL"
39956     new_path="$path"
39957 
39958   windows_path="$new_path"
39959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39960     unix_path=`$CYGPATH -u "$windows_path"`
39961     new_path="$unix_path"
39962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39964     new_path="$unix_path"
39965   fi
39966 
39967 
39968     new_path=`$WHICH "$new_path" 2> /dev/null`
39969     # bat and cmd files are not always considered executable in MSYS causing which
39970     # to not find them
39971     if test "x$new_path" = x \
39972         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39973         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39974       new_path="$path"
39975 
39976   windows_path="$new_path"
39977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978     unix_path=`$CYGPATH -u "$windows_path"`
39979     new_path="$unix_path"
39980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982     new_path="$unix_path"
39983   fi
39984 
39985     fi
39986 
39987     if test "x$new_path" = x; then
39988       # It's still not found. Now this is an unrecoverable error.
39989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39990 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39991       has_space=`$ECHO "$complete" | $GREP " "`
39992       if test "x$has_space" != x; then
39993         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39995       fi
39996       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39997     fi
39998   fi
39999 
40000   # Now new_path has a complete unix path to the binary
40001   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40002     # Keep paths in /bin as-is, but remove trailing .exe if any
40003     new_path="${new_path/%.exe/}"
40004     # Do not save /bin paths to all_fixpath_prefixes!
40005   else
40006     # Not in mixed or Windows style, start by that.
40007     new_path=`cmd //c echo $new_path`
40008 
40009   input_path="$new_path"
40010   # Check if we need to convert this using DOS-style short mode. If the path
40011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40012   # take no chances and rewrite it.
40013   # Note: m4 eats our [], so we need to use [ and ] instead.
40014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40015   if test "x$has_forbidden_chars" != x; then
40016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40018   fi
40019 
40020     # Output is in $new_path
40021 
40022   windows_path="$new_path"
40023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40024     unix_path=`$CYGPATH -u "$windows_path"`
40025     new_path="$unix_path"
40026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40028     new_path="$unix_path"
40029   fi
40030 
40031     # remove trailing .exe if any
40032     new_path="${new_path/%.exe/}"
40033 
40034     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40035     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40036   fi
40037 
40038     else
40039       # We're on a unix platform. Hooray! :)
40040       # First separate the path from the arguments. This will split at the first
40041       # space.
40042       complete="$STRIP"
40043       path="${complete%% *}"
40044       tmp="$complete EOL"
40045       arguments="${tmp#* }"
40046 
40047       # Cannot rely on the command "which" here since it doesn't always work.
40048       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40049       if test -z "$is_absolute_path"; then
40050         # Path to executable is not absolute. Find it.
40051         IFS_save="$IFS"
40052         IFS=:
40053         for p in $PATH; do
40054           if test -f "$p/$path" && test -x "$p/$path"; then
40055             new_path="$p/$path"
40056             break
40057           fi
40058         done
40059         IFS="$IFS_save"
40060       else
40061         # This is an absolute path, we can use it without further modifications.
40062         new_path="$path"
40063       fi
40064 
40065       if test "x$new_path" = x; then
40066         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40067 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40068         has_space=`$ECHO "$complete" | $GREP " "`
40069         if test "x$has_space" != x; then
40070           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40071 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40072         fi
40073         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40074       fi
40075     fi
40076 
40077     # Now join together the path and the arguments once again
40078     if test "x$arguments" != xEOL; then
40079       new_complete="$new_path ${arguments% *}"
40080     else
40081       new_complete="$new_path"
40082     fi
40083 
40084     if test "x$complete" != "x$new_complete"; then
40085       STRIP="$new_complete"
40086       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40087 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40088     fi
40089   fi
40090 
40091 
40092 
40093   # Publish this variable in the help.
40094 
40095 
40096   if [ -z "${NM+x}" ]; then
40097     # The variable is not set by user, try to locate tool using the code snippet
40098     for ac_prog in nm
40099 do
40100   # Extract the first word of "$ac_prog", so it can be a program name with args.
40101 set dummy $ac_prog; ac_word=$2
40102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40103 $as_echo_n "checking for $ac_word... " >&6; }
40104 if ${ac_cv_path_NM+:} false; then :
40105   $as_echo_n "(cached) " >&6
40106 else
40107   case $NM in
40108   [\\/]* | ?:[\\/]*)
40109   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40110   ;;
40111   *)
40112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40113 for as_dir in $PATH
40114 do
40115   IFS=$as_save_IFS
40116   test -z "$as_dir" && as_dir=.
40117     for ac_exec_ext in '' $ac_executable_extensions; do
40118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40119     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40121     break 2
40122   fi
40123 done
40124   done
40125 IFS=$as_save_IFS
40126 
40127   ;;
40128 esac
40129 fi
40130 NM=$ac_cv_path_NM
40131 if test -n "$NM"; then
40132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40133 $as_echo "$NM" >&6; }
40134 else
40135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40136 $as_echo "no" >&6; }
40137 fi
40138 
40139 
40140   test -n "$NM" && break
40141 done
40142 
40143   else
40144     # The variable is set, but is it from the command line or the environment?
40145 
40146     # Try to remove the string !NM! from our list.
40147     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40148     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40149       # If it failed, the variable was not from the command line. Ignore it,
40150       # but warn the user (except for BASH, which is always set by the calling BASH).
40151       if test "xNM" != xBASH; then
40152         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40153 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40154       fi
40155       # Try to locate tool using the code snippet
40156       for ac_prog in nm
40157 do
40158   # Extract the first word of "$ac_prog", so it can be a program name with args.
40159 set dummy $ac_prog; ac_word=$2
40160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40161 $as_echo_n "checking for $ac_word... " >&6; }
40162 if ${ac_cv_path_NM+:} false; then :
40163   $as_echo_n "(cached) " >&6
40164 else
40165   case $NM in
40166   [\\/]* | ?:[\\/]*)
40167   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40168   ;;
40169   *)
40170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40171 for as_dir in $PATH
40172 do
40173   IFS=$as_save_IFS
40174   test -z "$as_dir" && as_dir=.
40175     for ac_exec_ext in '' $ac_executable_extensions; do
40176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40177     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40179     break 2
40180   fi
40181 done
40182   done
40183 IFS=$as_save_IFS
40184 
40185   ;;
40186 esac
40187 fi
40188 NM=$ac_cv_path_NM
40189 if test -n "$NM"; then
40190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40191 $as_echo "$NM" >&6; }
40192 else
40193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40194 $as_echo "no" >&6; }
40195 fi
40196 
40197 
40198   test -n "$NM" && break
40199 done
40200 
40201     else
40202       # If it succeeded, then it was overridden by the user. We will use it
40203       # for the tool.
40204 
40205       # First remove it from the list of overridden variables, so we can test
40206       # for unknown variables in the end.
40207       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40208 
40209       # Check if we try to supply an empty value
40210       if test "x$NM" = x; then
40211         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40212 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40214 $as_echo_n "checking for NM... " >&6; }
40215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40216 $as_echo "disabled" >&6; }
40217       else
40218         # Check if the provided tool contains a complete path.
40219         tool_specified="$NM"
40220         tool_basename="${tool_specified##*/}"
40221         if test "x$tool_basename" = "x$tool_specified"; then
40222           # A command without a complete path is provided, search $PATH.
40223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40224 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40225           # Extract the first word of "$tool_basename", so it can be a program name with args.
40226 set dummy $tool_basename; ac_word=$2
40227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40228 $as_echo_n "checking for $ac_word... " >&6; }
40229 if ${ac_cv_path_NM+:} false; then :
40230   $as_echo_n "(cached) " >&6
40231 else
40232   case $NM in
40233   [\\/]* | ?:[\\/]*)
40234   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40235   ;;
40236   *)
40237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40238 for as_dir in $PATH
40239 do
40240   IFS=$as_save_IFS
40241   test -z "$as_dir" && as_dir=.
40242     for ac_exec_ext in '' $ac_executable_extensions; do
40243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40244     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40246     break 2
40247   fi
40248 done
40249   done
40250 IFS=$as_save_IFS
40251 
40252   ;;
40253 esac
40254 fi
40255 NM=$ac_cv_path_NM
40256 if test -n "$NM"; then
40257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40258 $as_echo "$NM" >&6; }
40259 else
40260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40261 $as_echo "no" >&6; }
40262 fi
40263 
40264 
40265           if test "x$NM" = x; then
40266             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40267           fi
40268         else
40269           # Otherwise we believe it is a complete path. Use it as it is.
40270           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40271 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40272           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40273 $as_echo_n "checking for NM... " >&6; }
40274           if test ! -x "$tool_specified"; then
40275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40276 $as_echo "not found" >&6; }
40277             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40278           fi
40279           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40280 $as_echo "$tool_specified" >&6; }
40281         fi
40282       fi
40283     fi
40284 
40285   fi
40286 
40287 
40288 
40289   # Only process if variable expands to non-empty
40290 
40291   if test "x$NM" != x; then
40292     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40293 
40294   # First separate the path from the arguments. This will split at the first
40295   # space.
40296   complete="$NM"
40297   path="${complete%% *}"
40298   tmp="$complete EOL"
40299   arguments="${tmp#* }"
40300 
40301   # Input might be given as Windows format, start by converting to
40302   # unix format.
40303   new_path=`$CYGPATH -u "$path"`
40304 
40305   # Now try to locate executable using which
40306   new_path=`$WHICH "$new_path" 2> /dev/null`
40307   # bat and cmd files are not always considered executable in cygwin causing which
40308   # to not find them
40309   if test "x$new_path" = x \
40310       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40311       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40312     new_path=`$CYGPATH -u "$path"`
40313   fi
40314   if test "x$new_path" = x; then
40315     # Oops. Which didn't find the executable.
40316     # The splitting of arguments from the executable at a space might have been incorrect,
40317     # since paths with space are more likely in Windows. Give it another try with the whole
40318     # argument.
40319     path="$complete"
40320     arguments="EOL"
40321     new_path=`$CYGPATH -u "$path"`
40322     new_path=`$WHICH "$new_path" 2> /dev/null`
40323     # bat and cmd files are not always considered executable in cygwin causing which
40324     # to not find them
40325     if test "x$new_path" = x \
40326         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40327         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40328       new_path=`$CYGPATH -u "$path"`
40329     fi
40330     if test "x$new_path" = x; then
40331       # It's still not found. Now this is an unrecoverable error.
40332       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40333 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40334       has_space=`$ECHO "$complete" | $GREP " "`
40335       if test "x$has_space" != x; then
40336         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40337 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40338       fi
40339       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40340     fi
40341   fi
40342 
40343   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40344   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40345   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40346   # "foo.exe" is OK but "foo" is an error.
40347   #
40348   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40349   # It is also a way to make sure we got the proper file name for the real test later on.
40350   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40351   if test "x$test_shortpath" = x; then
40352     # Short path failed, file does not exist as specified.
40353     # Try adding .exe or .cmd
40354     if test -f "${new_path}.exe"; then
40355       input_to_shortpath="${new_path}.exe"
40356     elif test -f "${new_path}.cmd"; then
40357       input_to_shortpath="${new_path}.cmd"
40358     else
40359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40360 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40361       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40362 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40363       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40364     fi
40365   else
40366     input_to_shortpath="$new_path"
40367   fi
40368 
40369   # Call helper function which possibly converts this using DOS-style short mode.
40370   # If so, the updated path is stored in $new_path.
40371   new_path="$input_to_shortpath"
40372 
40373   input_path="$input_to_shortpath"
40374   # Check if we need to convert this using DOS-style short mode. If the path
40375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40376   # take no chances and rewrite it.
40377   # Note: m4 eats our [], so we need to use [ and ] instead.
40378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40379   if test "x$has_forbidden_chars" != x; then
40380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40381     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40382     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40383     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40384       # Going to short mode and back again did indeed matter. Since short mode is
40385       # case insensitive, let's make it lowercase to improve readability.
40386       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40387       # Now convert it back to Unix-style (cygpath)
40388       input_path=`$CYGPATH -u "$shortmode_path"`
40389       new_path="$input_path"
40390     fi
40391   fi
40392 
40393   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40394   if test "x$test_cygdrive_prefix" = x; then
40395     # As a simple fix, exclude /usr/bin since it's not a real path.
40396     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40397       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40398       # a path prefixed by /cygdrive for fixpath to work.
40399       new_path="$CYGWIN_ROOT_PATH$input_path"
40400     fi
40401   fi
40402 
40403   # remove trailing .exe if any
40404   new_path="${new_path/%.exe/}"
40405 
40406     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407 
40408   # First separate the path from the arguments. This will split at the first
40409   # space.
40410   complete="$NM"
40411   path="${complete%% *}"
40412   tmp="$complete EOL"
40413   arguments="${tmp#* }"
40414 
40415   # Input might be given as Windows format, start by converting to
40416   # unix format.
40417   new_path="$path"
40418 
40419   windows_path="$new_path"
40420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421     unix_path=`$CYGPATH -u "$windows_path"`
40422     new_path="$unix_path"
40423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425     new_path="$unix_path"
40426   fi
40427 
40428 
40429   # Now try to locate executable using which
40430   new_path=`$WHICH "$new_path" 2> /dev/null`
40431 
40432   if test "x$new_path" = x; then
40433     # Oops. Which didn't find the executable.
40434     # The splitting of arguments from the executable at a space might have been incorrect,
40435     # since paths with space are more likely in Windows. Give it another try with the whole
40436     # argument.
40437     path="$complete"
40438     arguments="EOL"
40439     new_path="$path"
40440 
40441   windows_path="$new_path"
40442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40443     unix_path=`$CYGPATH -u "$windows_path"`
40444     new_path="$unix_path"
40445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40447     new_path="$unix_path"
40448   fi
40449 
40450 
40451     new_path=`$WHICH "$new_path" 2> /dev/null`
40452     # bat and cmd files are not always considered executable in MSYS causing which
40453     # to not find them
40454     if test "x$new_path" = x \
40455         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40456         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40457       new_path="$path"
40458 
40459   windows_path="$new_path"
40460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40461     unix_path=`$CYGPATH -u "$windows_path"`
40462     new_path="$unix_path"
40463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40465     new_path="$unix_path"
40466   fi
40467 
40468     fi
40469 
40470     if test "x$new_path" = x; then
40471       # It's still not found. Now this is an unrecoverable error.
40472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40473 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40474       has_space=`$ECHO "$complete" | $GREP " "`
40475       if test "x$has_space" != x; then
40476         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40477 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40478       fi
40479       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40480     fi
40481   fi
40482 
40483   # Now new_path has a complete unix path to the binary
40484   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40485     # Keep paths in /bin as-is, but remove trailing .exe if any
40486     new_path="${new_path/%.exe/}"
40487     # Do not save /bin paths to all_fixpath_prefixes!
40488   else
40489     # Not in mixed or Windows style, start by that.
40490     new_path=`cmd //c echo $new_path`
40491 
40492   input_path="$new_path"
40493   # Check if we need to convert this using DOS-style short mode. If the path
40494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40495   # take no chances and rewrite it.
40496   # Note: m4 eats our [], so we need to use [ and ] instead.
40497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40498   if test "x$has_forbidden_chars" != x; then
40499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40501   fi
40502 
40503     # Output is in $new_path
40504 
40505   windows_path="$new_path"
40506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40507     unix_path=`$CYGPATH -u "$windows_path"`
40508     new_path="$unix_path"
40509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40511     new_path="$unix_path"
40512   fi
40513 
40514     # remove trailing .exe if any
40515     new_path="${new_path/%.exe/}"
40516 
40517     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40518     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40519   fi
40520 
40521     else
40522       # We're on a unix platform. Hooray! :)
40523       # First separate the path from the arguments. This will split at the first
40524       # space.
40525       complete="$NM"
40526       path="${complete%% *}"
40527       tmp="$complete EOL"
40528       arguments="${tmp#* }"
40529 
40530       # Cannot rely on the command "which" here since it doesn't always work.
40531       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40532       if test -z "$is_absolute_path"; then
40533         # Path to executable is not absolute. Find it.
40534         IFS_save="$IFS"
40535         IFS=:
40536         for p in $PATH; do
40537           if test -f "$p/$path" && test -x "$p/$path"; then
40538             new_path="$p/$path"
40539             break
40540           fi
40541         done
40542         IFS="$IFS_save"
40543       else
40544         # This is an absolute path, we can use it without further modifications.
40545         new_path="$path"
40546       fi
40547 
40548       if test "x$new_path" = x; then
40549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40550 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40551         has_space=`$ECHO "$complete" | $GREP " "`
40552         if test "x$has_space" != x; then
40553           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40554 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40555         fi
40556         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40557       fi
40558     fi
40559 
40560     # Now join together the path and the arguments once again
40561     if test "x$arguments" != xEOL; then
40562       new_complete="$new_path ${arguments% *}"
40563     else
40564       new_complete="$new_path"
40565     fi
40566 
40567     if test "x$complete" != "x$new_complete"; then
40568       NM="$new_complete"
40569       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40570 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40571     fi
40572   fi
40573 
40574 
40575 
40576   # Publish this variable in the help.
40577 
40578 
40579   if [ -z "${GNM+x}" ]; then
40580     # The variable is not set by user, try to locate tool using the code snippet
40581     for ac_prog in gnm
40582 do
40583   # Extract the first word of "$ac_prog", so it can be a program name with args.
40584 set dummy $ac_prog; ac_word=$2
40585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40586 $as_echo_n "checking for $ac_word... " >&6; }
40587 if ${ac_cv_path_GNM+:} false; then :
40588   $as_echo_n "(cached) " >&6
40589 else
40590   case $GNM in
40591   [\\/]* | ?:[\\/]*)
40592   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40593   ;;
40594   *)
40595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40596 for as_dir in $PATH
40597 do
40598   IFS=$as_save_IFS
40599   test -z "$as_dir" && as_dir=.
40600     for ac_exec_ext in '' $ac_executable_extensions; do
40601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40602     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40604     break 2
40605   fi
40606 done
40607   done
40608 IFS=$as_save_IFS
40609 
40610   ;;
40611 esac
40612 fi
40613 GNM=$ac_cv_path_GNM
40614 if test -n "$GNM"; then
40615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40616 $as_echo "$GNM" >&6; }
40617 else
40618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40619 $as_echo "no" >&6; }
40620 fi
40621 
40622 
40623   test -n "$GNM" && break
40624 done
40625 
40626   else
40627     # The variable is set, but is it from the command line or the environment?
40628 
40629     # Try to remove the string !GNM! from our list.
40630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40632       # If it failed, the variable was not from the command line. Ignore it,
40633       # but warn the user (except for BASH, which is always set by the calling BASH).
40634       if test "xGNM" != xBASH; then
40635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40636 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40637       fi
40638       # Try to locate tool using the code snippet
40639       for ac_prog in gnm
40640 do
40641   # Extract the first word of "$ac_prog", so it can be a program name with args.
40642 set dummy $ac_prog; ac_word=$2
40643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40644 $as_echo_n "checking for $ac_word... " >&6; }
40645 if ${ac_cv_path_GNM+:} false; then :
40646   $as_echo_n "(cached) " >&6
40647 else
40648   case $GNM in
40649   [\\/]* | ?:[\\/]*)
40650   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40651   ;;
40652   *)
40653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40654 for as_dir in $PATH
40655 do
40656   IFS=$as_save_IFS
40657   test -z "$as_dir" && as_dir=.
40658     for ac_exec_ext in '' $ac_executable_extensions; do
40659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40660     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40662     break 2
40663   fi
40664 done
40665   done
40666 IFS=$as_save_IFS
40667 
40668   ;;
40669 esac
40670 fi
40671 GNM=$ac_cv_path_GNM
40672 if test -n "$GNM"; then
40673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40674 $as_echo "$GNM" >&6; }
40675 else
40676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40677 $as_echo "no" >&6; }
40678 fi
40679 
40680 
40681   test -n "$GNM" && break
40682 done
40683 
40684     else
40685       # If it succeeded, then it was overridden by the user. We will use it
40686       # for the tool.
40687 
40688       # First remove it from the list of overridden variables, so we can test
40689       # for unknown variables in the end.
40690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40691 
40692       # Check if we try to supply an empty value
40693       if test "x$GNM" = x; then
40694         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40695 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40697 $as_echo_n "checking for GNM... " >&6; }
40698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40699 $as_echo "disabled" >&6; }
40700       else
40701         # Check if the provided tool contains a complete path.
40702         tool_specified="$GNM"
40703         tool_basename="${tool_specified##*/}"
40704         if test "x$tool_basename" = "x$tool_specified"; then
40705           # A command without a complete path is provided, search $PATH.
40706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40707 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40708           # Extract the first word of "$tool_basename", so it can be a program name with args.
40709 set dummy $tool_basename; ac_word=$2
40710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40711 $as_echo_n "checking for $ac_word... " >&6; }
40712 if ${ac_cv_path_GNM+:} false; then :
40713   $as_echo_n "(cached) " >&6
40714 else
40715   case $GNM in
40716   [\\/]* | ?:[\\/]*)
40717   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40718   ;;
40719   *)
40720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40721 for as_dir in $PATH
40722 do
40723   IFS=$as_save_IFS
40724   test -z "$as_dir" && as_dir=.
40725     for ac_exec_ext in '' $ac_executable_extensions; do
40726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40727     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40729     break 2
40730   fi
40731 done
40732   done
40733 IFS=$as_save_IFS
40734 
40735   ;;
40736 esac
40737 fi
40738 GNM=$ac_cv_path_GNM
40739 if test -n "$GNM"; then
40740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40741 $as_echo "$GNM" >&6; }
40742 else
40743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40744 $as_echo "no" >&6; }
40745 fi
40746 
40747 
40748           if test "x$GNM" = x; then
40749             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40750           fi
40751         else
40752           # Otherwise we believe it is a complete path. Use it as it is.
40753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40754 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40755           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40756 $as_echo_n "checking for GNM... " >&6; }
40757           if test ! -x "$tool_specified"; then
40758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40759 $as_echo "not found" >&6; }
40760             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40761           fi
40762           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40763 $as_echo "$tool_specified" >&6; }
40764         fi
40765       fi
40766     fi
40767 
40768   fi
40769 
40770 
40771 
40772   # Only process if variable expands to non-empty
40773 
40774   if test "x$GNM" != x; then
40775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40776 
40777   # First separate the path from the arguments. This will split at the first
40778   # space.
40779   complete="$GNM"
40780   path="${complete%% *}"
40781   tmp="$complete EOL"
40782   arguments="${tmp#* }"
40783 
40784   # Input might be given as Windows format, start by converting to
40785   # unix format.
40786   new_path=`$CYGPATH -u "$path"`
40787 
40788   # Now try to locate executable using which
40789   new_path=`$WHICH "$new_path" 2> /dev/null`
40790   # bat and cmd files are not always considered executable in cygwin causing which
40791   # to not find them
40792   if test "x$new_path" = x \
40793       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40794       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40795     new_path=`$CYGPATH -u "$path"`
40796   fi
40797   if test "x$new_path" = x; then
40798     # Oops. Which didn't find the executable.
40799     # The splitting of arguments from the executable at a space might have been incorrect,
40800     # since paths with space are more likely in Windows. Give it another try with the whole
40801     # argument.
40802     path="$complete"
40803     arguments="EOL"
40804     new_path=`$CYGPATH -u "$path"`
40805     new_path=`$WHICH "$new_path" 2> /dev/null`
40806     # bat and cmd files are not always considered executable in cygwin causing which
40807     # to not find them
40808     if test "x$new_path" = x \
40809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40811       new_path=`$CYGPATH -u "$path"`
40812     fi
40813     if test "x$new_path" = x; then
40814       # It's still not found. Now this is an unrecoverable error.
40815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40816 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40817       has_space=`$ECHO "$complete" | $GREP " "`
40818       if test "x$has_space" != x; then
40819         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40820 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40821       fi
40822       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40823     fi
40824   fi
40825 
40826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40829   # "foo.exe" is OK but "foo" is an error.
40830   #
40831   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40832   # It is also a way to make sure we got the proper file name for the real test later on.
40833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40834   if test "x$test_shortpath" = x; then
40835     # Short path failed, file does not exist as specified.
40836     # Try adding .exe or .cmd
40837     if test -f "${new_path}.exe"; then
40838       input_to_shortpath="${new_path}.exe"
40839     elif test -f "${new_path}.cmd"; then
40840       input_to_shortpath="${new_path}.cmd"
40841     else
40842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40843 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40844       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40845 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40846       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40847     fi
40848   else
40849     input_to_shortpath="$new_path"
40850   fi
40851 
40852   # Call helper function which possibly converts this using DOS-style short mode.
40853   # If so, the updated path is stored in $new_path.
40854   new_path="$input_to_shortpath"
40855 
40856   input_path="$input_to_shortpath"
40857   # Check if we need to convert this using DOS-style short mode. If the path
40858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40859   # take no chances and rewrite it.
40860   # Note: m4 eats our [], so we need to use [ and ] instead.
40861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40862   if test "x$has_forbidden_chars" != x; then
40863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40867       # Going to short mode and back again did indeed matter. Since short mode is
40868       # case insensitive, let's make it lowercase to improve readability.
40869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40870       # Now convert it back to Unix-style (cygpath)
40871       input_path=`$CYGPATH -u "$shortmode_path"`
40872       new_path="$input_path"
40873     fi
40874   fi
40875 
40876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40877   if test "x$test_cygdrive_prefix" = x; then
40878     # As a simple fix, exclude /usr/bin since it's not a real path.
40879     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40881       # a path prefixed by /cygdrive for fixpath to work.
40882       new_path="$CYGWIN_ROOT_PATH$input_path"
40883     fi
40884   fi
40885 
40886   # remove trailing .exe if any
40887   new_path="${new_path/%.exe/}"
40888 
40889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890 
40891   # First separate the path from the arguments. This will split at the first
40892   # space.
40893   complete="$GNM"
40894   path="${complete%% *}"
40895   tmp="$complete EOL"
40896   arguments="${tmp#* }"
40897 
40898   # Input might be given as Windows format, start by converting to
40899   # unix format.
40900   new_path="$path"
40901 
40902   windows_path="$new_path"
40903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40904     unix_path=`$CYGPATH -u "$windows_path"`
40905     new_path="$unix_path"
40906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40908     new_path="$unix_path"
40909   fi
40910 
40911 
40912   # Now try to locate executable using which
40913   new_path=`$WHICH "$new_path" 2> /dev/null`
40914 
40915   if test "x$new_path" = x; then
40916     # Oops. Which didn't find the executable.
40917     # The splitting of arguments from the executable at a space might have been incorrect,
40918     # since paths with space are more likely in Windows. Give it another try with the whole
40919     # argument.
40920     path="$complete"
40921     arguments="EOL"
40922     new_path="$path"
40923 
40924   windows_path="$new_path"
40925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40926     unix_path=`$CYGPATH -u "$windows_path"`
40927     new_path="$unix_path"
40928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40930     new_path="$unix_path"
40931   fi
40932 
40933 
40934     new_path=`$WHICH "$new_path" 2> /dev/null`
40935     # bat and cmd files are not always considered executable in MSYS causing which
40936     # to not find them
40937     if test "x$new_path" = x \
40938         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40939         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40940       new_path="$path"
40941 
40942   windows_path="$new_path"
40943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40944     unix_path=`$CYGPATH -u "$windows_path"`
40945     new_path="$unix_path"
40946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40948     new_path="$unix_path"
40949   fi
40950 
40951     fi
40952 
40953     if test "x$new_path" = x; then
40954       # It's still not found. Now this is an unrecoverable error.
40955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40956 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40957       has_space=`$ECHO "$complete" | $GREP " "`
40958       if test "x$has_space" != x; then
40959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40961       fi
40962       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40963     fi
40964   fi
40965 
40966   # Now new_path has a complete unix path to the binary
40967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40968     # Keep paths in /bin as-is, but remove trailing .exe if any
40969     new_path="${new_path/%.exe/}"
40970     # Do not save /bin paths to all_fixpath_prefixes!
40971   else
40972     # Not in mixed or Windows style, start by that.
40973     new_path=`cmd //c echo $new_path`
40974 
40975   input_path="$new_path"
40976   # Check if we need to convert this using DOS-style short mode. If the path
40977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40978   # take no chances and rewrite it.
40979   # Note: m4 eats our [], so we need to use [ and ] instead.
40980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40981   if test "x$has_forbidden_chars" != x; then
40982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40984   fi
40985 
40986     # Output is in $new_path
40987 
40988   windows_path="$new_path"
40989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40990     unix_path=`$CYGPATH -u "$windows_path"`
40991     new_path="$unix_path"
40992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40994     new_path="$unix_path"
40995   fi
40996 
40997     # remove trailing .exe if any
40998     new_path="${new_path/%.exe/}"
40999 
41000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41002   fi
41003 
41004     else
41005       # We're on a unix platform. Hooray! :)
41006       # First separate the path from the arguments. This will split at the first
41007       # space.
41008       complete="$GNM"
41009       path="${complete%% *}"
41010       tmp="$complete EOL"
41011       arguments="${tmp#* }"
41012 
41013       # Cannot rely on the command "which" here since it doesn't always work.
41014       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41015       if test -z "$is_absolute_path"; then
41016         # Path to executable is not absolute. Find it.
41017         IFS_save="$IFS"
41018         IFS=:
41019         for p in $PATH; do
41020           if test -f "$p/$path" && test -x "$p/$path"; then
41021             new_path="$p/$path"
41022             break
41023           fi
41024         done
41025         IFS="$IFS_save"
41026       else
41027         # This is an absolute path, we can use it without further modifications.
41028         new_path="$path"
41029       fi
41030 
41031       if test "x$new_path" = x; then
41032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41033 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41034         has_space=`$ECHO "$complete" | $GREP " "`
41035         if test "x$has_space" != x; then
41036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41038         fi
41039         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41040       fi
41041     fi
41042 
41043     # Now join together the path and the arguments once again
41044     if test "x$arguments" != xEOL; then
41045       new_complete="$new_path ${arguments% *}"
41046     else
41047       new_complete="$new_path"
41048     fi
41049 
41050     if test "x$complete" != "x$new_complete"; then
41051       GNM="$new_complete"
41052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41053 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41054     fi
41055   fi
41056 
41057   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41058     # FIXME: we should unify this with the solaris case above.
41059 
41060 
41061   # Publish this variable in the help.
41062 
41063 
41064   if [ -z "${STRIP+x}" ]; then
41065     # The variable is not set by user, try to locate tool using the code snippet
41066     if test -n "$ac_tool_prefix"; then
41067   for ac_prog in strip
41068   do
41069     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41070 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072 $as_echo_n "checking for $ac_word... " >&6; }
41073 if ${ac_cv_prog_STRIP+:} false; then :
41074   $as_echo_n "(cached) " >&6
41075 else
41076   if test -n "$STRIP"; then
41077   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41078 else
41079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080 for as_dir in $PATH
41081 do
41082   IFS=$as_save_IFS
41083   test -z "$as_dir" && as_dir=.
41084     for ac_exec_ext in '' $ac_executable_extensions; do
41085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088     break 2
41089   fi
41090 done
41091   done
41092 IFS=$as_save_IFS
41093 
41094 fi
41095 fi
41096 STRIP=$ac_cv_prog_STRIP
41097 if test -n "$STRIP"; then
41098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41099 $as_echo "$STRIP" >&6; }
41100 else
41101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102 $as_echo "no" >&6; }
41103 fi
41104 
41105 
41106     test -n "$STRIP" && break
41107   done
41108 fi
41109 if test -z "$STRIP"; then
41110   ac_ct_STRIP=$STRIP
41111   for ac_prog in strip
41112 do
41113   # Extract the first word of "$ac_prog", so it can be a program name with args.
41114 set dummy $ac_prog; ac_word=$2
41115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41116 $as_echo_n "checking for $ac_word... " >&6; }
41117 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41118   $as_echo_n "(cached) " >&6
41119 else
41120   if test -n "$ac_ct_STRIP"; then
41121   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41122 else
41123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41124 for as_dir in $PATH
41125 do
41126   IFS=$as_save_IFS
41127   test -z "$as_dir" && as_dir=.
41128     for ac_exec_ext in '' $ac_executable_extensions; do
41129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41130     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41132     break 2
41133   fi
41134 done
41135   done
41136 IFS=$as_save_IFS
41137 
41138 fi
41139 fi
41140 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41141 if test -n "$ac_ct_STRIP"; then
41142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41143 $as_echo "$ac_ct_STRIP" >&6; }
41144 else
41145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146 $as_echo "no" >&6; }
41147 fi
41148 
41149 
41150   test -n "$ac_ct_STRIP" && break
41151 done
41152 
41153   if test "x$ac_ct_STRIP" = x; then
41154     STRIP=""
41155   else
41156     case $cross_compiling:$ac_tool_warned in
41157 yes:)
41158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41159 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41160 ac_tool_warned=yes ;;
41161 esac
41162     STRIP=$ac_ct_STRIP
41163   fi
41164 fi
41165 
41166   else
41167     # The variable is set, but is it from the command line or the environment?
41168 
41169     # Try to remove the string !STRIP! from our list.
41170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41172       # If it failed, the variable was not from the command line. Ignore it,
41173       # but warn the user (except for BASH, which is always set by the calling BASH).
41174       if test "xSTRIP" != xBASH; then
41175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41176 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41177       fi
41178       # Try to locate tool using the code snippet
41179       if test -n "$ac_tool_prefix"; then
41180   for ac_prog in strip
41181   do
41182     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41183 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185 $as_echo_n "checking for $ac_word... " >&6; }
41186 if ${ac_cv_prog_STRIP+:} false; then :
41187   $as_echo_n "(cached) " >&6
41188 else
41189   if test -n "$STRIP"; then
41190   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41191 else
41192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193 for as_dir in $PATH
41194 do
41195   IFS=$as_save_IFS
41196   test -z "$as_dir" && as_dir=.
41197     for ac_exec_ext in '' $ac_executable_extensions; do
41198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201     break 2
41202   fi
41203 done
41204   done
41205 IFS=$as_save_IFS
41206 
41207 fi
41208 fi
41209 STRIP=$ac_cv_prog_STRIP
41210 if test -n "$STRIP"; then
41211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41212 $as_echo "$STRIP" >&6; }
41213 else
41214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215 $as_echo "no" >&6; }
41216 fi
41217 
41218 
41219     test -n "$STRIP" && break
41220   done
41221 fi
41222 if test -z "$STRIP"; then
41223   ac_ct_STRIP=$STRIP
41224   for ac_prog in strip
41225 do
41226   # Extract the first word of "$ac_prog", so it can be a program name with args.
41227 set dummy $ac_prog; ac_word=$2
41228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229 $as_echo_n "checking for $ac_word... " >&6; }
41230 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41231   $as_echo_n "(cached) " >&6
41232 else
41233   if test -n "$ac_ct_STRIP"; then
41234   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41235 else
41236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237 for as_dir in $PATH
41238 do
41239   IFS=$as_save_IFS
41240   test -z "$as_dir" && as_dir=.
41241     for ac_exec_ext in '' $ac_executable_extensions; do
41242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245     break 2
41246   fi
41247 done
41248   done
41249 IFS=$as_save_IFS
41250 
41251 fi
41252 fi
41253 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41254 if test -n "$ac_ct_STRIP"; then
41255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41256 $as_echo "$ac_ct_STRIP" >&6; }
41257 else
41258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259 $as_echo "no" >&6; }
41260 fi
41261 
41262 
41263   test -n "$ac_ct_STRIP" && break
41264 done
41265 
41266   if test "x$ac_ct_STRIP" = x; then
41267     STRIP=""
41268   else
41269     case $cross_compiling:$ac_tool_warned in
41270 yes:)
41271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41272 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41273 ac_tool_warned=yes ;;
41274 esac
41275     STRIP=$ac_ct_STRIP
41276   fi
41277 fi
41278 
41279     else
41280       # If it succeeded, then it was overridden by the user. We will use it
41281       # for the tool.
41282 
41283       # First remove it from the list of overridden variables, so we can test
41284       # for unknown variables in the end.
41285       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41286 
41287       # Check if we try to supply an empty value
41288       if test "x$STRIP" = x; then
41289         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41290 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41291         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41292 $as_echo_n "checking for STRIP... " >&6; }
41293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41294 $as_echo "disabled" >&6; }
41295       else
41296         # Check if the provided tool contains a complete path.
41297         tool_specified="$STRIP"
41298         tool_basename="${tool_specified##*/}"
41299         if test "x$tool_basename" = "x$tool_specified"; then
41300           # A command without a complete path is provided, search $PATH.
41301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41302 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41303           # Extract the first word of "$tool_basename", so it can be a program name with args.
41304 set dummy $tool_basename; ac_word=$2
41305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41306 $as_echo_n "checking for $ac_word... " >&6; }
41307 if ${ac_cv_path_STRIP+:} false; then :
41308   $as_echo_n "(cached) " >&6
41309 else
41310   case $STRIP in
41311   [\\/]* | ?:[\\/]*)
41312   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41313   ;;
41314   *)
41315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41316 for as_dir in $PATH
41317 do
41318   IFS=$as_save_IFS
41319   test -z "$as_dir" && as_dir=.
41320     for ac_exec_ext in '' $ac_executable_extensions; do
41321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41322     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41324     break 2
41325   fi
41326 done
41327   done
41328 IFS=$as_save_IFS
41329 
41330   ;;
41331 esac
41332 fi
41333 STRIP=$ac_cv_path_STRIP
41334 if test -n "$STRIP"; then
41335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41336 $as_echo "$STRIP" >&6; }
41337 else
41338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41339 $as_echo "no" >&6; }
41340 fi
41341 
41342 
41343           if test "x$STRIP" = x; then
41344             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41345           fi
41346         else
41347           # Otherwise we believe it is a complete path. Use it as it is.
41348           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41349 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41350           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41351 $as_echo_n "checking for STRIP... " >&6; }
41352           if test ! -x "$tool_specified"; then
41353             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41354 $as_echo "not found" >&6; }
41355             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41356           fi
41357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41358 $as_echo "$tool_specified" >&6; }
41359         fi
41360       fi
41361     fi
41362 
41363   fi
41364 
41365 
41366 
41367   # Only process if variable expands to non-empty
41368 
41369   if test "x$STRIP" != x; then
41370     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41371 
41372   # First separate the path from the arguments. This will split at the first
41373   # space.
41374   complete="$STRIP"
41375   path="${complete%% *}"
41376   tmp="$complete EOL"
41377   arguments="${tmp#* }"
41378 
41379   # Input might be given as Windows format, start by converting to
41380   # unix format.
41381   new_path=`$CYGPATH -u "$path"`
41382 
41383   # Now try to locate executable using which
41384   new_path=`$WHICH "$new_path" 2> /dev/null`
41385   # bat and cmd files are not always considered executable in cygwin causing which
41386   # to not find them
41387   if test "x$new_path" = x \
41388       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41389       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41390     new_path=`$CYGPATH -u "$path"`
41391   fi
41392   if test "x$new_path" = x; then
41393     # Oops. Which didn't find the executable.
41394     # The splitting of arguments from the executable at a space might have been incorrect,
41395     # since paths with space are more likely in Windows. Give it another try with the whole
41396     # argument.
41397     path="$complete"
41398     arguments="EOL"
41399     new_path=`$CYGPATH -u "$path"`
41400     new_path=`$WHICH "$new_path" 2> /dev/null`
41401     # bat and cmd files are not always considered executable in cygwin causing which
41402     # to not find them
41403     if test "x$new_path" = x \
41404         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41405         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41406       new_path=`$CYGPATH -u "$path"`
41407     fi
41408     if test "x$new_path" = x; then
41409       # It's still not found. Now this is an unrecoverable error.
41410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41411 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41412       has_space=`$ECHO "$complete" | $GREP " "`
41413       if test "x$has_space" != x; then
41414         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41415 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41416       fi
41417       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41418     fi
41419   fi
41420 
41421   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41422   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41423   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41424   # "foo.exe" is OK but "foo" is an error.
41425   #
41426   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41427   # It is also a way to make sure we got the proper file name for the real test later on.
41428   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41429   if test "x$test_shortpath" = x; then
41430     # Short path failed, file does not exist as specified.
41431     # Try adding .exe or .cmd
41432     if test -f "${new_path}.exe"; then
41433       input_to_shortpath="${new_path}.exe"
41434     elif test -f "${new_path}.cmd"; then
41435       input_to_shortpath="${new_path}.cmd"
41436     else
41437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41438 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41439       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41440 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41441       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41442     fi
41443   else
41444     input_to_shortpath="$new_path"
41445   fi
41446 
41447   # Call helper function which possibly converts this using DOS-style short mode.
41448   # If so, the updated path is stored in $new_path.
41449   new_path="$input_to_shortpath"
41450 
41451   input_path="$input_to_shortpath"
41452   # Check if we need to convert this using DOS-style short mode. If the path
41453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41454   # take no chances and rewrite it.
41455   # Note: m4 eats our [], so we need to use [ and ] instead.
41456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41457   if test "x$has_forbidden_chars" != x; then
41458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41459     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41460     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41461     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41462       # Going to short mode and back again did indeed matter. Since short mode is
41463       # case insensitive, let's make it lowercase to improve readability.
41464       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41465       # Now convert it back to Unix-style (cygpath)
41466       input_path=`$CYGPATH -u "$shortmode_path"`
41467       new_path="$input_path"
41468     fi
41469   fi
41470 
41471   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41472   if test "x$test_cygdrive_prefix" = x; then
41473     # As a simple fix, exclude /usr/bin since it's not a real path.
41474     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41475       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41476       # a path prefixed by /cygdrive for fixpath to work.
41477       new_path="$CYGWIN_ROOT_PATH$input_path"
41478     fi
41479   fi
41480 
41481   # remove trailing .exe if any
41482   new_path="${new_path/%.exe/}"
41483 
41484     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41485 
41486   # First separate the path from the arguments. This will split at the first
41487   # space.
41488   complete="$STRIP"
41489   path="${complete%% *}"
41490   tmp="$complete EOL"
41491   arguments="${tmp#* }"
41492 
41493   # Input might be given as Windows format, start by converting to
41494   # unix format.
41495   new_path="$path"
41496 
41497   windows_path="$new_path"
41498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41499     unix_path=`$CYGPATH -u "$windows_path"`
41500     new_path="$unix_path"
41501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41503     new_path="$unix_path"
41504   fi
41505 
41506 
41507   # Now try to locate executable using which
41508   new_path=`$WHICH "$new_path" 2> /dev/null`
41509 
41510   if test "x$new_path" = x; then
41511     # Oops. Which didn't find the executable.
41512     # The splitting of arguments from the executable at a space might have been incorrect,
41513     # since paths with space are more likely in Windows. Give it another try with the whole
41514     # argument.
41515     path="$complete"
41516     arguments="EOL"
41517     new_path="$path"
41518 
41519   windows_path="$new_path"
41520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41521     unix_path=`$CYGPATH -u "$windows_path"`
41522     new_path="$unix_path"
41523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41525     new_path="$unix_path"
41526   fi
41527 
41528 
41529     new_path=`$WHICH "$new_path" 2> /dev/null`
41530     # bat and cmd files are not always considered executable in MSYS causing which
41531     # to not find them
41532     if test "x$new_path" = x \
41533         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41534         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41535       new_path="$path"
41536 
41537   windows_path="$new_path"
41538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41539     unix_path=`$CYGPATH -u "$windows_path"`
41540     new_path="$unix_path"
41541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41543     new_path="$unix_path"
41544   fi
41545 
41546     fi
41547 
41548     if test "x$new_path" = x; then
41549       # It's still not found. Now this is an unrecoverable error.
41550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41551 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41552       has_space=`$ECHO "$complete" | $GREP " "`
41553       if test "x$has_space" != x; then
41554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41556       fi
41557       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41558     fi
41559   fi
41560 
41561   # Now new_path has a complete unix path to the binary
41562   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41563     # Keep paths in /bin as-is, but remove trailing .exe if any
41564     new_path="${new_path/%.exe/}"
41565     # Do not save /bin paths to all_fixpath_prefixes!
41566   else
41567     # Not in mixed or Windows style, start by that.
41568     new_path=`cmd //c echo $new_path`
41569 
41570   input_path="$new_path"
41571   # Check if we need to convert this using DOS-style short mode. If the path
41572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41573   # take no chances and rewrite it.
41574   # Note: m4 eats our [], so we need to use [ and ] instead.
41575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41576   if test "x$has_forbidden_chars" != x; then
41577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41578     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41579   fi
41580 
41581     # Output is in $new_path
41582 
41583   windows_path="$new_path"
41584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41585     unix_path=`$CYGPATH -u "$windows_path"`
41586     new_path="$unix_path"
41587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41589     new_path="$unix_path"
41590   fi
41591 
41592     # remove trailing .exe if any
41593     new_path="${new_path/%.exe/}"
41594 
41595     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41596     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41597   fi
41598 
41599     else
41600       # We're on a unix platform. Hooray! :)
41601       # First separate the path from the arguments. This will split at the first
41602       # space.
41603       complete="$STRIP"
41604       path="${complete%% *}"
41605       tmp="$complete EOL"
41606       arguments="${tmp#* }"
41607 
41608       # Cannot rely on the command "which" here since it doesn't always work.
41609       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41610       if test -z "$is_absolute_path"; then
41611         # Path to executable is not absolute. Find it.
41612         IFS_save="$IFS"
41613         IFS=:
41614         for p in $PATH; do
41615           if test -f "$p/$path" && test -x "$p/$path"; then
41616             new_path="$p/$path"
41617             break
41618           fi
41619         done
41620         IFS="$IFS_save"
41621       else
41622         # This is an absolute path, we can use it without further modifications.
41623         new_path="$path"
41624       fi
41625 
41626       if test "x$new_path" = x; then
41627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41628 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41629         has_space=`$ECHO "$complete" | $GREP " "`
41630         if test "x$has_space" != x; then
41631           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41632 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41633         fi
41634         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41635       fi
41636     fi
41637 
41638     # Now join together the path and the arguments once again
41639     if test "x$arguments" != xEOL; then
41640       new_complete="$new_path ${arguments% *}"
41641     else
41642       new_complete="$new_path"
41643     fi
41644 
41645     if test "x$complete" != "x$new_complete"; then
41646       STRIP="$new_complete"
41647       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41648 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41649     fi
41650   fi
41651 
41652     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41653 
41654 
41655   # Publish this variable in the help.
41656 
41657 
41658   if [ -z "${NM+x}" ]; then
41659     # The variable is not set by user, try to locate tool using the code snippet
41660     if test -n "$ac_tool_prefix"; then
41661   for ac_prog in nm gcc-nm
41662   do
41663     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41664 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41666 $as_echo_n "checking for $ac_word... " >&6; }
41667 if ${ac_cv_prog_NM+:} false; then :
41668   $as_echo_n "(cached) " >&6
41669 else
41670   if test -n "$NM"; then
41671   ac_cv_prog_NM="$NM" # Let the user override the test.
41672 else
41673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41674 for as_dir in $PATH
41675 do
41676   IFS=$as_save_IFS
41677   test -z "$as_dir" && as_dir=.
41678     for ac_exec_ext in '' $ac_executable_extensions; do
41679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41680     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41682     break 2
41683   fi
41684 done
41685   done
41686 IFS=$as_save_IFS
41687 
41688 fi
41689 fi
41690 NM=$ac_cv_prog_NM
41691 if test -n "$NM"; then
41692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41693 $as_echo "$NM" >&6; }
41694 else
41695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41696 $as_echo "no" >&6; }
41697 fi
41698 
41699 
41700     test -n "$NM" && break
41701   done
41702 fi
41703 if test -z "$NM"; then
41704   ac_ct_NM=$NM
41705   for ac_prog in nm gcc-nm
41706 do
41707   # Extract the first word of "$ac_prog", so it can be a program name with args.
41708 set dummy $ac_prog; ac_word=$2
41709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41710 $as_echo_n "checking for $ac_word... " >&6; }
41711 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41712   $as_echo_n "(cached) " >&6
41713 else
41714   if test -n "$ac_ct_NM"; then
41715   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41716 else
41717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41718 for as_dir in $PATH
41719 do
41720   IFS=$as_save_IFS
41721   test -z "$as_dir" && as_dir=.
41722     for ac_exec_ext in '' $ac_executable_extensions; do
41723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41724     ac_cv_prog_ac_ct_NM="$ac_prog"
41725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41726     break 2
41727   fi
41728 done
41729   done
41730 IFS=$as_save_IFS
41731 
41732 fi
41733 fi
41734 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41735 if test -n "$ac_ct_NM"; then
41736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41737 $as_echo "$ac_ct_NM" >&6; }
41738 else
41739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41740 $as_echo "no" >&6; }
41741 fi
41742 
41743 
41744   test -n "$ac_ct_NM" && break
41745 done
41746 
41747   if test "x$ac_ct_NM" = x; then
41748     NM=""
41749   else
41750     case $cross_compiling:$ac_tool_warned in
41751 yes:)
41752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41753 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41754 ac_tool_warned=yes ;;
41755 esac
41756     NM=$ac_ct_NM
41757   fi
41758 fi
41759 
41760   else
41761     # The variable is set, but is it from the command line or the environment?
41762 
41763     # Try to remove the string !NM! from our list.
41764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41766       # If it failed, the variable was not from the command line. Ignore it,
41767       # but warn the user (except for BASH, which is always set by the calling BASH).
41768       if test "xNM" != xBASH; then
41769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41770 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41771       fi
41772       # Try to locate tool using the code snippet
41773       if test -n "$ac_tool_prefix"; then
41774   for ac_prog in nm gcc-nm
41775   do
41776     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41777 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41779 $as_echo_n "checking for $ac_word... " >&6; }
41780 if ${ac_cv_prog_NM+:} false; then :
41781   $as_echo_n "(cached) " >&6
41782 else
41783   if test -n "$NM"; then
41784   ac_cv_prog_NM="$NM" # Let the user override the test.
41785 else
41786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41787 for as_dir in $PATH
41788 do
41789   IFS=$as_save_IFS
41790   test -z "$as_dir" && as_dir=.
41791     for ac_exec_ext in '' $ac_executable_extensions; do
41792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41793     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41795     break 2
41796   fi
41797 done
41798   done
41799 IFS=$as_save_IFS
41800 
41801 fi
41802 fi
41803 NM=$ac_cv_prog_NM
41804 if test -n "$NM"; then
41805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41806 $as_echo "$NM" >&6; }
41807 else
41808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41809 $as_echo "no" >&6; }
41810 fi
41811 
41812 
41813     test -n "$NM" && break
41814   done
41815 fi
41816 if test -z "$NM"; then
41817   ac_ct_NM=$NM
41818   for ac_prog in nm gcc-nm
41819 do
41820   # Extract the first word of "$ac_prog", so it can be a program name with args.
41821 set dummy $ac_prog; ac_word=$2
41822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41823 $as_echo_n "checking for $ac_word... " >&6; }
41824 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41825   $as_echo_n "(cached) " >&6
41826 else
41827   if test -n "$ac_ct_NM"; then
41828   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41829 else
41830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41831 for as_dir in $PATH
41832 do
41833   IFS=$as_save_IFS
41834   test -z "$as_dir" && as_dir=.
41835     for ac_exec_ext in '' $ac_executable_extensions; do
41836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41837     ac_cv_prog_ac_ct_NM="$ac_prog"
41838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41839     break 2
41840   fi
41841 done
41842   done
41843 IFS=$as_save_IFS
41844 
41845 fi
41846 fi
41847 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41848 if test -n "$ac_ct_NM"; then
41849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41850 $as_echo "$ac_ct_NM" >&6; }
41851 else
41852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41853 $as_echo "no" >&6; }
41854 fi
41855 
41856 
41857   test -n "$ac_ct_NM" && break
41858 done
41859 
41860   if test "x$ac_ct_NM" = x; then
41861     NM=""
41862   else
41863     case $cross_compiling:$ac_tool_warned in
41864 yes:)
41865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41866 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41867 ac_tool_warned=yes ;;
41868 esac
41869     NM=$ac_ct_NM
41870   fi
41871 fi
41872 
41873     else
41874       # If it succeeded, then it was overridden by the user. We will use it
41875       # for the tool.
41876 
41877       # First remove it from the list of overridden variables, so we can test
41878       # for unknown variables in the end.
41879       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41880 
41881       # Check if we try to supply an empty value
41882       if test "x$NM" = x; then
41883         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41884 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41886 $as_echo_n "checking for NM... " >&6; }
41887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41888 $as_echo "disabled" >&6; }
41889       else
41890         # Check if the provided tool contains a complete path.
41891         tool_specified="$NM"
41892         tool_basename="${tool_specified##*/}"
41893         if test "x$tool_basename" = "x$tool_specified"; then
41894           # A command without a complete path is provided, search $PATH.
41895           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41896 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41897           # Extract the first word of "$tool_basename", so it can be a program name with args.
41898 set dummy $tool_basename; ac_word=$2
41899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41900 $as_echo_n "checking for $ac_word... " >&6; }
41901 if ${ac_cv_path_NM+:} false; then :
41902   $as_echo_n "(cached) " >&6
41903 else
41904   case $NM in
41905   [\\/]* | ?:[\\/]*)
41906   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41907   ;;
41908   *)
41909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41910 for as_dir in $PATH
41911 do
41912   IFS=$as_save_IFS
41913   test -z "$as_dir" && as_dir=.
41914     for ac_exec_ext in '' $ac_executable_extensions; do
41915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41916     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41918     break 2
41919   fi
41920 done
41921   done
41922 IFS=$as_save_IFS
41923 
41924   ;;
41925 esac
41926 fi
41927 NM=$ac_cv_path_NM
41928 if test -n "$NM"; then
41929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41930 $as_echo "$NM" >&6; }
41931 else
41932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41933 $as_echo "no" >&6; }
41934 fi
41935 
41936 
41937           if test "x$NM" = x; then
41938             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41939           fi
41940         else
41941           # Otherwise we believe it is a complete path. Use it as it is.
41942           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41943 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41944           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41945 $as_echo_n "checking for NM... " >&6; }
41946           if test ! -x "$tool_specified"; then
41947             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41948 $as_echo "not found" >&6; }
41949             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41950           fi
41951           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41952 $as_echo "$tool_specified" >&6; }
41953         fi
41954       fi
41955     fi
41956 
41957   fi
41958 
41959 
41960     else
41961 
41962 
41963   # Publish this variable in the help.
41964 
41965 
41966   if [ -z "${NM+x}" ]; then
41967     # The variable is not set by user, try to locate tool using the code snippet
41968     if test -n "$ac_tool_prefix"; then
41969   for ac_prog in nm
41970   do
41971     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41972 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41974 $as_echo_n "checking for $ac_word... " >&6; }
41975 if ${ac_cv_prog_NM+:} false; then :
41976   $as_echo_n "(cached) " >&6
41977 else
41978   if test -n "$NM"; then
41979   ac_cv_prog_NM="$NM" # Let the user override the test.
41980 else
41981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41982 for as_dir in $PATH
41983 do
41984   IFS=$as_save_IFS
41985   test -z "$as_dir" && as_dir=.
41986     for ac_exec_ext in '' $ac_executable_extensions; do
41987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41988     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41990     break 2
41991   fi
41992 done
41993   done
41994 IFS=$as_save_IFS
41995 
41996 fi
41997 fi
41998 NM=$ac_cv_prog_NM
41999 if test -n "$NM"; then
42000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42001 $as_echo "$NM" >&6; }
42002 else
42003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42004 $as_echo "no" >&6; }
42005 fi
42006 
42007 
42008     test -n "$NM" && break
42009   done
42010 fi
42011 if test -z "$NM"; then
42012   ac_ct_NM=$NM
42013   for ac_prog in nm
42014 do
42015   # Extract the first word of "$ac_prog", so it can be a program name with args.
42016 set dummy $ac_prog; ac_word=$2
42017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42018 $as_echo_n "checking for $ac_word... " >&6; }
42019 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42020   $as_echo_n "(cached) " >&6
42021 else
42022   if test -n "$ac_ct_NM"; then
42023   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42024 else
42025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42026 for as_dir in $PATH
42027 do
42028   IFS=$as_save_IFS
42029   test -z "$as_dir" && as_dir=.
42030     for ac_exec_ext in '' $ac_executable_extensions; do
42031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42032     ac_cv_prog_ac_ct_NM="$ac_prog"
42033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42034     break 2
42035   fi
42036 done
42037   done
42038 IFS=$as_save_IFS
42039 
42040 fi
42041 fi
42042 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42043 if test -n "$ac_ct_NM"; then
42044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42045 $as_echo "$ac_ct_NM" >&6; }
42046 else
42047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048 $as_echo "no" >&6; }
42049 fi
42050 
42051 
42052   test -n "$ac_ct_NM" && break
42053 done
42054 
42055   if test "x$ac_ct_NM" = x; then
42056     NM=""
42057   else
42058     case $cross_compiling:$ac_tool_warned in
42059 yes:)
42060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42061 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42062 ac_tool_warned=yes ;;
42063 esac
42064     NM=$ac_ct_NM
42065   fi
42066 fi
42067 
42068   else
42069     # The variable is set, but is it from the command line or the environment?
42070 
42071     # Try to remove the string !NM! from our list.
42072     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42073     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42074       # If it failed, the variable was not from the command line. Ignore it,
42075       # but warn the user (except for BASH, which is always set by the calling BASH).
42076       if test "xNM" != xBASH; then
42077         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42078 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42079       fi
42080       # Try to locate tool using the code snippet
42081       if test -n "$ac_tool_prefix"; then
42082   for ac_prog in nm
42083   do
42084     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42085 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42087 $as_echo_n "checking for $ac_word... " >&6; }
42088 if ${ac_cv_prog_NM+:} false; then :
42089   $as_echo_n "(cached) " >&6
42090 else
42091   if test -n "$NM"; then
42092   ac_cv_prog_NM="$NM" # Let the user override the test.
42093 else
42094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42095 for as_dir in $PATH
42096 do
42097   IFS=$as_save_IFS
42098   test -z "$as_dir" && as_dir=.
42099     for ac_exec_ext in '' $ac_executable_extensions; do
42100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42101     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42103     break 2
42104   fi
42105 done
42106   done
42107 IFS=$as_save_IFS
42108 
42109 fi
42110 fi
42111 NM=$ac_cv_prog_NM
42112 if test -n "$NM"; then
42113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42114 $as_echo "$NM" >&6; }
42115 else
42116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42117 $as_echo "no" >&6; }
42118 fi
42119 
42120 
42121     test -n "$NM" && break
42122   done
42123 fi
42124 if test -z "$NM"; then
42125   ac_ct_NM=$NM
42126   for ac_prog in nm
42127 do
42128   # Extract the first word of "$ac_prog", so it can be a program name with args.
42129 set dummy $ac_prog; ac_word=$2
42130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42131 $as_echo_n "checking for $ac_word... " >&6; }
42132 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42133   $as_echo_n "(cached) " >&6
42134 else
42135   if test -n "$ac_ct_NM"; then
42136   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42137 else
42138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42139 for as_dir in $PATH
42140 do
42141   IFS=$as_save_IFS
42142   test -z "$as_dir" && as_dir=.
42143     for ac_exec_ext in '' $ac_executable_extensions; do
42144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42145     ac_cv_prog_ac_ct_NM="$ac_prog"
42146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42147     break 2
42148   fi
42149 done
42150   done
42151 IFS=$as_save_IFS
42152 
42153 fi
42154 fi
42155 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42156 if test -n "$ac_ct_NM"; then
42157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42158 $as_echo "$ac_ct_NM" >&6; }
42159 else
42160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42161 $as_echo "no" >&6; }
42162 fi
42163 
42164 
42165   test -n "$ac_ct_NM" && break
42166 done
42167 
42168   if test "x$ac_ct_NM" = x; then
42169     NM=""
42170   else
42171     case $cross_compiling:$ac_tool_warned in
42172 yes:)
42173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42174 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42175 ac_tool_warned=yes ;;
42176 esac
42177     NM=$ac_ct_NM
42178   fi
42179 fi
42180 
42181     else
42182       # If it succeeded, then it was overridden by the user. We will use it
42183       # for the tool.
42184 
42185       # First remove it from the list of overridden variables, so we can test
42186       # for unknown variables in the end.
42187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42188 
42189       # Check if we try to supply an empty value
42190       if test "x$NM" = x; then
42191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42192 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42194 $as_echo_n "checking for NM... " >&6; }
42195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42196 $as_echo "disabled" >&6; }
42197       else
42198         # Check if the provided tool contains a complete path.
42199         tool_specified="$NM"
42200         tool_basename="${tool_specified##*/}"
42201         if test "x$tool_basename" = "x$tool_specified"; then
42202           # A command without a complete path is provided, search $PATH.
42203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42204 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42205           # Extract the first word of "$tool_basename", so it can be a program name with args.
42206 set dummy $tool_basename; ac_word=$2
42207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42208 $as_echo_n "checking for $ac_word... " >&6; }
42209 if ${ac_cv_path_NM+:} false; then :
42210   $as_echo_n "(cached) " >&6
42211 else
42212   case $NM in
42213   [\\/]* | ?:[\\/]*)
42214   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42215   ;;
42216   *)
42217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42218 for as_dir in $PATH
42219 do
42220   IFS=$as_save_IFS
42221   test -z "$as_dir" && as_dir=.
42222     for ac_exec_ext in '' $ac_executable_extensions; do
42223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42224     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42226     break 2
42227   fi
42228 done
42229   done
42230 IFS=$as_save_IFS
42231 
42232   ;;
42233 esac
42234 fi
42235 NM=$ac_cv_path_NM
42236 if test -n "$NM"; then
42237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42238 $as_echo "$NM" >&6; }
42239 else
42240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42241 $as_echo "no" >&6; }
42242 fi
42243 
42244 
42245           if test "x$NM" = x; then
42246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42247           fi
42248         else
42249           # Otherwise we believe it is a complete path. Use it as it is.
42250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42251 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42253 $as_echo_n "checking for NM... " >&6; }
42254           if test ! -x "$tool_specified"; then
42255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42256 $as_echo "not found" >&6; }
42257             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42258           fi
42259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42260 $as_echo "$tool_specified" >&6; }
42261         fi
42262       fi
42263     fi
42264 
42265   fi
42266 
42267 
42268     fi
42269 
42270   # Only process if variable expands to non-empty
42271 
42272   if test "x$NM" != x; then
42273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42274 
42275   # First separate the path from the arguments. This will split at the first
42276   # space.
42277   complete="$NM"
42278   path="${complete%% *}"
42279   tmp="$complete EOL"
42280   arguments="${tmp#* }"
42281 
42282   # Input might be given as Windows format, start by converting to
42283   # unix format.
42284   new_path=`$CYGPATH -u "$path"`
42285 
42286   # Now try to locate executable using which
42287   new_path=`$WHICH "$new_path" 2> /dev/null`
42288   # bat and cmd files are not always considered executable in cygwin causing which
42289   # to not find them
42290   if test "x$new_path" = x \
42291       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42292       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42293     new_path=`$CYGPATH -u "$path"`
42294   fi
42295   if test "x$new_path" = x; then
42296     # Oops. Which didn't find the executable.
42297     # The splitting of arguments from the executable at a space might have been incorrect,
42298     # since paths with space are more likely in Windows. Give it another try with the whole
42299     # argument.
42300     path="$complete"
42301     arguments="EOL"
42302     new_path=`$CYGPATH -u "$path"`
42303     new_path=`$WHICH "$new_path" 2> /dev/null`
42304     # bat and cmd files are not always considered executable in cygwin causing which
42305     # to not find them
42306     if test "x$new_path" = x \
42307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42309       new_path=`$CYGPATH -u "$path"`
42310     fi
42311     if test "x$new_path" = x; then
42312       # It's still not found. Now this is an unrecoverable error.
42313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42314 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42315       has_space=`$ECHO "$complete" | $GREP " "`
42316       if test "x$has_space" != x; then
42317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42319       fi
42320       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42321     fi
42322   fi
42323 
42324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42327   # "foo.exe" is OK but "foo" is an error.
42328   #
42329   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42330   # It is also a way to make sure we got the proper file name for the real test later on.
42331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42332   if test "x$test_shortpath" = x; then
42333     # Short path failed, file does not exist as specified.
42334     # Try adding .exe or .cmd
42335     if test -f "${new_path}.exe"; then
42336       input_to_shortpath="${new_path}.exe"
42337     elif test -f "${new_path}.cmd"; then
42338       input_to_shortpath="${new_path}.cmd"
42339     else
42340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42341 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42344       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42345     fi
42346   else
42347     input_to_shortpath="$new_path"
42348   fi
42349 
42350   # Call helper function which possibly converts this using DOS-style short mode.
42351   # If so, the updated path is stored in $new_path.
42352   new_path="$input_to_shortpath"
42353 
42354   input_path="$input_to_shortpath"
42355   # Check if we need to convert this using DOS-style short mode. If the path
42356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42357   # take no chances and rewrite it.
42358   # Note: m4 eats our [], so we need to use [ and ] instead.
42359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42360   if test "x$has_forbidden_chars" != x; then
42361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42365       # Going to short mode and back again did indeed matter. Since short mode is
42366       # case insensitive, let's make it lowercase to improve readability.
42367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42368       # Now convert it back to Unix-style (cygpath)
42369       input_path=`$CYGPATH -u "$shortmode_path"`
42370       new_path="$input_path"
42371     fi
42372   fi
42373 
42374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42375   if test "x$test_cygdrive_prefix" = x; then
42376     # As a simple fix, exclude /usr/bin since it's not a real path.
42377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42379       # a path prefixed by /cygdrive for fixpath to work.
42380       new_path="$CYGWIN_ROOT_PATH$input_path"
42381     fi
42382   fi
42383 
42384   # remove trailing .exe if any
42385   new_path="${new_path/%.exe/}"
42386 
42387     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42388 
42389   # First separate the path from the arguments. This will split at the first
42390   # space.
42391   complete="$NM"
42392   path="${complete%% *}"
42393   tmp="$complete EOL"
42394   arguments="${tmp#* }"
42395 
42396   # Input might be given as Windows format, start by converting to
42397   # unix format.
42398   new_path="$path"
42399 
42400   windows_path="$new_path"
42401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42402     unix_path=`$CYGPATH -u "$windows_path"`
42403     new_path="$unix_path"
42404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42406     new_path="$unix_path"
42407   fi
42408 
42409 
42410   # Now try to locate executable using which
42411   new_path=`$WHICH "$new_path" 2> /dev/null`
42412 
42413   if test "x$new_path" = x; then
42414     # Oops. Which didn't find the executable.
42415     # The splitting of arguments from the executable at a space might have been incorrect,
42416     # since paths with space are more likely in Windows. Give it another try with the whole
42417     # argument.
42418     path="$complete"
42419     arguments="EOL"
42420     new_path="$path"
42421 
42422   windows_path="$new_path"
42423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42424     unix_path=`$CYGPATH -u "$windows_path"`
42425     new_path="$unix_path"
42426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42428     new_path="$unix_path"
42429   fi
42430 
42431 
42432     new_path=`$WHICH "$new_path" 2> /dev/null`
42433     # bat and cmd files are not always considered executable in MSYS causing which
42434     # to not find them
42435     if test "x$new_path" = x \
42436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42438       new_path="$path"
42439 
42440   windows_path="$new_path"
42441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42442     unix_path=`$CYGPATH -u "$windows_path"`
42443     new_path="$unix_path"
42444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42446     new_path="$unix_path"
42447   fi
42448 
42449     fi
42450 
42451     if test "x$new_path" = x; then
42452       # It's still not found. Now this is an unrecoverable error.
42453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42454 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42455       has_space=`$ECHO "$complete" | $GREP " "`
42456       if test "x$has_space" != x; then
42457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42459       fi
42460       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42461     fi
42462   fi
42463 
42464   # Now new_path has a complete unix path to the binary
42465   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42466     # Keep paths in /bin as-is, but remove trailing .exe if any
42467     new_path="${new_path/%.exe/}"
42468     # Do not save /bin paths to all_fixpath_prefixes!
42469   else
42470     # Not in mixed or Windows style, start by that.
42471     new_path=`cmd //c echo $new_path`
42472 
42473   input_path="$new_path"
42474   # Check if we need to convert this using DOS-style short mode. If the path
42475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42476   # take no chances and rewrite it.
42477   # Note: m4 eats our [], so we need to use [ and ] instead.
42478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42479   if test "x$has_forbidden_chars" != x; then
42480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42482   fi
42483 
42484     # Output is in $new_path
42485 
42486   windows_path="$new_path"
42487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42488     unix_path=`$CYGPATH -u "$windows_path"`
42489     new_path="$unix_path"
42490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42492     new_path="$unix_path"
42493   fi
42494 
42495     # remove trailing .exe if any
42496     new_path="${new_path/%.exe/}"
42497 
42498     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42499     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42500   fi
42501 
42502     else
42503       # We're on a unix platform. Hooray! :)
42504       # First separate the path from the arguments. This will split at the first
42505       # space.
42506       complete="$NM"
42507       path="${complete%% *}"
42508       tmp="$complete EOL"
42509       arguments="${tmp#* }"
42510 
42511       # Cannot rely on the command "which" here since it doesn't always work.
42512       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42513       if test -z "$is_absolute_path"; then
42514         # Path to executable is not absolute. Find it.
42515         IFS_save="$IFS"
42516         IFS=:
42517         for p in $PATH; do
42518           if test -f "$p/$path" && test -x "$p/$path"; then
42519             new_path="$p/$path"
42520             break
42521           fi
42522         done
42523         IFS="$IFS_save"
42524       else
42525         # This is an absolute path, we can use it without further modifications.
42526         new_path="$path"
42527       fi
42528 
42529       if test "x$new_path" = x; then
42530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42531 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42532         has_space=`$ECHO "$complete" | $GREP " "`
42533         if test "x$has_space" != x; then
42534           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42535 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42536         fi
42537         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42538       fi
42539     fi
42540 
42541     # Now join together the path and the arguments once again
42542     if test "x$arguments" != xEOL; then
42543       new_complete="$new_path ${arguments% *}"
42544     else
42545       new_complete="$new_path"
42546     fi
42547 
42548     if test "x$complete" != "x$new_complete"; then
42549       NM="$new_complete"
42550       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42551 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42552     fi
42553   fi
42554 
42555     GNM="$NM"
42556 
42557   fi
42558 
42559   # objcopy is used for moving debug symbols to separate files when
42560   # full debug symbols are enabled.
42561   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42562 
42563 
42564   # Publish this variable in the help.
42565 
42566 
42567   if [ -z "${OBJCOPY+x}" ]; then
42568     # The variable is not set by user, try to locate tool using the code snippet
42569     if test -n "$ac_tool_prefix"; then
42570   for ac_prog in gobjcopy objcopy
42571   do
42572     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42573 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575 $as_echo_n "checking for $ac_word... " >&6; }
42576 if ${ac_cv_prog_OBJCOPY+:} false; then :
42577   $as_echo_n "(cached) " >&6
42578 else
42579   if test -n "$OBJCOPY"; then
42580   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42581 else
42582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583 for as_dir in $PATH
42584 do
42585   IFS=$as_save_IFS
42586   test -z "$as_dir" && as_dir=.
42587     for ac_exec_ext in '' $ac_executable_extensions; do
42588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591     break 2
42592   fi
42593 done
42594   done
42595 IFS=$as_save_IFS
42596 
42597 fi
42598 fi
42599 OBJCOPY=$ac_cv_prog_OBJCOPY
42600 if test -n "$OBJCOPY"; then
42601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42602 $as_echo "$OBJCOPY" >&6; }
42603 else
42604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605 $as_echo "no" >&6; }
42606 fi
42607 
42608 
42609     test -n "$OBJCOPY" && break
42610   done
42611 fi
42612 if test -z "$OBJCOPY"; then
42613   ac_ct_OBJCOPY=$OBJCOPY
42614   for ac_prog in gobjcopy objcopy
42615 do
42616   # Extract the first word of "$ac_prog", so it can be a program name with args.
42617 set dummy $ac_prog; ac_word=$2
42618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619 $as_echo_n "checking for $ac_word... " >&6; }
42620 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42621   $as_echo_n "(cached) " >&6
42622 else
42623   if test -n "$ac_ct_OBJCOPY"; then
42624   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42625 else
42626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627 for as_dir in $PATH
42628 do
42629   IFS=$as_save_IFS
42630   test -z "$as_dir" && as_dir=.
42631     for ac_exec_ext in '' $ac_executable_extensions; do
42632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635     break 2
42636   fi
42637 done
42638   done
42639 IFS=$as_save_IFS
42640 
42641 fi
42642 fi
42643 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42644 if test -n "$ac_ct_OBJCOPY"; then
42645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42646 $as_echo "$ac_ct_OBJCOPY" >&6; }
42647 else
42648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649 $as_echo "no" >&6; }
42650 fi
42651 
42652 
42653   test -n "$ac_ct_OBJCOPY" && break
42654 done
42655 
42656   if test "x$ac_ct_OBJCOPY" = x; then
42657     OBJCOPY=""
42658   else
42659     case $cross_compiling:$ac_tool_warned in
42660 yes:)
42661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42663 ac_tool_warned=yes ;;
42664 esac
42665     OBJCOPY=$ac_ct_OBJCOPY
42666   fi
42667 fi
42668 
42669   else
42670     # The variable is set, but is it from the command line or the environment?
42671 
42672     # Try to remove the string !OBJCOPY! from our list.
42673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42675       # If it failed, the variable was not from the command line. Ignore it,
42676       # but warn the user (except for BASH, which is always set by the calling BASH).
42677       if test "xOBJCOPY" != xBASH; then
42678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42679 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42680       fi
42681       # Try to locate tool using the code snippet
42682       if test -n "$ac_tool_prefix"; then
42683   for ac_prog in gobjcopy objcopy
42684   do
42685     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688 $as_echo_n "checking for $ac_word... " >&6; }
42689 if ${ac_cv_prog_OBJCOPY+:} false; then :
42690   $as_echo_n "(cached) " >&6
42691 else
42692   if test -n "$OBJCOPY"; then
42693   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42694 else
42695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696 for as_dir in $PATH
42697 do
42698   IFS=$as_save_IFS
42699   test -z "$as_dir" && as_dir=.
42700     for ac_exec_ext in '' $ac_executable_extensions; do
42701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704     break 2
42705   fi
42706 done
42707   done
42708 IFS=$as_save_IFS
42709 
42710 fi
42711 fi
42712 OBJCOPY=$ac_cv_prog_OBJCOPY
42713 if test -n "$OBJCOPY"; then
42714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42715 $as_echo "$OBJCOPY" >&6; }
42716 else
42717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718 $as_echo "no" >&6; }
42719 fi
42720 
42721 
42722     test -n "$OBJCOPY" && break
42723   done
42724 fi
42725 if test -z "$OBJCOPY"; then
42726   ac_ct_OBJCOPY=$OBJCOPY
42727   for ac_prog in gobjcopy objcopy
42728 do
42729   # Extract the first word of "$ac_prog", so it can be a program name with args.
42730 set dummy $ac_prog; ac_word=$2
42731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732 $as_echo_n "checking for $ac_word... " >&6; }
42733 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42734   $as_echo_n "(cached) " >&6
42735 else
42736   if test -n "$ac_ct_OBJCOPY"; then
42737   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42738 else
42739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740 for as_dir in $PATH
42741 do
42742   IFS=$as_save_IFS
42743   test -z "$as_dir" && as_dir=.
42744     for ac_exec_ext in '' $ac_executable_extensions; do
42745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748     break 2
42749   fi
42750 done
42751   done
42752 IFS=$as_save_IFS
42753 
42754 fi
42755 fi
42756 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42757 if test -n "$ac_ct_OBJCOPY"; then
42758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42759 $as_echo "$ac_ct_OBJCOPY" >&6; }
42760 else
42761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762 $as_echo "no" >&6; }
42763 fi
42764 
42765 
42766   test -n "$ac_ct_OBJCOPY" && break
42767 done
42768 
42769   if test "x$ac_ct_OBJCOPY" = x; then
42770     OBJCOPY=""
42771   else
42772     case $cross_compiling:$ac_tool_warned in
42773 yes:)
42774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776 ac_tool_warned=yes ;;
42777 esac
42778     OBJCOPY=$ac_ct_OBJCOPY
42779   fi
42780 fi
42781 
42782     else
42783       # If it succeeded, then it was overridden by the user. We will use it
42784       # for the tool.
42785 
42786       # First remove it from the list of overridden variables, so we can test
42787       # for unknown variables in the end.
42788       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42789 
42790       # Check if we try to supply an empty value
42791       if test "x$OBJCOPY" = x; then
42792         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42793 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42795 $as_echo_n "checking for OBJCOPY... " >&6; }
42796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42797 $as_echo "disabled" >&6; }
42798       else
42799         # Check if the provided tool contains a complete path.
42800         tool_specified="$OBJCOPY"
42801         tool_basename="${tool_specified##*/}"
42802         if test "x$tool_basename" = "x$tool_specified"; then
42803           # A command without a complete path is provided, search $PATH.
42804           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42805 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42806           # Extract the first word of "$tool_basename", so it can be a program name with args.
42807 set dummy $tool_basename; ac_word=$2
42808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809 $as_echo_n "checking for $ac_word... " >&6; }
42810 if ${ac_cv_path_OBJCOPY+:} false; then :
42811   $as_echo_n "(cached) " >&6
42812 else
42813   case $OBJCOPY in
42814   [\\/]* | ?:[\\/]*)
42815   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42816   ;;
42817   *)
42818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42819 for as_dir in $PATH
42820 do
42821   IFS=$as_save_IFS
42822   test -z "$as_dir" && as_dir=.
42823     for ac_exec_ext in '' $ac_executable_extensions; do
42824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42825     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42827     break 2
42828   fi
42829 done
42830   done
42831 IFS=$as_save_IFS
42832 
42833   ;;
42834 esac
42835 fi
42836 OBJCOPY=$ac_cv_path_OBJCOPY
42837 if test -n "$OBJCOPY"; then
42838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42839 $as_echo "$OBJCOPY" >&6; }
42840 else
42841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842 $as_echo "no" >&6; }
42843 fi
42844 
42845 
42846           if test "x$OBJCOPY" = x; then
42847             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42848           fi
42849         else
42850           # Otherwise we believe it is a complete path. Use it as it is.
42851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42852 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42853           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42854 $as_echo_n "checking for OBJCOPY... " >&6; }
42855           if test ! -x "$tool_specified"; then
42856             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42857 $as_echo "not found" >&6; }
42858             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42859           fi
42860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42861 $as_echo "$tool_specified" >&6; }
42862         fi
42863       fi
42864     fi
42865 
42866   fi
42867 
42868 
42869     # Only call fixup if objcopy was found.
42870     if test -n "$OBJCOPY"; then
42871 
42872   # Only process if variable expands to non-empty
42873 
42874   if test "x$OBJCOPY" != x; then
42875     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42876 
42877   # First separate the path from the arguments. This will split at the first
42878   # space.
42879   complete="$OBJCOPY"
42880   path="${complete%% *}"
42881   tmp="$complete EOL"
42882   arguments="${tmp#* }"
42883 
42884   # Input might be given as Windows format, start by converting to
42885   # unix format.
42886   new_path=`$CYGPATH -u "$path"`
42887 
42888   # Now try to locate executable using which
42889   new_path=`$WHICH "$new_path" 2> /dev/null`
42890   # bat and cmd files are not always considered executable in cygwin causing which
42891   # to not find them
42892   if test "x$new_path" = x \
42893       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42894       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42895     new_path=`$CYGPATH -u "$path"`
42896   fi
42897   if test "x$new_path" = x; then
42898     # Oops. Which didn't find the executable.
42899     # The splitting of arguments from the executable at a space might have been incorrect,
42900     # since paths with space are more likely in Windows. Give it another try with the whole
42901     # argument.
42902     path="$complete"
42903     arguments="EOL"
42904     new_path=`$CYGPATH -u "$path"`
42905     new_path=`$WHICH "$new_path" 2> /dev/null`
42906     # bat and cmd files are not always considered executable in cygwin causing which
42907     # to not find them
42908     if test "x$new_path" = x \
42909         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42910         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42911       new_path=`$CYGPATH -u "$path"`
42912     fi
42913     if test "x$new_path" = x; then
42914       # It's still not found. Now this is an unrecoverable error.
42915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42916 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42917       has_space=`$ECHO "$complete" | $GREP " "`
42918       if test "x$has_space" != x; then
42919         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42920 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42921       fi
42922       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42923     fi
42924   fi
42925 
42926   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42927   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42928   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42929   # "foo.exe" is OK but "foo" is an error.
42930   #
42931   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42932   # It is also a way to make sure we got the proper file name for the real test later on.
42933   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42934   if test "x$test_shortpath" = x; then
42935     # Short path failed, file does not exist as specified.
42936     # Try adding .exe or .cmd
42937     if test -f "${new_path}.exe"; then
42938       input_to_shortpath="${new_path}.exe"
42939     elif test -f "${new_path}.cmd"; then
42940       input_to_shortpath="${new_path}.cmd"
42941     else
42942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42943 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42944       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42945 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42946       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42947     fi
42948   else
42949     input_to_shortpath="$new_path"
42950   fi
42951 
42952   # Call helper function which possibly converts this using DOS-style short mode.
42953   # If so, the updated path is stored in $new_path.
42954   new_path="$input_to_shortpath"
42955 
42956   input_path="$input_to_shortpath"
42957   # Check if we need to convert this using DOS-style short mode. If the path
42958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42959   # take no chances and rewrite it.
42960   # Note: m4 eats our [], so we need to use [ and ] instead.
42961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42962   if test "x$has_forbidden_chars" != x; then
42963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42967       # Going to short mode and back again did indeed matter. Since short mode is
42968       # case insensitive, let's make it lowercase to improve readability.
42969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42970       # Now convert it back to Unix-style (cygpath)
42971       input_path=`$CYGPATH -u "$shortmode_path"`
42972       new_path="$input_path"
42973     fi
42974   fi
42975 
42976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42977   if test "x$test_cygdrive_prefix" = x; then
42978     # As a simple fix, exclude /usr/bin since it's not a real path.
42979     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42981       # a path prefixed by /cygdrive for fixpath to work.
42982       new_path="$CYGWIN_ROOT_PATH$input_path"
42983     fi
42984   fi
42985 
42986   # remove trailing .exe if any
42987   new_path="${new_path/%.exe/}"
42988 
42989     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42990 
42991   # First separate the path from the arguments. This will split at the first
42992   # space.
42993   complete="$OBJCOPY"
42994   path="${complete%% *}"
42995   tmp="$complete EOL"
42996   arguments="${tmp#* }"
42997 
42998   # Input might be given as Windows format, start by converting to
42999   # unix format.
43000   new_path="$path"
43001 
43002   windows_path="$new_path"
43003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43004     unix_path=`$CYGPATH -u "$windows_path"`
43005     new_path="$unix_path"
43006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43008     new_path="$unix_path"
43009   fi
43010 
43011 
43012   # Now try to locate executable using which
43013   new_path=`$WHICH "$new_path" 2> /dev/null`
43014 
43015   if test "x$new_path" = x; then
43016     # Oops. Which didn't find the executable.
43017     # The splitting of arguments from the executable at a space might have been incorrect,
43018     # since paths with space are more likely in Windows. Give it another try with the whole
43019     # argument.
43020     path="$complete"
43021     arguments="EOL"
43022     new_path="$path"
43023 
43024   windows_path="$new_path"
43025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43026     unix_path=`$CYGPATH -u "$windows_path"`
43027     new_path="$unix_path"
43028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43030     new_path="$unix_path"
43031   fi
43032 
43033 
43034     new_path=`$WHICH "$new_path" 2> /dev/null`
43035     # bat and cmd files are not always considered executable in MSYS causing which
43036     # to not find them
43037     if test "x$new_path" = x \
43038         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040       new_path="$path"
43041 
43042   windows_path="$new_path"
43043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43044     unix_path=`$CYGPATH -u "$windows_path"`
43045     new_path="$unix_path"
43046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43048     new_path="$unix_path"
43049   fi
43050 
43051     fi
43052 
43053     if test "x$new_path" = x; then
43054       # It's still not found. Now this is an unrecoverable error.
43055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43056 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43057       has_space=`$ECHO "$complete" | $GREP " "`
43058       if test "x$has_space" != x; then
43059         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43060 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43061       fi
43062       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43063     fi
43064   fi
43065 
43066   # Now new_path has a complete unix path to the binary
43067   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43068     # Keep paths in /bin as-is, but remove trailing .exe if any
43069     new_path="${new_path/%.exe/}"
43070     # Do not save /bin paths to all_fixpath_prefixes!
43071   else
43072     # Not in mixed or Windows style, start by that.
43073     new_path=`cmd //c echo $new_path`
43074 
43075   input_path="$new_path"
43076   # Check if we need to convert this using DOS-style short mode. If the path
43077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43078   # take no chances and rewrite it.
43079   # Note: m4 eats our [], so we need to use [ and ] instead.
43080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43081   if test "x$has_forbidden_chars" != x; then
43082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43084   fi
43085 
43086     # Output is in $new_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     # remove trailing .exe if any
43098     new_path="${new_path/%.exe/}"
43099 
43100     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43101     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43102   fi
43103 
43104     else
43105       # We're on a unix platform. Hooray! :)
43106       # First separate the path from the arguments. This will split at the first
43107       # space.
43108       complete="$OBJCOPY"
43109       path="${complete%% *}"
43110       tmp="$complete EOL"
43111       arguments="${tmp#* }"
43112 
43113       # Cannot rely on the command "which" here since it doesn't always work.
43114       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43115       if test -z "$is_absolute_path"; then
43116         # Path to executable is not absolute. Find it.
43117         IFS_save="$IFS"
43118         IFS=:
43119         for p in $PATH; do
43120           if test -f "$p/$path" && test -x "$p/$path"; then
43121             new_path="$p/$path"
43122             break
43123           fi
43124         done
43125         IFS="$IFS_save"
43126       else
43127         # This is an absolute path, we can use it without further modifications.
43128         new_path="$path"
43129       fi
43130 
43131       if test "x$new_path" = x; then
43132         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43133 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43134         has_space=`$ECHO "$complete" | $GREP " "`
43135         if test "x$has_space" != x; then
43136           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43137 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43138         fi
43139         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43140       fi
43141     fi
43142 
43143     # Now join together the path and the arguments once again
43144     if test "x$arguments" != xEOL; then
43145       new_complete="$new_path ${arguments% *}"
43146     else
43147       new_complete="$new_path"
43148     fi
43149 
43150     if test "x$complete" != "x$new_complete"; then
43151       OBJCOPY="$new_complete"
43152       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43153 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43154     fi
43155   fi
43156 
43157       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43158         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43159         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43160         # - version number is last blank separate word on first line
43161         # - version number formats that have been seen:
43162         #   - <major>.<minor>
43163         #   - <major>.<minor>.<micro>
43164         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43165         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43166          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43167               -e 's/.* //' \
43168               -e '/^[01]\./b bad' \
43169               -e '/^2\./{' \
43170               -e '  s/^2\.//' \
43171               -e '  /^[0-9]$/b bad' \
43172               -e '  /^[0-9]\./b bad' \
43173               -e '  /^1[0-9]$/b bad' \
43174               -e '  /^1[0-9]\./b bad' \
43175               -e '  /^20\./b bad' \
43176               -e '  /^21\.0$/b bad' \
43177               -e '  /^21\.0\./b bad' \
43178               -e '}' \
43179               -e ':good' \
43180               -e 's/.*/VALID_VERSION/p' \
43181               -e 'q' \
43182               -e ':bad' \
43183               -e 's/.*/BAD_VERSION/p' \
43184               -e 'q'`
43185         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43186           OBJCOPY=
43187           { $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
43188 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43189           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43190 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43191           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43192 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43193           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43194 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43195           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43196 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43197         fi
43198       fi
43199     fi
43200   fi
43201 
43202 
43203 
43204   # Publish this variable in the help.
43205 
43206 
43207   if [ -z "${OBJDUMP+x}" ]; then
43208     # The variable is not set by user, try to locate tool using the code snippet
43209     if test -n "$ac_tool_prefix"; then
43210   for ac_prog in gobjdump objdump
43211   do
43212     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43215 $as_echo_n "checking for $ac_word... " >&6; }
43216 if ${ac_cv_prog_OBJDUMP+:} false; then :
43217   $as_echo_n "(cached) " >&6
43218 else
43219   if test -n "$OBJDUMP"; then
43220   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43221 else
43222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43223 for as_dir in $PATH
43224 do
43225   IFS=$as_save_IFS
43226   test -z "$as_dir" && as_dir=.
43227     for ac_exec_ext in '' $ac_executable_extensions; do
43228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43229     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43231     break 2
43232   fi
43233 done
43234   done
43235 IFS=$as_save_IFS
43236 
43237 fi
43238 fi
43239 OBJDUMP=$ac_cv_prog_OBJDUMP
43240 if test -n "$OBJDUMP"; then
43241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43242 $as_echo "$OBJDUMP" >&6; }
43243 else
43244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43245 $as_echo "no" >&6; }
43246 fi
43247 
43248 
43249     test -n "$OBJDUMP" && break
43250   done
43251 fi
43252 if test -z "$OBJDUMP"; then
43253   ac_ct_OBJDUMP=$OBJDUMP
43254   for ac_prog in gobjdump objdump
43255 do
43256   # Extract the first word of "$ac_prog", so it can be a program name with args.
43257 set dummy $ac_prog; ac_word=$2
43258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259 $as_echo_n "checking for $ac_word... " >&6; }
43260 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43261   $as_echo_n "(cached) " >&6
43262 else
43263   if test -n "$ac_ct_OBJDUMP"; then
43264   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43265 else
43266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43267 for as_dir in $PATH
43268 do
43269   IFS=$as_save_IFS
43270   test -z "$as_dir" && as_dir=.
43271     for ac_exec_ext in '' $ac_executable_extensions; do
43272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43273     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43275     break 2
43276   fi
43277 done
43278   done
43279 IFS=$as_save_IFS
43280 
43281 fi
43282 fi
43283 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43284 if test -n "$ac_ct_OBJDUMP"; then
43285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43286 $as_echo "$ac_ct_OBJDUMP" >&6; }
43287 else
43288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43289 $as_echo "no" >&6; }
43290 fi
43291 
43292 
43293   test -n "$ac_ct_OBJDUMP" && break
43294 done
43295 
43296   if test "x$ac_ct_OBJDUMP" = x; then
43297     OBJDUMP=""
43298   else
43299     case $cross_compiling:$ac_tool_warned in
43300 yes:)
43301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43302 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43303 ac_tool_warned=yes ;;
43304 esac
43305     OBJDUMP=$ac_ct_OBJDUMP
43306   fi
43307 fi
43308 
43309   else
43310     # The variable is set, but is it from the command line or the environment?
43311 
43312     # Try to remove the string !OBJDUMP! from our list.
43313     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43314     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43315       # If it failed, the variable was not from the command line. Ignore it,
43316       # but warn the user (except for BASH, which is always set by the calling BASH).
43317       if test "xOBJDUMP" != xBASH; then
43318         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43319 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43320       fi
43321       # Try to locate tool using the code snippet
43322       if test -n "$ac_tool_prefix"; then
43323   for ac_prog in gobjdump objdump
43324   do
43325     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43326 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43328 $as_echo_n "checking for $ac_word... " >&6; }
43329 if ${ac_cv_prog_OBJDUMP+:} false; then :
43330   $as_echo_n "(cached) " >&6
43331 else
43332   if test -n "$OBJDUMP"; then
43333   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43334 else
43335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43336 for as_dir in $PATH
43337 do
43338   IFS=$as_save_IFS
43339   test -z "$as_dir" && as_dir=.
43340     for ac_exec_ext in '' $ac_executable_extensions; do
43341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43342     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43344     break 2
43345   fi
43346 done
43347   done
43348 IFS=$as_save_IFS
43349 
43350 fi
43351 fi
43352 OBJDUMP=$ac_cv_prog_OBJDUMP
43353 if test -n "$OBJDUMP"; then
43354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43355 $as_echo "$OBJDUMP" >&6; }
43356 else
43357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43358 $as_echo "no" >&6; }
43359 fi
43360 
43361 
43362     test -n "$OBJDUMP" && break
43363   done
43364 fi
43365 if test -z "$OBJDUMP"; then
43366   ac_ct_OBJDUMP=$OBJDUMP
43367   for ac_prog in gobjdump objdump
43368 do
43369   # Extract the first word of "$ac_prog", so it can be a program name with args.
43370 set dummy $ac_prog; ac_word=$2
43371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43372 $as_echo_n "checking for $ac_word... " >&6; }
43373 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43374   $as_echo_n "(cached) " >&6
43375 else
43376   if test -n "$ac_ct_OBJDUMP"; then
43377   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43378 else
43379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43380 for as_dir in $PATH
43381 do
43382   IFS=$as_save_IFS
43383   test -z "$as_dir" && as_dir=.
43384     for ac_exec_ext in '' $ac_executable_extensions; do
43385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43386     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43388     break 2
43389   fi
43390 done
43391   done
43392 IFS=$as_save_IFS
43393 
43394 fi
43395 fi
43396 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43397 if test -n "$ac_ct_OBJDUMP"; then
43398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43399 $as_echo "$ac_ct_OBJDUMP" >&6; }
43400 else
43401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43402 $as_echo "no" >&6; }
43403 fi
43404 
43405 
43406   test -n "$ac_ct_OBJDUMP" && break
43407 done
43408 
43409   if test "x$ac_ct_OBJDUMP" = x; then
43410     OBJDUMP=""
43411   else
43412     case $cross_compiling:$ac_tool_warned in
43413 yes:)
43414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43415 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43416 ac_tool_warned=yes ;;
43417 esac
43418     OBJDUMP=$ac_ct_OBJDUMP
43419   fi
43420 fi
43421 
43422     else
43423       # If it succeeded, then it was overridden by the user. We will use it
43424       # for the tool.
43425 
43426       # First remove it from the list of overridden variables, so we can test
43427       # for unknown variables in the end.
43428       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43429 
43430       # Check if we try to supply an empty value
43431       if test "x$OBJDUMP" = x; then
43432         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43433 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43435 $as_echo_n "checking for OBJDUMP... " >&6; }
43436         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43437 $as_echo "disabled" >&6; }
43438       else
43439         # Check if the provided tool contains a complete path.
43440         tool_specified="$OBJDUMP"
43441         tool_basename="${tool_specified##*/}"
43442         if test "x$tool_basename" = "x$tool_specified"; then
43443           # A command without a complete path is provided, search $PATH.
43444           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43445 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43446           # Extract the first word of "$tool_basename", so it can be a program name with args.
43447 set dummy $tool_basename; ac_word=$2
43448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43449 $as_echo_n "checking for $ac_word... " >&6; }
43450 if ${ac_cv_path_OBJDUMP+:} false; then :
43451   $as_echo_n "(cached) " >&6
43452 else
43453   case $OBJDUMP in
43454   [\\/]* | ?:[\\/]*)
43455   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43456   ;;
43457   *)
43458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43459 for as_dir in $PATH
43460 do
43461   IFS=$as_save_IFS
43462   test -z "$as_dir" && as_dir=.
43463     for ac_exec_ext in '' $ac_executable_extensions; do
43464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43465     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43467     break 2
43468   fi
43469 done
43470   done
43471 IFS=$as_save_IFS
43472 
43473   ;;
43474 esac
43475 fi
43476 OBJDUMP=$ac_cv_path_OBJDUMP
43477 if test -n "$OBJDUMP"; then
43478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43479 $as_echo "$OBJDUMP" >&6; }
43480 else
43481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43482 $as_echo "no" >&6; }
43483 fi
43484 
43485 
43486           if test "x$OBJDUMP" = x; then
43487             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43488           fi
43489         else
43490           # Otherwise we believe it is a complete path. Use it as it is.
43491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43492 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43493           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43494 $as_echo_n "checking for OBJDUMP... " >&6; }
43495           if test ! -x "$tool_specified"; then
43496             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43497 $as_echo "not found" >&6; }
43498             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43499           fi
43500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43501 $as_echo "$tool_specified" >&6; }
43502         fi
43503       fi
43504     fi
43505 
43506   fi
43507 
43508 
43509   if test "x$OBJDUMP" != x; then
43510     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43511     # bails if argument is missing.
43512 
43513   # Only process if variable expands to non-empty
43514 
43515   if test "x$OBJDUMP" != x; then
43516     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43517 
43518   # First separate the path from the arguments. This will split at the first
43519   # space.
43520   complete="$OBJDUMP"
43521   path="${complete%% *}"
43522   tmp="$complete EOL"
43523   arguments="${tmp#* }"
43524 
43525   # Input might be given as Windows format, start by converting to
43526   # unix format.
43527   new_path=`$CYGPATH -u "$path"`
43528 
43529   # Now try to locate executable using which
43530   new_path=`$WHICH "$new_path" 2> /dev/null`
43531   # bat and cmd files are not always considered executable in cygwin causing which
43532   # to not find them
43533   if test "x$new_path" = x \
43534       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43535       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43536     new_path=`$CYGPATH -u "$path"`
43537   fi
43538   if test "x$new_path" = x; then
43539     # Oops. Which didn't find the executable.
43540     # The splitting of arguments from the executable at a space might have been incorrect,
43541     # since paths with space are more likely in Windows. Give it another try with the whole
43542     # argument.
43543     path="$complete"
43544     arguments="EOL"
43545     new_path=`$CYGPATH -u "$path"`
43546     new_path=`$WHICH "$new_path" 2> /dev/null`
43547     # bat and cmd files are not always considered executable in cygwin causing which
43548     # to not find them
43549     if test "x$new_path" = x \
43550         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43551         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43552       new_path=`$CYGPATH -u "$path"`
43553     fi
43554     if test "x$new_path" = x; then
43555       # It's still not found. Now this is an unrecoverable error.
43556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43557 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43558       has_space=`$ECHO "$complete" | $GREP " "`
43559       if test "x$has_space" != x; then
43560         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43561 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43562       fi
43563       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43564     fi
43565   fi
43566 
43567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43570   # "foo.exe" is OK but "foo" is an error.
43571   #
43572   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43573   # It is also a way to make sure we got the proper file name for the real test later on.
43574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43575   if test "x$test_shortpath" = x; then
43576     # Short path failed, file does not exist as specified.
43577     # Try adding .exe or .cmd
43578     if test -f "${new_path}.exe"; then
43579       input_to_shortpath="${new_path}.exe"
43580     elif test -f "${new_path}.cmd"; then
43581       input_to_shortpath="${new_path}.cmd"
43582     else
43583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43584 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43585       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43586 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43587       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43588     fi
43589   else
43590     input_to_shortpath="$new_path"
43591   fi
43592 
43593   # Call helper function which possibly converts this using DOS-style short mode.
43594   # If so, the updated path is stored in $new_path.
43595   new_path="$input_to_shortpath"
43596 
43597   input_path="$input_to_shortpath"
43598   # Check if we need to convert this using DOS-style short mode. If the path
43599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43600   # take no chances and rewrite it.
43601   # Note: m4 eats our [], so we need to use [ and ] instead.
43602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43603   if test "x$has_forbidden_chars" != x; then
43604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43608       # Going to short mode and back again did indeed matter. Since short mode is
43609       # case insensitive, let's make it lowercase to improve readability.
43610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43611       # Now convert it back to Unix-style (cygpath)
43612       input_path=`$CYGPATH -u "$shortmode_path"`
43613       new_path="$input_path"
43614     fi
43615   fi
43616 
43617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43618   if test "x$test_cygdrive_prefix" = x; then
43619     # As a simple fix, exclude /usr/bin since it's not a real path.
43620     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43622       # a path prefixed by /cygdrive for fixpath to work.
43623       new_path="$CYGWIN_ROOT_PATH$input_path"
43624     fi
43625   fi
43626 
43627   # remove trailing .exe if any
43628   new_path="${new_path/%.exe/}"
43629 
43630     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43631 
43632   # First separate the path from the arguments. This will split at the first
43633   # space.
43634   complete="$OBJDUMP"
43635   path="${complete%% *}"
43636   tmp="$complete EOL"
43637   arguments="${tmp#* }"
43638 
43639   # Input might be given as Windows format, start by converting to
43640   # unix format.
43641   new_path="$path"
43642 
43643   windows_path="$new_path"
43644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43645     unix_path=`$CYGPATH -u "$windows_path"`
43646     new_path="$unix_path"
43647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43648     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43649     new_path="$unix_path"
43650   fi
43651 
43652 
43653   # Now try to locate executable using which
43654   new_path=`$WHICH "$new_path" 2> /dev/null`
43655 
43656   if test "x$new_path" = x; then
43657     # Oops. Which didn't find the executable.
43658     # The splitting of arguments from the executable at a space might have been incorrect,
43659     # since paths with space are more likely in Windows. Give it another try with the whole
43660     # argument.
43661     path="$complete"
43662     arguments="EOL"
43663     new_path="$path"
43664 
43665   windows_path="$new_path"
43666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43667     unix_path=`$CYGPATH -u "$windows_path"`
43668     new_path="$unix_path"
43669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43671     new_path="$unix_path"
43672   fi
43673 
43674 
43675     new_path=`$WHICH "$new_path" 2> /dev/null`
43676     # bat and cmd files are not always considered executable in MSYS causing which
43677     # to not find them
43678     if test "x$new_path" = x \
43679         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43680         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43681       new_path="$path"
43682 
43683   windows_path="$new_path"
43684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43685     unix_path=`$CYGPATH -u "$windows_path"`
43686     new_path="$unix_path"
43687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43689     new_path="$unix_path"
43690   fi
43691 
43692     fi
43693 
43694     if test "x$new_path" = x; then
43695       # It's still not found. Now this is an unrecoverable error.
43696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43697 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43698       has_space=`$ECHO "$complete" | $GREP " "`
43699       if test "x$has_space" != x; then
43700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43702       fi
43703       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43704     fi
43705   fi
43706 
43707   # Now new_path has a complete unix path to the binary
43708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43709     # Keep paths in /bin as-is, but remove trailing .exe if any
43710     new_path="${new_path/%.exe/}"
43711     # Do not save /bin paths to all_fixpath_prefixes!
43712   else
43713     # Not in mixed or Windows style, start by that.
43714     new_path=`cmd //c echo $new_path`
43715 
43716   input_path="$new_path"
43717   # Check if we need to convert this using DOS-style short mode. If the path
43718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43719   # take no chances and rewrite it.
43720   # Note: m4 eats our [], so we need to use [ and ] instead.
43721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43722   if test "x$has_forbidden_chars" != x; then
43723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43725   fi
43726 
43727     # Output is in $new_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     # remove trailing .exe if any
43739     new_path="${new_path/%.exe/}"
43740 
43741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43743   fi
43744 
43745     else
43746       # We're on a unix platform. Hooray! :)
43747       # First separate the path from the arguments. This will split at the first
43748       # space.
43749       complete="$OBJDUMP"
43750       path="${complete%% *}"
43751       tmp="$complete EOL"
43752       arguments="${tmp#* }"
43753 
43754       # Cannot rely on the command "which" here since it doesn't always work.
43755       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43756       if test -z "$is_absolute_path"; then
43757         # Path to executable is not absolute. Find it.
43758         IFS_save="$IFS"
43759         IFS=:
43760         for p in $PATH; do
43761           if test -f "$p/$path" && test -x "$p/$path"; then
43762             new_path="$p/$path"
43763             break
43764           fi
43765         done
43766         IFS="$IFS_save"
43767       else
43768         # This is an absolute path, we can use it without further modifications.
43769         new_path="$path"
43770       fi
43771 
43772       if test "x$new_path" = x; then
43773         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43774 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43775         has_space=`$ECHO "$complete" | $GREP " "`
43776         if test "x$has_space" != x; then
43777           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43778 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43779         fi
43780         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43781       fi
43782     fi
43783 
43784     # Now join together the path and the arguments once again
43785     if test "x$arguments" != xEOL; then
43786       new_complete="$new_path ${arguments% *}"
43787     else
43788       new_complete="$new_path"
43789     fi
43790 
43791     if test "x$complete" != "x$new_complete"; then
43792       OBJDUMP="$new_complete"
43793       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43794 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43795     fi
43796   fi
43797 
43798   fi
43799 
43800 
43801   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43802   # to remain in place. Otherwise the compiler will not work in some siutations
43803   # in later configure checks.
43804   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43805     PATH="$OLD_PATH"
43806   fi
43807 
43808   # Restore the flags to the user specified values.
43809   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43810   CFLAGS="$ORG_CFLAGS"
43811   CXXFLAGS="$ORG_CXXFLAGS"
43812 
43813 
43814 # Finally do some processing after the detection phase
43815 
43816   if test "x$COMPILE_TYPE" = "xcross"; then
43817     # Now we need to find a C/C++ compiler that can build executables for the
43818     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43819     # used once. Also, we need to do this without adding a tools dir to the
43820     # path, otherwise we might pick up cross-compilers which don't use standard
43821     # naming.
43822 
43823     OLDPATH="$PATH"
43824 
43825 
43826 # Check whether --with-build-devkit was given.
43827 if test "${with_build_devkit+set}" = set; then :
43828   withval=$with_build_devkit;
43829 fi
43830 
43831     if test "x$with_build_devkit" = "xyes"; then
43832       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43833     elif test -n "$with_build_devkit"; then
43834       if test ! -d "$with_build_devkit"; then
43835         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43836       else
43837 
43838   # Only process if variable expands to non-empty
43839 
43840   if test "x$with_build_devkit" != x; then
43841     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43842 
43843   # Input might be given as Windows format, start by converting to
43844   # unix format.
43845   path="$with_build_devkit"
43846   new_path=`$CYGPATH -u "$path"`
43847 
43848   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43849   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43850   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43851   # "foo.exe" is OK but "foo" is an error.
43852   #
43853   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43854   # It is also a way to make sure we got the proper file name for the real test later on.
43855   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43856   if test "x$test_shortpath" = x; then
43857     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43858 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43859     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43860   fi
43861 
43862   # Call helper function which possibly converts this using DOS-style short mode.
43863   # If so, the updated path is stored in $new_path.
43864 
43865   input_path="$new_path"
43866   # Check if we need to convert this using DOS-style short mode. If the path
43867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43868   # take no chances and rewrite it.
43869   # Note: m4 eats our [], so we need to use [ and ] instead.
43870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43871   if test "x$has_forbidden_chars" != x; then
43872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43873     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43874     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43875     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43876       # Going to short mode and back again did indeed matter. Since short mode is
43877       # case insensitive, let's make it lowercase to improve readability.
43878       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879       # Now convert it back to Unix-style (cygpath)
43880       input_path=`$CYGPATH -u "$shortmode_path"`
43881       new_path="$input_path"
43882     fi
43883   fi
43884 
43885   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43886   if test "x$test_cygdrive_prefix" = x; then
43887     # As a simple fix, exclude /usr/bin since it's not a real path.
43888     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43889       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43890       # a path prefixed by /cygdrive for fixpath to work.
43891       new_path="$CYGWIN_ROOT_PATH$input_path"
43892     fi
43893   fi
43894 
43895 
43896   if test "x$path" != "x$new_path"; then
43897     with_build_devkit="$new_path"
43898     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43899 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43900   fi
43901 
43902     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43903 
43904   path="$with_build_devkit"
43905   has_colon=`$ECHO $path | $GREP ^.:`
43906   new_path="$path"
43907   if test "x$has_colon" = x; then
43908     # Not in mixed or Windows style, start by that.
43909     new_path=`cmd //c echo $path`
43910   fi
43911 
43912 
43913   input_path="$new_path"
43914   # Check if we need to convert this using DOS-style short mode. If the path
43915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43916   # take no chances and rewrite it.
43917   # Note: m4 eats our [], so we need to use [ and ] instead.
43918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43919   if test "x$has_forbidden_chars" != x; then
43920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43921     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43922   fi
43923 
43924 
43925   windows_path="$new_path"
43926   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43927     unix_path=`$CYGPATH -u "$windows_path"`
43928     new_path="$unix_path"
43929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43931     new_path="$unix_path"
43932   fi
43933 
43934   if test "x$path" != "x$new_path"; then
43935     with_build_devkit="$new_path"
43936     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43937 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43938   fi
43939 
43940   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43941   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43942 
43943     else
43944       # We're on a unix platform. Hooray! :)
43945       path="$with_build_devkit"
43946       has_space=`$ECHO "$path" | $GREP " "`
43947       if test "x$has_space" != x; then
43948         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43949 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43950         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43951       fi
43952 
43953       # Use eval to expand a potential ~
43954       eval path="$path"
43955       if test ! -f "$path" && test ! -d "$path"; then
43956         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43957       fi
43958 
43959       if test -d "$path"; then
43960         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43961       else
43962         dir="`$DIRNAME "$path"`"
43963         base="`$BASENAME "$path"`"
43964         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43965       fi
43966     fi
43967   fi
43968 
43969         BUILD_DEVKIT_ROOT="$with_build_devkit"
43970         # Check for a meta data info file in the root of the devkit
43971         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43972           # Process devkit.info so that existing devkit variables are not
43973           # modified by this
43974           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43975               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43976               -e "s/\$host/\$build/g" \
43977               $BUILD_DEVKIT_ROOT/devkit.info \
43978               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43979           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43980           # This potentially sets the following:
43981           # A descriptive name of the devkit
43982 
43983   if test "x$BUILD_DEVKIT_NAME" = x; then
43984     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43985   fi
43986 
43987           # Corresponds to --with-extra-path
43988 
43989   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43990     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43991   fi
43992 
43993           # Corresponds to --with-toolchain-path
43994 
43995   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43996     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43997   fi
43998 
43999           # Corresponds to --with-sysroot
44000 
44001   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44002     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44003   fi
44004 
44005           # Skip the Window specific parts
44006         fi
44007 
44008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44009 $as_echo_n "checking for build platform devkit... " >&6; }
44010         if test "x$BUILD_DEVKIT_NAME" != x; then
44011           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44012 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44013         else
44014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44015 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44016         fi
44017 
44018         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44019 
44020   if test "x$BUILD_SYSROOT" != "x"; then
44021     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44022       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44023         # Solaris Studio does not have a concept of sysroot. Instead we must
44024         # make sure the default include and lib dirs are appended to each
44025         # compile and link command line. Must also add -I-xbuiltin to enable
44026         # inlining of system functions and intrinsics.
44027         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44028         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44029             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44030       fi
44031     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44032       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44033       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44034     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44035       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44036       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44037     fi
44038     # The global CFLAGS and LDFLAGS variables need these for configure to function
44039     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44040     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44041     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44042     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44043   fi
44044 
44045   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44046     # We also need -iframework<path>/System/Library/Frameworks
44047     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44048     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44049     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44050     # set this here so it doesn't have to be peppered throughout the forest
44051     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44052     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44053   fi
44054 
44055 
44056 
44057 
44058 
44059          # Fallback default of just /bin if DEVKIT_PATH is not defined
44060         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44061           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44062         fi
44063         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44064       fi
44065     fi
44066 
44067     # FIXME: we should list the discovered compilers as an exclude pattern!
44068     # If we do that, we can do this detection before POST_DETECTION, and still
44069     # find the build compilers in the tools dir, if needed.
44070 
44071 
44072 
44073   # Publish this variable in the help.
44074 
44075 
44076   if [ -z "${BUILD_CC+x}" ]; then
44077     # The variable is not set by user, try to locate tool using the code snippet
44078     for ac_prog in cl cc gcc
44079 do
44080   # Extract the first word of "$ac_prog", so it can be a program name with args.
44081 set dummy $ac_prog; ac_word=$2
44082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44083 $as_echo_n "checking for $ac_word... " >&6; }
44084 if ${ac_cv_path_BUILD_CC+:} false; then :
44085   $as_echo_n "(cached) " >&6
44086 else
44087   case $BUILD_CC in
44088   [\\/]* | ?:[\\/]*)
44089   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44090   ;;
44091   *)
44092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44093 for as_dir in $PATH
44094 do
44095   IFS=$as_save_IFS
44096   test -z "$as_dir" && as_dir=.
44097     for ac_exec_ext in '' $ac_executable_extensions; do
44098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44099     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44101     break 2
44102   fi
44103 done
44104   done
44105 IFS=$as_save_IFS
44106 
44107   ;;
44108 esac
44109 fi
44110 BUILD_CC=$ac_cv_path_BUILD_CC
44111 if test -n "$BUILD_CC"; then
44112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44113 $as_echo "$BUILD_CC" >&6; }
44114 else
44115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44116 $as_echo "no" >&6; }
44117 fi
44118 
44119 
44120   test -n "$BUILD_CC" && break
44121 done
44122 
44123   else
44124     # The variable is set, but is it from the command line or the environment?
44125 
44126     # Try to remove the string !BUILD_CC! from our list.
44127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44129       # If it failed, the variable was not from the command line. Ignore it,
44130       # but warn the user (except for BASH, which is always set by the calling BASH).
44131       if test "xBUILD_CC" != xBASH; then
44132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44133 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44134       fi
44135       # Try to locate tool using the code snippet
44136       for ac_prog in cl cc gcc
44137 do
44138   # Extract the first word of "$ac_prog", so it can be a program name with args.
44139 set dummy $ac_prog; ac_word=$2
44140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44141 $as_echo_n "checking for $ac_word... " >&6; }
44142 if ${ac_cv_path_BUILD_CC+:} false; then :
44143   $as_echo_n "(cached) " >&6
44144 else
44145   case $BUILD_CC in
44146   [\\/]* | ?:[\\/]*)
44147   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44148   ;;
44149   *)
44150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44151 for as_dir in $PATH
44152 do
44153   IFS=$as_save_IFS
44154   test -z "$as_dir" && as_dir=.
44155     for ac_exec_ext in '' $ac_executable_extensions; do
44156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44157     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44159     break 2
44160   fi
44161 done
44162   done
44163 IFS=$as_save_IFS
44164 
44165   ;;
44166 esac
44167 fi
44168 BUILD_CC=$ac_cv_path_BUILD_CC
44169 if test -n "$BUILD_CC"; then
44170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44171 $as_echo "$BUILD_CC" >&6; }
44172 else
44173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44174 $as_echo "no" >&6; }
44175 fi
44176 
44177 
44178   test -n "$BUILD_CC" && break
44179 done
44180 
44181     else
44182       # If it succeeded, then it was overridden by the user. We will use it
44183       # for the tool.
44184 
44185       # First remove it from the list of overridden variables, so we can test
44186       # for unknown variables in the end.
44187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44188 
44189       # Check if we try to supply an empty value
44190       if test "x$BUILD_CC" = x; then
44191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44192 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44194 $as_echo_n "checking for BUILD_CC... " >&6; }
44195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44196 $as_echo "disabled" >&6; }
44197       else
44198         # Check if the provided tool contains a complete path.
44199         tool_specified="$BUILD_CC"
44200         tool_basename="${tool_specified##*/}"
44201         if test "x$tool_basename" = "x$tool_specified"; then
44202           # A command without a complete path is provided, search $PATH.
44203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44204 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44205           # Extract the first word of "$tool_basename", so it can be a program name with args.
44206 set dummy $tool_basename; ac_word=$2
44207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44208 $as_echo_n "checking for $ac_word... " >&6; }
44209 if ${ac_cv_path_BUILD_CC+:} false; then :
44210   $as_echo_n "(cached) " >&6
44211 else
44212   case $BUILD_CC in
44213   [\\/]* | ?:[\\/]*)
44214   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44215   ;;
44216   *)
44217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44218 for as_dir in $PATH
44219 do
44220   IFS=$as_save_IFS
44221   test -z "$as_dir" && as_dir=.
44222     for ac_exec_ext in '' $ac_executable_extensions; do
44223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44224     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44226     break 2
44227   fi
44228 done
44229   done
44230 IFS=$as_save_IFS
44231 
44232   ;;
44233 esac
44234 fi
44235 BUILD_CC=$ac_cv_path_BUILD_CC
44236 if test -n "$BUILD_CC"; then
44237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44238 $as_echo "$BUILD_CC" >&6; }
44239 else
44240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44241 $as_echo "no" >&6; }
44242 fi
44243 
44244 
44245           if test "x$BUILD_CC" = x; then
44246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44247           fi
44248         else
44249           # Otherwise we believe it is a complete path. Use it as it is.
44250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44251 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44253 $as_echo_n "checking for BUILD_CC... " >&6; }
44254           if test ! -x "$tool_specified"; then
44255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44256 $as_echo "not found" >&6; }
44257             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44258           fi
44259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44260 $as_echo "$tool_specified" >&6; }
44261         fi
44262       fi
44263     fi
44264 
44265   fi
44266 
44267 
44268 
44269   if test "x$BUILD_CC" = x; then
44270     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44271   fi
44272 
44273 
44274 
44275   # Only process if variable expands to non-empty
44276 
44277   if test "x$BUILD_CC" != x; then
44278     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44279 
44280   # First separate the path from the arguments. This will split at the first
44281   # space.
44282   complete="$BUILD_CC"
44283   path="${complete%% *}"
44284   tmp="$complete EOL"
44285   arguments="${tmp#* }"
44286 
44287   # Input might be given as Windows format, start by converting to
44288   # unix format.
44289   new_path=`$CYGPATH -u "$path"`
44290 
44291   # Now try to locate executable using which
44292   new_path=`$WHICH "$new_path" 2> /dev/null`
44293   # bat and cmd files are not always considered executable in cygwin causing which
44294   # to not find them
44295   if test "x$new_path" = x \
44296       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44297       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44298     new_path=`$CYGPATH -u "$path"`
44299   fi
44300   if test "x$new_path" = x; then
44301     # Oops. Which didn't find the executable.
44302     # The splitting of arguments from the executable at a space might have been incorrect,
44303     # since paths with space are more likely in Windows. Give it another try with the whole
44304     # argument.
44305     path="$complete"
44306     arguments="EOL"
44307     new_path=`$CYGPATH -u "$path"`
44308     new_path=`$WHICH "$new_path" 2> /dev/null`
44309     # bat and cmd files are not always considered executable in cygwin causing which
44310     # to not find them
44311     if test "x$new_path" = x \
44312         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44313         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44314       new_path=`$CYGPATH -u "$path"`
44315     fi
44316     if test "x$new_path" = x; then
44317       # It's still not found. Now this is an unrecoverable error.
44318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44319 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44320       has_space=`$ECHO "$complete" | $GREP " "`
44321       if test "x$has_space" != x; then
44322         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44323 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44324       fi
44325       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44326     fi
44327   fi
44328 
44329   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44330   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44331   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44332   # "foo.exe" is OK but "foo" is an error.
44333   #
44334   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44335   # It is also a way to make sure we got the proper file name for the real test later on.
44336   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44337   if test "x$test_shortpath" = x; then
44338     # Short path failed, file does not exist as specified.
44339     # Try adding .exe or .cmd
44340     if test -f "${new_path}.exe"; then
44341       input_to_shortpath="${new_path}.exe"
44342     elif test -f "${new_path}.cmd"; then
44343       input_to_shortpath="${new_path}.cmd"
44344     else
44345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44346 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44347       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44348 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44349       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44350     fi
44351   else
44352     input_to_shortpath="$new_path"
44353   fi
44354 
44355   # Call helper function which possibly converts this using DOS-style short mode.
44356   # If so, the updated path is stored in $new_path.
44357   new_path="$input_to_shortpath"
44358 
44359   input_path="$input_to_shortpath"
44360   # Check if we need to convert this using DOS-style short mode. If the path
44361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44362   # take no chances and rewrite it.
44363   # Note: m4 eats our [], so we need to use [ and ] instead.
44364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44365   if test "x$has_forbidden_chars" != x; then
44366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44370       # Going to short mode and back again did indeed matter. Since short mode is
44371       # case insensitive, let's make it lowercase to improve readability.
44372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44373       # Now convert it back to Unix-style (cygpath)
44374       input_path=`$CYGPATH -u "$shortmode_path"`
44375       new_path="$input_path"
44376     fi
44377   fi
44378 
44379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44380   if test "x$test_cygdrive_prefix" = x; then
44381     # As a simple fix, exclude /usr/bin since it's not a real path.
44382     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44384       # a path prefixed by /cygdrive for fixpath to work.
44385       new_path="$CYGWIN_ROOT_PATH$input_path"
44386     fi
44387   fi
44388 
44389   # remove trailing .exe if any
44390   new_path="${new_path/%.exe/}"
44391 
44392     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393 
44394   # First separate the path from the arguments. This will split at the first
44395   # space.
44396   complete="$BUILD_CC"
44397   path="${complete%% *}"
44398   tmp="$complete EOL"
44399   arguments="${tmp#* }"
44400 
44401   # Input might be given as Windows format, start by converting to
44402   # unix format.
44403   new_path="$path"
44404 
44405   windows_path="$new_path"
44406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44407     unix_path=`$CYGPATH -u "$windows_path"`
44408     new_path="$unix_path"
44409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44411     new_path="$unix_path"
44412   fi
44413 
44414 
44415   # Now try to locate executable using which
44416   new_path=`$WHICH "$new_path" 2> /dev/null`
44417 
44418   if test "x$new_path" = x; then
44419     # Oops. Which didn't find the executable.
44420     # The splitting of arguments from the executable at a space might have been incorrect,
44421     # since paths with space are more likely in Windows. Give it another try with the whole
44422     # argument.
44423     path="$complete"
44424     arguments="EOL"
44425     new_path="$path"
44426 
44427   windows_path="$new_path"
44428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429     unix_path=`$CYGPATH -u "$windows_path"`
44430     new_path="$unix_path"
44431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44433     new_path="$unix_path"
44434   fi
44435 
44436 
44437     new_path=`$WHICH "$new_path" 2> /dev/null`
44438     # bat and cmd files are not always considered executable in MSYS causing which
44439     # to not find them
44440     if test "x$new_path" = x \
44441         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44442         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44443       new_path="$path"
44444 
44445   windows_path="$new_path"
44446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44447     unix_path=`$CYGPATH -u "$windows_path"`
44448     new_path="$unix_path"
44449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44451     new_path="$unix_path"
44452   fi
44453 
44454     fi
44455 
44456     if test "x$new_path" = x; then
44457       # It's still not found. Now this is an unrecoverable error.
44458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44459 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44460       has_space=`$ECHO "$complete" | $GREP " "`
44461       if test "x$has_space" != x; then
44462         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44463 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44464       fi
44465       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44466     fi
44467   fi
44468 
44469   # Now new_path has a complete unix path to the binary
44470   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44471     # Keep paths in /bin as-is, but remove trailing .exe if any
44472     new_path="${new_path/%.exe/}"
44473     # Do not save /bin paths to all_fixpath_prefixes!
44474   else
44475     # Not in mixed or Windows style, start by that.
44476     new_path=`cmd //c echo $new_path`
44477 
44478   input_path="$new_path"
44479   # Check if we need to convert this using DOS-style short mode. If the path
44480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44481   # take no chances and rewrite it.
44482   # Note: m4 eats our [], so we need to use [ and ] instead.
44483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44484   if test "x$has_forbidden_chars" != x; then
44485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44487   fi
44488 
44489     # Output is in $new_path
44490 
44491   windows_path="$new_path"
44492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44493     unix_path=`$CYGPATH -u "$windows_path"`
44494     new_path="$unix_path"
44495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44497     new_path="$unix_path"
44498   fi
44499 
44500     # remove trailing .exe if any
44501     new_path="${new_path/%.exe/}"
44502 
44503     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44504     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44505   fi
44506 
44507     else
44508       # We're on a unix platform. Hooray! :)
44509       # First separate the path from the arguments. This will split at the first
44510       # space.
44511       complete="$BUILD_CC"
44512       path="${complete%% *}"
44513       tmp="$complete EOL"
44514       arguments="${tmp#* }"
44515 
44516       # Cannot rely on the command "which" here since it doesn't always work.
44517       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44518       if test -z "$is_absolute_path"; then
44519         # Path to executable is not absolute. Find it.
44520         IFS_save="$IFS"
44521         IFS=:
44522         for p in $PATH; do
44523           if test -f "$p/$path" && test -x "$p/$path"; then
44524             new_path="$p/$path"
44525             break
44526           fi
44527         done
44528         IFS="$IFS_save"
44529       else
44530         # This is an absolute path, we can use it without further modifications.
44531         new_path="$path"
44532       fi
44533 
44534       if test "x$new_path" = x; then
44535         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44536 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44537         has_space=`$ECHO "$complete" | $GREP " "`
44538         if test "x$has_space" != x; then
44539           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44540 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44541         fi
44542         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44543       fi
44544     fi
44545 
44546     # Now join together the path and the arguments once again
44547     if test "x$arguments" != xEOL; then
44548       new_complete="$new_path ${arguments% *}"
44549     else
44550       new_complete="$new_path"
44551     fi
44552 
44553     if test "x$complete" != "x$new_complete"; then
44554       BUILD_CC="$new_complete"
44555       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44556 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44557     fi
44558   fi
44559 
44560 
44561 
44562 
44563   # Publish this variable in the help.
44564 
44565 
44566   if [ -z "${BUILD_CXX+x}" ]; then
44567     # The variable is not set by user, try to locate tool using the code snippet
44568     for ac_prog in cl CC g++
44569 do
44570   # Extract the first word of "$ac_prog", so it can be a program name with args.
44571 set dummy $ac_prog; ac_word=$2
44572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44573 $as_echo_n "checking for $ac_word... " >&6; }
44574 if ${ac_cv_path_BUILD_CXX+:} false; then :
44575   $as_echo_n "(cached) " >&6
44576 else
44577   case $BUILD_CXX in
44578   [\\/]* | ?:[\\/]*)
44579   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44580   ;;
44581   *)
44582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44583 for as_dir in $PATH
44584 do
44585   IFS=$as_save_IFS
44586   test -z "$as_dir" && as_dir=.
44587     for ac_exec_ext in '' $ac_executable_extensions; do
44588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44589     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44591     break 2
44592   fi
44593 done
44594   done
44595 IFS=$as_save_IFS
44596 
44597   ;;
44598 esac
44599 fi
44600 BUILD_CXX=$ac_cv_path_BUILD_CXX
44601 if test -n "$BUILD_CXX"; then
44602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44603 $as_echo "$BUILD_CXX" >&6; }
44604 else
44605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44606 $as_echo "no" >&6; }
44607 fi
44608 
44609 
44610   test -n "$BUILD_CXX" && break
44611 done
44612 
44613   else
44614     # The variable is set, but is it from the command line or the environment?
44615 
44616     # Try to remove the string !BUILD_CXX! from our list.
44617     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44618     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44619       # If it failed, the variable was not from the command line. Ignore it,
44620       # but warn the user (except for BASH, which is always set by the calling BASH).
44621       if test "xBUILD_CXX" != xBASH; then
44622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44623 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44624       fi
44625       # Try to locate tool using the code snippet
44626       for ac_prog in cl CC g++
44627 do
44628   # Extract the first word of "$ac_prog", so it can be a program name with args.
44629 set dummy $ac_prog; ac_word=$2
44630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44631 $as_echo_n "checking for $ac_word... " >&6; }
44632 if ${ac_cv_path_BUILD_CXX+:} false; then :
44633   $as_echo_n "(cached) " >&6
44634 else
44635   case $BUILD_CXX in
44636   [\\/]* | ?:[\\/]*)
44637   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44638   ;;
44639   *)
44640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44641 for as_dir in $PATH
44642 do
44643   IFS=$as_save_IFS
44644   test -z "$as_dir" && as_dir=.
44645     for ac_exec_ext in '' $ac_executable_extensions; do
44646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44647     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44649     break 2
44650   fi
44651 done
44652   done
44653 IFS=$as_save_IFS
44654 
44655   ;;
44656 esac
44657 fi
44658 BUILD_CXX=$ac_cv_path_BUILD_CXX
44659 if test -n "$BUILD_CXX"; then
44660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44661 $as_echo "$BUILD_CXX" >&6; }
44662 else
44663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44664 $as_echo "no" >&6; }
44665 fi
44666 
44667 
44668   test -n "$BUILD_CXX" && break
44669 done
44670 
44671     else
44672       # If it succeeded, then it was overridden by the user. We will use it
44673       # for the tool.
44674 
44675       # First remove it from the list of overridden variables, so we can test
44676       # for unknown variables in the end.
44677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44678 
44679       # Check if we try to supply an empty value
44680       if test "x$BUILD_CXX" = x; then
44681         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44682 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44684 $as_echo_n "checking for BUILD_CXX... " >&6; }
44685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44686 $as_echo "disabled" >&6; }
44687       else
44688         # Check if the provided tool contains a complete path.
44689         tool_specified="$BUILD_CXX"
44690         tool_basename="${tool_specified##*/}"
44691         if test "x$tool_basename" = "x$tool_specified"; then
44692           # A command without a complete path is provided, search $PATH.
44693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44694 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44695           # Extract the first word of "$tool_basename", so it can be a program name with args.
44696 set dummy $tool_basename; ac_word=$2
44697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44698 $as_echo_n "checking for $ac_word... " >&6; }
44699 if ${ac_cv_path_BUILD_CXX+:} false; then :
44700   $as_echo_n "(cached) " >&6
44701 else
44702   case $BUILD_CXX in
44703   [\\/]* | ?:[\\/]*)
44704   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44705   ;;
44706   *)
44707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44708 for as_dir in $PATH
44709 do
44710   IFS=$as_save_IFS
44711   test -z "$as_dir" && as_dir=.
44712     for ac_exec_ext in '' $ac_executable_extensions; do
44713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44714     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44716     break 2
44717   fi
44718 done
44719   done
44720 IFS=$as_save_IFS
44721 
44722   ;;
44723 esac
44724 fi
44725 BUILD_CXX=$ac_cv_path_BUILD_CXX
44726 if test -n "$BUILD_CXX"; then
44727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44728 $as_echo "$BUILD_CXX" >&6; }
44729 else
44730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44731 $as_echo "no" >&6; }
44732 fi
44733 
44734 
44735           if test "x$BUILD_CXX" = x; then
44736             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44737           fi
44738         else
44739           # Otherwise we believe it is a complete path. Use it as it is.
44740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44741 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44742           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44743 $as_echo_n "checking for BUILD_CXX... " >&6; }
44744           if test ! -x "$tool_specified"; then
44745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44746 $as_echo "not found" >&6; }
44747             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44748           fi
44749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44750 $as_echo "$tool_specified" >&6; }
44751         fi
44752       fi
44753     fi
44754 
44755   fi
44756 
44757 
44758 
44759   if test "x$BUILD_CXX" = x; then
44760     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44761   fi
44762 
44763 
44764 
44765   # Only process if variable expands to non-empty
44766 
44767   if test "x$BUILD_CXX" != x; then
44768     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44769 
44770   # First separate the path from the arguments. This will split at the first
44771   # space.
44772   complete="$BUILD_CXX"
44773   path="${complete%% *}"
44774   tmp="$complete EOL"
44775   arguments="${tmp#* }"
44776 
44777   # Input might be given as Windows format, start by converting to
44778   # unix format.
44779   new_path=`$CYGPATH -u "$path"`
44780 
44781   # Now try to locate executable using which
44782   new_path=`$WHICH "$new_path" 2> /dev/null`
44783   # bat and cmd files are not always considered executable in cygwin causing which
44784   # to not find them
44785   if test "x$new_path" = x \
44786       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44787       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44788     new_path=`$CYGPATH -u "$path"`
44789   fi
44790   if test "x$new_path" = x; then
44791     # Oops. Which didn't find the executable.
44792     # The splitting of arguments from the executable at a space might have been incorrect,
44793     # since paths with space are more likely in Windows. Give it another try with the whole
44794     # argument.
44795     path="$complete"
44796     arguments="EOL"
44797     new_path=`$CYGPATH -u "$path"`
44798     new_path=`$WHICH "$new_path" 2> /dev/null`
44799     # bat and cmd files are not always considered executable in cygwin causing which
44800     # to not find them
44801     if test "x$new_path" = x \
44802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44804       new_path=`$CYGPATH -u "$path"`
44805     fi
44806     if test "x$new_path" = x; then
44807       # It's still not found. Now this is an unrecoverable error.
44808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44809 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44810       has_space=`$ECHO "$complete" | $GREP " "`
44811       if test "x$has_space" != x; then
44812         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44813 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44814       fi
44815       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44816     fi
44817   fi
44818 
44819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44822   # "foo.exe" is OK but "foo" is an error.
44823   #
44824   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44825   # It is also a way to make sure we got the proper file name for the real test later on.
44826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44827   if test "x$test_shortpath" = x; then
44828     # Short path failed, file does not exist as specified.
44829     # Try adding .exe or .cmd
44830     if test -f "${new_path}.exe"; then
44831       input_to_shortpath="${new_path}.exe"
44832     elif test -f "${new_path}.cmd"; then
44833       input_to_shortpath="${new_path}.cmd"
44834     else
44835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44836 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44837       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44838 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44839       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44840     fi
44841   else
44842     input_to_shortpath="$new_path"
44843   fi
44844 
44845   # Call helper function which possibly converts this using DOS-style short mode.
44846   # If so, the updated path is stored in $new_path.
44847   new_path="$input_to_shortpath"
44848 
44849   input_path="$input_to_shortpath"
44850   # Check if we need to convert this using DOS-style short mode. If the path
44851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44852   # take no chances and rewrite it.
44853   # Note: m4 eats our [], so we need to use [ and ] instead.
44854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44855   if test "x$has_forbidden_chars" != x; then
44856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44860       # Going to short mode and back again did indeed matter. Since short mode is
44861       # case insensitive, let's make it lowercase to improve readability.
44862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44863       # Now convert it back to Unix-style (cygpath)
44864       input_path=`$CYGPATH -u "$shortmode_path"`
44865       new_path="$input_path"
44866     fi
44867   fi
44868 
44869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44870   if test "x$test_cygdrive_prefix" = x; then
44871     # As a simple fix, exclude /usr/bin since it's not a real path.
44872     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44874       # a path prefixed by /cygdrive for fixpath to work.
44875       new_path="$CYGWIN_ROOT_PATH$input_path"
44876     fi
44877   fi
44878 
44879   # remove trailing .exe if any
44880   new_path="${new_path/%.exe/}"
44881 
44882     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883 
44884   # First separate the path from the arguments. This will split at the first
44885   # space.
44886   complete="$BUILD_CXX"
44887   path="${complete%% *}"
44888   tmp="$complete EOL"
44889   arguments="${tmp#* }"
44890 
44891   # Input might be given as Windows format, start by converting to
44892   # unix format.
44893   new_path="$path"
44894 
44895   windows_path="$new_path"
44896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44897     unix_path=`$CYGPATH -u "$windows_path"`
44898     new_path="$unix_path"
44899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44901     new_path="$unix_path"
44902   fi
44903 
44904 
44905   # Now try to locate executable using which
44906   new_path=`$WHICH "$new_path" 2> /dev/null`
44907 
44908   if test "x$new_path" = x; then
44909     # Oops. Which didn't find the executable.
44910     # The splitting of arguments from the executable at a space might have been incorrect,
44911     # since paths with space are more likely in Windows. Give it another try with the whole
44912     # argument.
44913     path="$complete"
44914     arguments="EOL"
44915     new_path="$path"
44916 
44917   windows_path="$new_path"
44918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919     unix_path=`$CYGPATH -u "$windows_path"`
44920     new_path="$unix_path"
44921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923     new_path="$unix_path"
44924   fi
44925 
44926 
44927     new_path=`$WHICH "$new_path" 2> /dev/null`
44928     # bat and cmd files are not always considered executable in MSYS causing which
44929     # to not find them
44930     if test "x$new_path" = x \
44931         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44932         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44933       new_path="$path"
44934 
44935   windows_path="$new_path"
44936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44937     unix_path=`$CYGPATH -u "$windows_path"`
44938     new_path="$unix_path"
44939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44941     new_path="$unix_path"
44942   fi
44943 
44944     fi
44945 
44946     if test "x$new_path" = x; then
44947       # It's still not found. Now this is an unrecoverable error.
44948       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44949 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44950       has_space=`$ECHO "$complete" | $GREP " "`
44951       if test "x$has_space" != x; then
44952         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44953 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44954       fi
44955       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44956     fi
44957   fi
44958 
44959   # Now new_path has a complete unix path to the binary
44960   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44961     # Keep paths in /bin as-is, but remove trailing .exe if any
44962     new_path="${new_path/%.exe/}"
44963     # Do not save /bin paths to all_fixpath_prefixes!
44964   else
44965     # Not in mixed or Windows style, start by that.
44966     new_path=`cmd //c echo $new_path`
44967 
44968   input_path="$new_path"
44969   # Check if we need to convert this using DOS-style short mode. If the path
44970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44971   # take no chances and rewrite it.
44972   # Note: m4 eats our [], so we need to use [ and ] instead.
44973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44974   if test "x$has_forbidden_chars" != x; then
44975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44977   fi
44978 
44979     # Output is in $new_path
44980 
44981   windows_path="$new_path"
44982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44983     unix_path=`$CYGPATH -u "$windows_path"`
44984     new_path="$unix_path"
44985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44987     new_path="$unix_path"
44988   fi
44989 
44990     # remove trailing .exe if any
44991     new_path="${new_path/%.exe/}"
44992 
44993     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44994     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44995   fi
44996 
44997     else
44998       # We're on a unix platform. Hooray! :)
44999       # First separate the path from the arguments. This will split at the first
45000       # space.
45001       complete="$BUILD_CXX"
45002       path="${complete%% *}"
45003       tmp="$complete EOL"
45004       arguments="${tmp#* }"
45005 
45006       # Cannot rely on the command "which" here since it doesn't always work.
45007       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45008       if test -z "$is_absolute_path"; then
45009         # Path to executable is not absolute. Find it.
45010         IFS_save="$IFS"
45011         IFS=:
45012         for p in $PATH; do
45013           if test -f "$p/$path" && test -x "$p/$path"; then
45014             new_path="$p/$path"
45015             break
45016           fi
45017         done
45018         IFS="$IFS_save"
45019       else
45020         # This is an absolute path, we can use it without further modifications.
45021         new_path="$path"
45022       fi
45023 
45024       if test "x$new_path" = x; then
45025         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45026 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45027         has_space=`$ECHO "$complete" | $GREP " "`
45028         if test "x$has_space" != x; then
45029           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45030 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45031         fi
45032         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45033       fi
45034     fi
45035 
45036     # Now join together the path and the arguments once again
45037     if test "x$arguments" != xEOL; then
45038       new_complete="$new_path ${arguments% *}"
45039     else
45040       new_complete="$new_path"
45041     fi
45042 
45043     if test "x$complete" != "x$new_complete"; then
45044       BUILD_CXX="$new_complete"
45045       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45046 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45047     fi
45048   fi
45049 
45050 
45051 
45052   # Publish this variable in the help.
45053 
45054 
45055   if [ -z "${BUILD_NM+x}" ]; then
45056     # The variable is not set by user, try to locate tool using the code snippet
45057     for ac_prog in nm gcc-nm
45058 do
45059   # Extract the first word of "$ac_prog", so it can be a program name with args.
45060 set dummy $ac_prog; ac_word=$2
45061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45062 $as_echo_n "checking for $ac_word... " >&6; }
45063 if ${ac_cv_path_BUILD_NM+:} false; then :
45064   $as_echo_n "(cached) " >&6
45065 else
45066   case $BUILD_NM in
45067   [\\/]* | ?:[\\/]*)
45068   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45069   ;;
45070   *)
45071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45072 for as_dir in $PATH
45073 do
45074   IFS=$as_save_IFS
45075   test -z "$as_dir" && as_dir=.
45076     for ac_exec_ext in '' $ac_executable_extensions; do
45077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45078     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45080     break 2
45081   fi
45082 done
45083   done
45084 IFS=$as_save_IFS
45085 
45086   ;;
45087 esac
45088 fi
45089 BUILD_NM=$ac_cv_path_BUILD_NM
45090 if test -n "$BUILD_NM"; then
45091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45092 $as_echo "$BUILD_NM" >&6; }
45093 else
45094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45095 $as_echo "no" >&6; }
45096 fi
45097 
45098 
45099   test -n "$BUILD_NM" && break
45100 done
45101 
45102   else
45103     # The variable is set, but is it from the command line or the environment?
45104 
45105     # Try to remove the string !BUILD_NM! from our list.
45106     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45107     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45108       # If it failed, the variable was not from the command line. Ignore it,
45109       # but warn the user (except for BASH, which is always set by the calling BASH).
45110       if test "xBUILD_NM" != xBASH; then
45111         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45112 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45113       fi
45114       # Try to locate tool using the code snippet
45115       for ac_prog in nm gcc-nm
45116 do
45117   # Extract the first word of "$ac_prog", so it can be a program name with args.
45118 set dummy $ac_prog; ac_word=$2
45119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45120 $as_echo_n "checking for $ac_word... " >&6; }
45121 if ${ac_cv_path_BUILD_NM+:} false; then :
45122   $as_echo_n "(cached) " >&6
45123 else
45124   case $BUILD_NM in
45125   [\\/]* | ?:[\\/]*)
45126   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45127   ;;
45128   *)
45129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45130 for as_dir in $PATH
45131 do
45132   IFS=$as_save_IFS
45133   test -z "$as_dir" && as_dir=.
45134     for ac_exec_ext in '' $ac_executable_extensions; do
45135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45136     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45138     break 2
45139   fi
45140 done
45141   done
45142 IFS=$as_save_IFS
45143 
45144   ;;
45145 esac
45146 fi
45147 BUILD_NM=$ac_cv_path_BUILD_NM
45148 if test -n "$BUILD_NM"; then
45149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45150 $as_echo "$BUILD_NM" >&6; }
45151 else
45152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45153 $as_echo "no" >&6; }
45154 fi
45155 
45156 
45157   test -n "$BUILD_NM" && break
45158 done
45159 
45160     else
45161       # If it succeeded, then it was overridden by the user. We will use it
45162       # for the tool.
45163 
45164       # First remove it from the list of overridden variables, so we can test
45165       # for unknown variables in the end.
45166       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45167 
45168       # Check if we try to supply an empty value
45169       if test "x$BUILD_NM" = x; then
45170         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45171 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45172         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45173 $as_echo_n "checking for BUILD_NM... " >&6; }
45174         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45175 $as_echo "disabled" >&6; }
45176       else
45177         # Check if the provided tool contains a complete path.
45178         tool_specified="$BUILD_NM"
45179         tool_basename="${tool_specified##*/}"
45180         if test "x$tool_basename" = "x$tool_specified"; then
45181           # A command without a complete path is provided, search $PATH.
45182           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45183 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45184           # Extract the first word of "$tool_basename", so it can be a program name with args.
45185 set dummy $tool_basename; ac_word=$2
45186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45187 $as_echo_n "checking for $ac_word... " >&6; }
45188 if ${ac_cv_path_BUILD_NM+:} false; then :
45189   $as_echo_n "(cached) " >&6
45190 else
45191   case $BUILD_NM in
45192   [\\/]* | ?:[\\/]*)
45193   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45194   ;;
45195   *)
45196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45197 for as_dir in $PATH
45198 do
45199   IFS=$as_save_IFS
45200   test -z "$as_dir" && as_dir=.
45201     for ac_exec_ext in '' $ac_executable_extensions; do
45202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45203     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45205     break 2
45206   fi
45207 done
45208   done
45209 IFS=$as_save_IFS
45210 
45211   ;;
45212 esac
45213 fi
45214 BUILD_NM=$ac_cv_path_BUILD_NM
45215 if test -n "$BUILD_NM"; then
45216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45217 $as_echo "$BUILD_NM" >&6; }
45218 else
45219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45220 $as_echo "no" >&6; }
45221 fi
45222 
45223 
45224           if test "x$BUILD_NM" = x; then
45225             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45226           fi
45227         else
45228           # Otherwise we believe it is a complete path. Use it as it is.
45229           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45230 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45231           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45232 $as_echo_n "checking for BUILD_NM... " >&6; }
45233           if test ! -x "$tool_specified"; then
45234             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45235 $as_echo "not found" >&6; }
45236             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45237           fi
45238           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45239 $as_echo "$tool_specified" >&6; }
45240         fi
45241       fi
45242     fi
45243 
45244   fi
45245 
45246 
45247 
45248   # Only process if variable expands to non-empty
45249 
45250   if test "x$BUILD_NM" != x; then
45251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45252 
45253   # First separate the path from the arguments. This will split at the first
45254   # space.
45255   complete="$BUILD_NM"
45256   path="${complete%% *}"
45257   tmp="$complete EOL"
45258   arguments="${tmp#* }"
45259 
45260   # Input might be given as Windows format, start by converting to
45261   # unix format.
45262   new_path=`$CYGPATH -u "$path"`
45263 
45264   # Now try to locate executable using which
45265   new_path=`$WHICH "$new_path" 2> /dev/null`
45266   # bat and cmd files are not always considered executable in cygwin causing which
45267   # to not find them
45268   if test "x$new_path" = x \
45269       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45270       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45271     new_path=`$CYGPATH -u "$path"`
45272   fi
45273   if test "x$new_path" = x; then
45274     # Oops. Which didn't find the executable.
45275     # The splitting of arguments from the executable at a space might have been incorrect,
45276     # since paths with space are more likely in Windows. Give it another try with the whole
45277     # argument.
45278     path="$complete"
45279     arguments="EOL"
45280     new_path=`$CYGPATH -u "$path"`
45281     new_path=`$WHICH "$new_path" 2> /dev/null`
45282     # bat and cmd files are not always considered executable in cygwin causing which
45283     # to not find them
45284     if test "x$new_path" = x \
45285         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45286         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45287       new_path=`$CYGPATH -u "$path"`
45288     fi
45289     if test "x$new_path" = x; then
45290       # It's still not found. Now this is an unrecoverable error.
45291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45292 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45293       has_space=`$ECHO "$complete" | $GREP " "`
45294       if test "x$has_space" != x; then
45295         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45296 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45297       fi
45298       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45299     fi
45300   fi
45301 
45302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45305   # "foo.exe" is OK but "foo" is an error.
45306   #
45307   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45308   # It is also a way to make sure we got the proper file name for the real test later on.
45309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45310   if test "x$test_shortpath" = x; then
45311     # Short path failed, file does not exist as specified.
45312     # Try adding .exe or .cmd
45313     if test -f "${new_path}.exe"; then
45314       input_to_shortpath="${new_path}.exe"
45315     elif test -f "${new_path}.cmd"; then
45316       input_to_shortpath="${new_path}.cmd"
45317     else
45318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45319 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45320       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45321 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45322       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45323     fi
45324   else
45325     input_to_shortpath="$new_path"
45326   fi
45327 
45328   # Call helper function which possibly converts this using DOS-style short mode.
45329   # If so, the updated path is stored in $new_path.
45330   new_path="$input_to_shortpath"
45331 
45332   input_path="$input_to_shortpath"
45333   # Check if we need to convert this using DOS-style short mode. If the path
45334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45335   # take no chances and rewrite it.
45336   # Note: m4 eats our [], so we need to use [ and ] instead.
45337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45338   if test "x$has_forbidden_chars" != x; then
45339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45343       # Going to short mode and back again did indeed matter. Since short mode is
45344       # case insensitive, let's make it lowercase to improve readability.
45345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45346       # Now convert it back to Unix-style (cygpath)
45347       input_path=`$CYGPATH -u "$shortmode_path"`
45348       new_path="$input_path"
45349     fi
45350   fi
45351 
45352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45353   if test "x$test_cygdrive_prefix" = x; then
45354     # As a simple fix, exclude /usr/bin since it's not a real path.
45355     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45357       # a path prefixed by /cygdrive for fixpath to work.
45358       new_path="$CYGWIN_ROOT_PATH$input_path"
45359     fi
45360   fi
45361 
45362   # remove trailing .exe if any
45363   new_path="${new_path/%.exe/}"
45364 
45365     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366 
45367   # First separate the path from the arguments. This will split at the first
45368   # space.
45369   complete="$BUILD_NM"
45370   path="${complete%% *}"
45371   tmp="$complete EOL"
45372   arguments="${tmp#* }"
45373 
45374   # Input might be given as Windows format, start by converting to
45375   # unix format.
45376   new_path="$path"
45377 
45378   windows_path="$new_path"
45379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45380     unix_path=`$CYGPATH -u "$windows_path"`
45381     new_path="$unix_path"
45382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45384     new_path="$unix_path"
45385   fi
45386 
45387 
45388   # Now try to locate executable using which
45389   new_path=`$WHICH "$new_path" 2> /dev/null`
45390 
45391   if test "x$new_path" = x; then
45392     # Oops. Which didn't find the executable.
45393     # The splitting of arguments from the executable at a space might have been incorrect,
45394     # since paths with space are more likely in Windows. Give it another try with the whole
45395     # argument.
45396     path="$complete"
45397     arguments="EOL"
45398     new_path="$path"
45399 
45400   windows_path="$new_path"
45401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402     unix_path=`$CYGPATH -u "$windows_path"`
45403     new_path="$unix_path"
45404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406     new_path="$unix_path"
45407   fi
45408 
45409 
45410     new_path=`$WHICH "$new_path" 2> /dev/null`
45411     # bat and cmd files are not always considered executable in MSYS causing which
45412     # to not find them
45413     if test "x$new_path" = x \
45414         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45415         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45416       new_path="$path"
45417 
45418   windows_path="$new_path"
45419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45420     unix_path=`$CYGPATH -u "$windows_path"`
45421     new_path="$unix_path"
45422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45424     new_path="$unix_path"
45425   fi
45426 
45427     fi
45428 
45429     if test "x$new_path" = x; then
45430       # It's still not found. Now this is an unrecoverable error.
45431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45432 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45433       has_space=`$ECHO "$complete" | $GREP " "`
45434       if test "x$has_space" != x; then
45435         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45436 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45437       fi
45438       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45439     fi
45440   fi
45441 
45442   # Now new_path has a complete unix path to the binary
45443   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45444     # Keep paths in /bin as-is, but remove trailing .exe if any
45445     new_path="${new_path/%.exe/}"
45446     # Do not save /bin paths to all_fixpath_prefixes!
45447   else
45448     # Not in mixed or Windows style, start by that.
45449     new_path=`cmd //c echo $new_path`
45450 
45451   input_path="$new_path"
45452   # Check if we need to convert this using DOS-style short mode. If the path
45453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45454   # take no chances and rewrite it.
45455   # Note: m4 eats our [], so we need to use [ and ] instead.
45456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45457   if test "x$has_forbidden_chars" != x; then
45458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45459     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45460   fi
45461 
45462     # Output is in $new_path
45463 
45464   windows_path="$new_path"
45465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45466     unix_path=`$CYGPATH -u "$windows_path"`
45467     new_path="$unix_path"
45468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45470     new_path="$unix_path"
45471   fi
45472 
45473     # remove trailing .exe if any
45474     new_path="${new_path/%.exe/}"
45475 
45476     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45477     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45478   fi
45479 
45480     else
45481       # We're on a unix platform. Hooray! :)
45482       # First separate the path from the arguments. This will split at the first
45483       # space.
45484       complete="$BUILD_NM"
45485       path="${complete%% *}"
45486       tmp="$complete EOL"
45487       arguments="${tmp#* }"
45488 
45489       # Cannot rely on the command "which" here since it doesn't always work.
45490       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45491       if test -z "$is_absolute_path"; then
45492         # Path to executable is not absolute. Find it.
45493         IFS_save="$IFS"
45494         IFS=:
45495         for p in $PATH; do
45496           if test -f "$p/$path" && test -x "$p/$path"; then
45497             new_path="$p/$path"
45498             break
45499           fi
45500         done
45501         IFS="$IFS_save"
45502       else
45503         # This is an absolute path, we can use it without further modifications.
45504         new_path="$path"
45505       fi
45506 
45507       if test "x$new_path" = x; then
45508         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45509 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45510         has_space=`$ECHO "$complete" | $GREP " "`
45511         if test "x$has_space" != x; then
45512           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45513 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45514         fi
45515         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45516       fi
45517     fi
45518 
45519     # Now join together the path and the arguments once again
45520     if test "x$arguments" != xEOL; then
45521       new_complete="$new_path ${arguments% *}"
45522     else
45523       new_complete="$new_path"
45524     fi
45525 
45526     if test "x$complete" != "x$new_complete"; then
45527       BUILD_NM="$new_complete"
45528       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45529 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45530     fi
45531   fi
45532 
45533 
45534 
45535   # Publish this variable in the help.
45536 
45537 
45538   if [ -z "${BUILD_AR+x}" ]; then
45539     # The variable is not set by user, try to locate tool using the code snippet
45540     for ac_prog in ar gcc-ar
45541 do
45542   # Extract the first word of "$ac_prog", so it can be a program name with args.
45543 set dummy $ac_prog; ac_word=$2
45544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45545 $as_echo_n "checking for $ac_word... " >&6; }
45546 if ${ac_cv_path_BUILD_AR+:} false; then :
45547   $as_echo_n "(cached) " >&6
45548 else
45549   case $BUILD_AR in
45550   [\\/]* | ?:[\\/]*)
45551   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45552   ;;
45553   *)
45554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45555 for as_dir in $PATH
45556 do
45557   IFS=$as_save_IFS
45558   test -z "$as_dir" && as_dir=.
45559     for ac_exec_ext in '' $ac_executable_extensions; do
45560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45561     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45563     break 2
45564   fi
45565 done
45566   done
45567 IFS=$as_save_IFS
45568 
45569   ;;
45570 esac
45571 fi
45572 BUILD_AR=$ac_cv_path_BUILD_AR
45573 if test -n "$BUILD_AR"; then
45574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45575 $as_echo "$BUILD_AR" >&6; }
45576 else
45577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45578 $as_echo "no" >&6; }
45579 fi
45580 
45581 
45582   test -n "$BUILD_AR" && break
45583 done
45584 
45585   else
45586     # The variable is set, but is it from the command line or the environment?
45587 
45588     # Try to remove the string !BUILD_AR! from our list.
45589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45591       # If it failed, the variable was not from the command line. Ignore it,
45592       # but warn the user (except for BASH, which is always set by the calling BASH).
45593       if test "xBUILD_AR" != xBASH; then
45594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45595 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45596       fi
45597       # Try to locate tool using the code snippet
45598       for ac_prog in ar gcc-ar
45599 do
45600   # Extract the first word of "$ac_prog", so it can be a program name with args.
45601 set dummy $ac_prog; ac_word=$2
45602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45603 $as_echo_n "checking for $ac_word... " >&6; }
45604 if ${ac_cv_path_BUILD_AR+:} false; then :
45605   $as_echo_n "(cached) " >&6
45606 else
45607   case $BUILD_AR in
45608   [\\/]* | ?:[\\/]*)
45609   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45610   ;;
45611   *)
45612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45613 for as_dir in $PATH
45614 do
45615   IFS=$as_save_IFS
45616   test -z "$as_dir" && as_dir=.
45617     for ac_exec_ext in '' $ac_executable_extensions; do
45618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45619     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45621     break 2
45622   fi
45623 done
45624   done
45625 IFS=$as_save_IFS
45626 
45627   ;;
45628 esac
45629 fi
45630 BUILD_AR=$ac_cv_path_BUILD_AR
45631 if test -n "$BUILD_AR"; then
45632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45633 $as_echo "$BUILD_AR" >&6; }
45634 else
45635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45636 $as_echo "no" >&6; }
45637 fi
45638 
45639 
45640   test -n "$BUILD_AR" && break
45641 done
45642 
45643     else
45644       # If it succeeded, then it was overridden by the user. We will use it
45645       # for the tool.
45646 
45647       # First remove it from the list of overridden variables, so we can test
45648       # for unknown variables in the end.
45649       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45650 
45651       # Check if we try to supply an empty value
45652       if test "x$BUILD_AR" = x; then
45653         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45654 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45656 $as_echo_n "checking for BUILD_AR... " >&6; }
45657         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45658 $as_echo "disabled" >&6; }
45659       else
45660         # Check if the provided tool contains a complete path.
45661         tool_specified="$BUILD_AR"
45662         tool_basename="${tool_specified##*/}"
45663         if test "x$tool_basename" = "x$tool_specified"; then
45664           # A command without a complete path is provided, search $PATH.
45665           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45666 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45667           # Extract the first word of "$tool_basename", so it can be a program name with args.
45668 set dummy $tool_basename; ac_word=$2
45669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45670 $as_echo_n "checking for $ac_word... " >&6; }
45671 if ${ac_cv_path_BUILD_AR+:} false; then :
45672   $as_echo_n "(cached) " >&6
45673 else
45674   case $BUILD_AR in
45675   [\\/]* | ?:[\\/]*)
45676   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45677   ;;
45678   *)
45679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45680 for as_dir in $PATH
45681 do
45682   IFS=$as_save_IFS
45683   test -z "$as_dir" && as_dir=.
45684     for ac_exec_ext in '' $ac_executable_extensions; do
45685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45686     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45688     break 2
45689   fi
45690 done
45691   done
45692 IFS=$as_save_IFS
45693 
45694   ;;
45695 esac
45696 fi
45697 BUILD_AR=$ac_cv_path_BUILD_AR
45698 if test -n "$BUILD_AR"; then
45699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45700 $as_echo "$BUILD_AR" >&6; }
45701 else
45702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45703 $as_echo "no" >&6; }
45704 fi
45705 
45706 
45707           if test "x$BUILD_AR" = x; then
45708             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45709           fi
45710         else
45711           # Otherwise we believe it is a complete path. Use it as it is.
45712           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45713 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45714           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45715 $as_echo_n "checking for BUILD_AR... " >&6; }
45716           if test ! -x "$tool_specified"; then
45717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45718 $as_echo "not found" >&6; }
45719             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45720           fi
45721           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45722 $as_echo "$tool_specified" >&6; }
45723         fi
45724       fi
45725     fi
45726 
45727   fi
45728 
45729 
45730 
45731   # Only process if variable expands to non-empty
45732 
45733   if test "x$BUILD_AR" != x; then
45734     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45735 
45736   # First separate the path from the arguments. This will split at the first
45737   # space.
45738   complete="$BUILD_AR"
45739   path="${complete%% *}"
45740   tmp="$complete EOL"
45741   arguments="${tmp#* }"
45742 
45743   # Input might be given as Windows format, start by converting to
45744   # unix format.
45745   new_path=`$CYGPATH -u "$path"`
45746 
45747   # Now try to locate executable using which
45748   new_path=`$WHICH "$new_path" 2> /dev/null`
45749   # bat and cmd files are not always considered executable in cygwin causing which
45750   # to not find them
45751   if test "x$new_path" = x \
45752       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45753       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45754     new_path=`$CYGPATH -u "$path"`
45755   fi
45756   if test "x$new_path" = x; then
45757     # Oops. Which didn't find the executable.
45758     # The splitting of arguments from the executable at a space might have been incorrect,
45759     # since paths with space are more likely in Windows. Give it another try with the whole
45760     # argument.
45761     path="$complete"
45762     arguments="EOL"
45763     new_path=`$CYGPATH -u "$path"`
45764     new_path=`$WHICH "$new_path" 2> /dev/null`
45765     # bat and cmd files are not always considered executable in cygwin causing which
45766     # to not find them
45767     if test "x$new_path" = x \
45768         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45769         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45770       new_path=`$CYGPATH -u "$path"`
45771     fi
45772     if test "x$new_path" = x; then
45773       # It's still not found. Now this is an unrecoverable error.
45774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45775 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45776       has_space=`$ECHO "$complete" | $GREP " "`
45777       if test "x$has_space" != x; then
45778         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45779 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45780       fi
45781       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45782     fi
45783   fi
45784 
45785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45788   # "foo.exe" is OK but "foo" is an error.
45789   #
45790   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45791   # It is also a way to make sure we got the proper file name for the real test later on.
45792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45793   if test "x$test_shortpath" = x; then
45794     # Short path failed, file does not exist as specified.
45795     # Try adding .exe or .cmd
45796     if test -f "${new_path}.exe"; then
45797       input_to_shortpath="${new_path}.exe"
45798     elif test -f "${new_path}.cmd"; then
45799       input_to_shortpath="${new_path}.cmd"
45800     else
45801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45802 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45803       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45804 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45805       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45806     fi
45807   else
45808     input_to_shortpath="$new_path"
45809   fi
45810 
45811   # Call helper function which possibly converts this using DOS-style short mode.
45812   # If so, the updated path is stored in $new_path.
45813   new_path="$input_to_shortpath"
45814 
45815   input_path="$input_to_shortpath"
45816   # Check if we need to convert this using DOS-style short mode. If the path
45817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45818   # take no chances and rewrite it.
45819   # Note: m4 eats our [], so we need to use [ and ] instead.
45820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45821   if test "x$has_forbidden_chars" != x; then
45822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45826       # Going to short mode and back again did indeed matter. Since short mode is
45827       # case insensitive, let's make it lowercase to improve readability.
45828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45829       # Now convert it back to Unix-style (cygpath)
45830       input_path=`$CYGPATH -u "$shortmode_path"`
45831       new_path="$input_path"
45832     fi
45833   fi
45834 
45835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45836   if test "x$test_cygdrive_prefix" = x; then
45837     # As a simple fix, exclude /usr/bin since it's not a real path.
45838     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45840       # a path prefixed by /cygdrive for fixpath to work.
45841       new_path="$CYGWIN_ROOT_PATH$input_path"
45842     fi
45843   fi
45844 
45845   # remove trailing .exe if any
45846   new_path="${new_path/%.exe/}"
45847 
45848     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849 
45850   # First separate the path from the arguments. This will split at the first
45851   # space.
45852   complete="$BUILD_AR"
45853   path="${complete%% *}"
45854   tmp="$complete EOL"
45855   arguments="${tmp#* }"
45856 
45857   # Input might be given as Windows format, start by converting to
45858   # unix format.
45859   new_path="$path"
45860 
45861   windows_path="$new_path"
45862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45863     unix_path=`$CYGPATH -u "$windows_path"`
45864     new_path="$unix_path"
45865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45867     new_path="$unix_path"
45868   fi
45869 
45870 
45871   # Now try to locate executable using which
45872   new_path=`$WHICH "$new_path" 2> /dev/null`
45873 
45874   if test "x$new_path" = x; then
45875     # Oops. Which didn't find the executable.
45876     # The splitting of arguments from the executable at a space might have been incorrect,
45877     # since paths with space are more likely in Windows. Give it another try with the whole
45878     # argument.
45879     path="$complete"
45880     arguments="EOL"
45881     new_path="$path"
45882 
45883   windows_path="$new_path"
45884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45885     unix_path=`$CYGPATH -u "$windows_path"`
45886     new_path="$unix_path"
45887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45889     new_path="$unix_path"
45890   fi
45891 
45892 
45893     new_path=`$WHICH "$new_path" 2> /dev/null`
45894     # bat and cmd files are not always considered executable in MSYS causing which
45895     # to not find them
45896     if test "x$new_path" = x \
45897         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45898         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45899       new_path="$path"
45900 
45901   windows_path="$new_path"
45902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45903     unix_path=`$CYGPATH -u "$windows_path"`
45904     new_path="$unix_path"
45905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45907     new_path="$unix_path"
45908   fi
45909 
45910     fi
45911 
45912     if test "x$new_path" = x; then
45913       # It's still not found. Now this is an unrecoverable error.
45914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45915 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45916       has_space=`$ECHO "$complete" | $GREP " "`
45917       if test "x$has_space" != x; then
45918         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45919 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45920       fi
45921       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45922     fi
45923   fi
45924 
45925   # Now new_path has a complete unix path to the binary
45926   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45927     # Keep paths in /bin as-is, but remove trailing .exe if any
45928     new_path="${new_path/%.exe/}"
45929     # Do not save /bin paths to all_fixpath_prefixes!
45930   else
45931     # Not in mixed or Windows style, start by that.
45932     new_path=`cmd //c echo $new_path`
45933 
45934   input_path="$new_path"
45935   # Check if we need to convert this using DOS-style short mode. If the path
45936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45937   # take no chances and rewrite it.
45938   # Note: m4 eats our [], so we need to use [ and ] instead.
45939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45940   if test "x$has_forbidden_chars" != x; then
45941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45942     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45943   fi
45944 
45945     # Output is in $new_path
45946 
45947   windows_path="$new_path"
45948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45949     unix_path=`$CYGPATH -u "$windows_path"`
45950     new_path="$unix_path"
45951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45953     new_path="$unix_path"
45954   fi
45955 
45956     # remove trailing .exe if any
45957     new_path="${new_path/%.exe/}"
45958 
45959     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45960     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45961   fi
45962 
45963     else
45964       # We're on a unix platform. Hooray! :)
45965       # First separate the path from the arguments. This will split at the first
45966       # space.
45967       complete="$BUILD_AR"
45968       path="${complete%% *}"
45969       tmp="$complete EOL"
45970       arguments="${tmp#* }"
45971 
45972       # Cannot rely on the command "which" here since it doesn't always work.
45973       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45974       if test -z "$is_absolute_path"; then
45975         # Path to executable is not absolute. Find it.
45976         IFS_save="$IFS"
45977         IFS=:
45978         for p in $PATH; do
45979           if test -f "$p/$path" && test -x "$p/$path"; then
45980             new_path="$p/$path"
45981             break
45982           fi
45983         done
45984         IFS="$IFS_save"
45985       else
45986         # This is an absolute path, we can use it without further modifications.
45987         new_path="$path"
45988       fi
45989 
45990       if test "x$new_path" = x; then
45991         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45992 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45993         has_space=`$ECHO "$complete" | $GREP " "`
45994         if test "x$has_space" != x; then
45995           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45996 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45997         fi
45998         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45999       fi
46000     fi
46001 
46002     # Now join together the path and the arguments once again
46003     if test "x$arguments" != xEOL; then
46004       new_complete="$new_path ${arguments% *}"
46005     else
46006       new_complete="$new_path"
46007     fi
46008 
46009     if test "x$complete" != "x$new_complete"; then
46010       BUILD_AR="$new_complete"
46011       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46012 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46013     fi
46014   fi
46015 
46016 
46017 
46018   # Publish this variable in the help.
46019 
46020 
46021   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46022     # The variable is not set by user, try to locate tool using the code snippet
46023     for ac_prog in objcopy
46024 do
46025   # Extract the first word of "$ac_prog", so it can be a program name with args.
46026 set dummy $ac_prog; ac_word=$2
46027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46028 $as_echo_n "checking for $ac_word... " >&6; }
46029 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46030   $as_echo_n "(cached) " >&6
46031 else
46032   case $BUILD_OBJCOPY in
46033   [\\/]* | ?:[\\/]*)
46034   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46035   ;;
46036   *)
46037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46038 for as_dir in $PATH
46039 do
46040   IFS=$as_save_IFS
46041   test -z "$as_dir" && as_dir=.
46042     for ac_exec_ext in '' $ac_executable_extensions; do
46043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46044     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46046     break 2
46047   fi
46048 done
46049   done
46050 IFS=$as_save_IFS
46051 
46052   ;;
46053 esac
46054 fi
46055 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46056 if test -n "$BUILD_OBJCOPY"; then
46057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46058 $as_echo "$BUILD_OBJCOPY" >&6; }
46059 else
46060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46061 $as_echo "no" >&6; }
46062 fi
46063 
46064 
46065   test -n "$BUILD_OBJCOPY" && break
46066 done
46067 
46068   else
46069     # The variable is set, but is it from the command line or the environment?
46070 
46071     # Try to remove the string !BUILD_OBJCOPY! from our list.
46072     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46073     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46074       # If it failed, the variable was not from the command line. Ignore it,
46075       # but warn the user (except for BASH, which is always set by the calling BASH).
46076       if test "xBUILD_OBJCOPY" != xBASH; then
46077         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46078 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46079       fi
46080       # Try to locate tool using the code snippet
46081       for ac_prog in objcopy
46082 do
46083   # Extract the first word of "$ac_prog", so it can be a program name with args.
46084 set dummy $ac_prog; ac_word=$2
46085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46086 $as_echo_n "checking for $ac_word... " >&6; }
46087 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46088   $as_echo_n "(cached) " >&6
46089 else
46090   case $BUILD_OBJCOPY in
46091   [\\/]* | ?:[\\/]*)
46092   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46093   ;;
46094   *)
46095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46096 for as_dir in $PATH
46097 do
46098   IFS=$as_save_IFS
46099   test -z "$as_dir" && as_dir=.
46100     for ac_exec_ext in '' $ac_executable_extensions; do
46101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46102     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46104     break 2
46105   fi
46106 done
46107   done
46108 IFS=$as_save_IFS
46109 
46110   ;;
46111 esac
46112 fi
46113 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46114 if test -n "$BUILD_OBJCOPY"; then
46115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46116 $as_echo "$BUILD_OBJCOPY" >&6; }
46117 else
46118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46119 $as_echo "no" >&6; }
46120 fi
46121 
46122 
46123   test -n "$BUILD_OBJCOPY" && break
46124 done
46125 
46126     else
46127       # If it succeeded, then it was overridden by the user. We will use it
46128       # for the tool.
46129 
46130       # First remove it from the list of overridden variables, so we can test
46131       # for unknown variables in the end.
46132       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46133 
46134       # Check if we try to supply an empty value
46135       if test "x$BUILD_OBJCOPY" = x; then
46136         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46137 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46139 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46141 $as_echo "disabled" >&6; }
46142       else
46143         # Check if the provided tool contains a complete path.
46144         tool_specified="$BUILD_OBJCOPY"
46145         tool_basename="${tool_specified##*/}"
46146         if test "x$tool_basename" = "x$tool_specified"; then
46147           # A command without a complete path is provided, search $PATH.
46148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46149 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46150           # Extract the first word of "$tool_basename", so it can be a program name with args.
46151 set dummy $tool_basename; ac_word=$2
46152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46153 $as_echo_n "checking for $ac_word... " >&6; }
46154 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46155   $as_echo_n "(cached) " >&6
46156 else
46157   case $BUILD_OBJCOPY in
46158   [\\/]* | ?:[\\/]*)
46159   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46160   ;;
46161   *)
46162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46163 for as_dir in $PATH
46164 do
46165   IFS=$as_save_IFS
46166   test -z "$as_dir" && as_dir=.
46167     for ac_exec_ext in '' $ac_executable_extensions; do
46168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46169     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46171     break 2
46172   fi
46173 done
46174   done
46175 IFS=$as_save_IFS
46176 
46177   ;;
46178 esac
46179 fi
46180 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46181 if test -n "$BUILD_OBJCOPY"; then
46182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46183 $as_echo "$BUILD_OBJCOPY" >&6; }
46184 else
46185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46186 $as_echo "no" >&6; }
46187 fi
46188 
46189 
46190           if test "x$BUILD_OBJCOPY" = x; then
46191             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46192           fi
46193         else
46194           # Otherwise we believe it is a complete path. Use it as it is.
46195           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46196 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46198 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46199           if test ! -x "$tool_specified"; then
46200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46201 $as_echo "not found" >&6; }
46202             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46203           fi
46204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46205 $as_echo "$tool_specified" >&6; }
46206         fi
46207       fi
46208     fi
46209 
46210   fi
46211 
46212 
46213 
46214   # Only process if variable expands to non-empty
46215 
46216   if test "x$BUILD_OBJCOPY" != x; then
46217     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46218 
46219   # First separate the path from the arguments. This will split at the first
46220   # space.
46221   complete="$BUILD_OBJCOPY"
46222   path="${complete%% *}"
46223   tmp="$complete EOL"
46224   arguments="${tmp#* }"
46225 
46226   # Input might be given as Windows format, start by converting to
46227   # unix format.
46228   new_path=`$CYGPATH -u "$path"`
46229 
46230   # Now try to locate executable using which
46231   new_path=`$WHICH "$new_path" 2> /dev/null`
46232   # bat and cmd files are not always considered executable in cygwin causing which
46233   # to not find them
46234   if test "x$new_path" = x \
46235       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46236       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46237     new_path=`$CYGPATH -u "$path"`
46238   fi
46239   if test "x$new_path" = x; then
46240     # Oops. Which didn't find the executable.
46241     # The splitting of arguments from the executable at a space might have been incorrect,
46242     # since paths with space are more likely in Windows. Give it another try with the whole
46243     # argument.
46244     path="$complete"
46245     arguments="EOL"
46246     new_path=`$CYGPATH -u "$path"`
46247     new_path=`$WHICH "$new_path" 2> /dev/null`
46248     # bat and cmd files are not always considered executable in cygwin causing which
46249     # to not find them
46250     if test "x$new_path" = x \
46251         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46252         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46253       new_path=`$CYGPATH -u "$path"`
46254     fi
46255     if test "x$new_path" = x; then
46256       # It's still not found. Now this is an unrecoverable error.
46257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46258 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46259       has_space=`$ECHO "$complete" | $GREP " "`
46260       if test "x$has_space" != x; then
46261         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46262 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46263       fi
46264       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46265     fi
46266   fi
46267 
46268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46271   # "foo.exe" is OK but "foo" is an error.
46272   #
46273   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46274   # It is also a way to make sure we got the proper file name for the real test later on.
46275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46276   if test "x$test_shortpath" = x; then
46277     # Short path failed, file does not exist as specified.
46278     # Try adding .exe or .cmd
46279     if test -f "${new_path}.exe"; then
46280       input_to_shortpath="${new_path}.exe"
46281     elif test -f "${new_path}.cmd"; then
46282       input_to_shortpath="${new_path}.cmd"
46283     else
46284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46285 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46286       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46287 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46288       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46289     fi
46290   else
46291     input_to_shortpath="$new_path"
46292   fi
46293 
46294   # Call helper function which possibly converts this using DOS-style short mode.
46295   # If so, the updated path is stored in $new_path.
46296   new_path="$input_to_shortpath"
46297 
46298   input_path="$input_to_shortpath"
46299   # Check if we need to convert this using DOS-style short mode. If the path
46300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46301   # take no chances and rewrite it.
46302   # Note: m4 eats our [], so we need to use [ and ] instead.
46303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46304   if test "x$has_forbidden_chars" != x; then
46305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46309       # Going to short mode and back again did indeed matter. Since short mode is
46310       # case insensitive, let's make it lowercase to improve readability.
46311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46312       # Now convert it back to Unix-style (cygpath)
46313       input_path=`$CYGPATH -u "$shortmode_path"`
46314       new_path="$input_path"
46315     fi
46316   fi
46317 
46318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46319   if test "x$test_cygdrive_prefix" = x; then
46320     # As a simple fix, exclude /usr/bin since it's not a real path.
46321     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46323       # a path prefixed by /cygdrive for fixpath to work.
46324       new_path="$CYGWIN_ROOT_PATH$input_path"
46325     fi
46326   fi
46327 
46328   # remove trailing .exe if any
46329   new_path="${new_path/%.exe/}"
46330 
46331     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332 
46333   # First separate the path from the arguments. This will split at the first
46334   # space.
46335   complete="$BUILD_OBJCOPY"
46336   path="${complete%% *}"
46337   tmp="$complete EOL"
46338   arguments="${tmp#* }"
46339 
46340   # Input might be given as Windows format, start by converting to
46341   # unix format.
46342   new_path="$path"
46343 
46344   windows_path="$new_path"
46345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46346     unix_path=`$CYGPATH -u "$windows_path"`
46347     new_path="$unix_path"
46348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46350     new_path="$unix_path"
46351   fi
46352 
46353 
46354   # Now try to locate executable using which
46355   new_path=`$WHICH "$new_path" 2> /dev/null`
46356 
46357   if test "x$new_path" = x; then
46358     # Oops. Which didn't find the executable.
46359     # The splitting of arguments from the executable at a space might have been incorrect,
46360     # since paths with space are more likely in Windows. Give it another try with the whole
46361     # argument.
46362     path="$complete"
46363     arguments="EOL"
46364     new_path="$path"
46365 
46366   windows_path="$new_path"
46367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368     unix_path=`$CYGPATH -u "$windows_path"`
46369     new_path="$unix_path"
46370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46372     new_path="$unix_path"
46373   fi
46374 
46375 
46376     new_path=`$WHICH "$new_path" 2> /dev/null`
46377     # bat and cmd files are not always considered executable in MSYS causing which
46378     # to not find them
46379     if test "x$new_path" = x \
46380         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46381         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46382       new_path="$path"
46383 
46384   windows_path="$new_path"
46385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46386     unix_path=`$CYGPATH -u "$windows_path"`
46387     new_path="$unix_path"
46388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46390     new_path="$unix_path"
46391   fi
46392 
46393     fi
46394 
46395     if test "x$new_path" = x; then
46396       # It's still not found. Now this is an unrecoverable error.
46397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46398 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46399       has_space=`$ECHO "$complete" | $GREP " "`
46400       if test "x$has_space" != x; then
46401         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46402 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46403       fi
46404       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46405     fi
46406   fi
46407 
46408   # Now new_path has a complete unix path to the binary
46409   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46410     # Keep paths in /bin as-is, but remove trailing .exe if any
46411     new_path="${new_path/%.exe/}"
46412     # Do not save /bin paths to all_fixpath_prefixes!
46413   else
46414     # Not in mixed or Windows style, start by that.
46415     new_path=`cmd //c echo $new_path`
46416 
46417   input_path="$new_path"
46418   # Check if we need to convert this using DOS-style short mode. If the path
46419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46420   # take no chances and rewrite it.
46421   # Note: m4 eats our [], so we need to use [ and ] instead.
46422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46423   if test "x$has_forbidden_chars" != x; then
46424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46425     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46426   fi
46427 
46428     # Output is in $new_path
46429 
46430   windows_path="$new_path"
46431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46432     unix_path=`$CYGPATH -u "$windows_path"`
46433     new_path="$unix_path"
46434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46436     new_path="$unix_path"
46437   fi
46438 
46439     # remove trailing .exe if any
46440     new_path="${new_path/%.exe/}"
46441 
46442     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46443     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46444   fi
46445 
46446     else
46447       # We're on a unix platform. Hooray! :)
46448       # First separate the path from the arguments. This will split at the first
46449       # space.
46450       complete="$BUILD_OBJCOPY"
46451       path="${complete%% *}"
46452       tmp="$complete EOL"
46453       arguments="${tmp#* }"
46454 
46455       # Cannot rely on the command "which" here since it doesn't always work.
46456       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46457       if test -z "$is_absolute_path"; then
46458         # Path to executable is not absolute. Find it.
46459         IFS_save="$IFS"
46460         IFS=:
46461         for p in $PATH; do
46462           if test -f "$p/$path" && test -x "$p/$path"; then
46463             new_path="$p/$path"
46464             break
46465           fi
46466         done
46467         IFS="$IFS_save"
46468       else
46469         # This is an absolute path, we can use it without further modifications.
46470         new_path="$path"
46471       fi
46472 
46473       if test "x$new_path" = x; then
46474         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46475 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46476         has_space=`$ECHO "$complete" | $GREP " "`
46477         if test "x$has_space" != x; then
46478           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46479 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46480         fi
46481         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46482       fi
46483     fi
46484 
46485     # Now join together the path and the arguments once again
46486     if test "x$arguments" != xEOL; then
46487       new_complete="$new_path ${arguments% *}"
46488     else
46489       new_complete="$new_path"
46490     fi
46491 
46492     if test "x$complete" != "x$new_complete"; then
46493       BUILD_OBJCOPY="$new_complete"
46494       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46495 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46496     fi
46497   fi
46498 
46499 
46500 
46501   # Publish this variable in the help.
46502 
46503 
46504   if [ -z "${BUILD_STRIP+x}" ]; then
46505     # The variable is not set by user, try to locate tool using the code snippet
46506     for ac_prog in strip
46507 do
46508   # Extract the first word of "$ac_prog", so it can be a program name with args.
46509 set dummy $ac_prog; ac_word=$2
46510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46511 $as_echo_n "checking for $ac_word... " >&6; }
46512 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46513   $as_echo_n "(cached) " >&6
46514 else
46515   case $BUILD_STRIP in
46516   [\\/]* | ?:[\\/]*)
46517   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46518   ;;
46519   *)
46520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46521 for as_dir in $PATH
46522 do
46523   IFS=$as_save_IFS
46524   test -z "$as_dir" && as_dir=.
46525     for ac_exec_ext in '' $ac_executable_extensions; do
46526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46527     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46529     break 2
46530   fi
46531 done
46532   done
46533 IFS=$as_save_IFS
46534 
46535   ;;
46536 esac
46537 fi
46538 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46539 if test -n "$BUILD_STRIP"; then
46540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46541 $as_echo "$BUILD_STRIP" >&6; }
46542 else
46543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46544 $as_echo "no" >&6; }
46545 fi
46546 
46547 
46548   test -n "$BUILD_STRIP" && break
46549 done
46550 
46551   else
46552     # The variable is set, but is it from the command line or the environment?
46553 
46554     # Try to remove the string !BUILD_STRIP! from our list.
46555     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46556     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46557       # If it failed, the variable was not from the command line. Ignore it,
46558       # but warn the user (except for BASH, which is always set by the calling BASH).
46559       if test "xBUILD_STRIP" != xBASH; then
46560         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46561 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46562       fi
46563       # Try to locate tool using the code snippet
46564       for ac_prog in strip
46565 do
46566   # Extract the first word of "$ac_prog", so it can be a program name with args.
46567 set dummy $ac_prog; ac_word=$2
46568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46569 $as_echo_n "checking for $ac_word... " >&6; }
46570 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46571   $as_echo_n "(cached) " >&6
46572 else
46573   case $BUILD_STRIP in
46574   [\\/]* | ?:[\\/]*)
46575   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46576   ;;
46577   *)
46578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46579 for as_dir in $PATH
46580 do
46581   IFS=$as_save_IFS
46582   test -z "$as_dir" && as_dir=.
46583     for ac_exec_ext in '' $ac_executable_extensions; do
46584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46585     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46587     break 2
46588   fi
46589 done
46590   done
46591 IFS=$as_save_IFS
46592 
46593   ;;
46594 esac
46595 fi
46596 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46597 if test -n "$BUILD_STRIP"; then
46598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46599 $as_echo "$BUILD_STRIP" >&6; }
46600 else
46601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46602 $as_echo "no" >&6; }
46603 fi
46604 
46605 
46606   test -n "$BUILD_STRIP" && break
46607 done
46608 
46609     else
46610       # If it succeeded, then it was overridden by the user. We will use it
46611       # for the tool.
46612 
46613       # First remove it from the list of overridden variables, so we can test
46614       # for unknown variables in the end.
46615       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46616 
46617       # Check if we try to supply an empty value
46618       if test "x$BUILD_STRIP" = x; then
46619         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46620 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46621         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46622 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46624 $as_echo "disabled" >&6; }
46625       else
46626         # Check if the provided tool contains a complete path.
46627         tool_specified="$BUILD_STRIP"
46628         tool_basename="${tool_specified##*/}"
46629         if test "x$tool_basename" = "x$tool_specified"; then
46630           # A command without a complete path is provided, search $PATH.
46631           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46632 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46633           # Extract the first word of "$tool_basename", so it can be a program name with args.
46634 set dummy $tool_basename; ac_word=$2
46635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46636 $as_echo_n "checking for $ac_word... " >&6; }
46637 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46638   $as_echo_n "(cached) " >&6
46639 else
46640   case $BUILD_STRIP in
46641   [\\/]* | ?:[\\/]*)
46642   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46643   ;;
46644   *)
46645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46646 for as_dir in $PATH
46647 do
46648   IFS=$as_save_IFS
46649   test -z "$as_dir" && as_dir=.
46650     for ac_exec_ext in '' $ac_executable_extensions; do
46651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46652     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46654     break 2
46655   fi
46656 done
46657   done
46658 IFS=$as_save_IFS
46659 
46660   ;;
46661 esac
46662 fi
46663 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46664 if test -n "$BUILD_STRIP"; then
46665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46666 $as_echo "$BUILD_STRIP" >&6; }
46667 else
46668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46669 $as_echo "no" >&6; }
46670 fi
46671 
46672 
46673           if test "x$BUILD_STRIP" = x; then
46674             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46675           fi
46676         else
46677           # Otherwise we believe it is a complete path. Use it as it is.
46678           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46679 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46680           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46681 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46682           if test ! -x "$tool_specified"; then
46683             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46684 $as_echo "not found" >&6; }
46685             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46686           fi
46687           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46688 $as_echo "$tool_specified" >&6; }
46689         fi
46690       fi
46691     fi
46692 
46693   fi
46694 
46695 
46696 
46697   # Only process if variable expands to non-empty
46698 
46699   if test "x$BUILD_STRIP" != x; then
46700     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46701 
46702   # First separate the path from the arguments. This will split at the first
46703   # space.
46704   complete="$BUILD_STRIP"
46705   path="${complete%% *}"
46706   tmp="$complete EOL"
46707   arguments="${tmp#* }"
46708 
46709   # Input might be given as Windows format, start by converting to
46710   # unix format.
46711   new_path=`$CYGPATH -u "$path"`
46712 
46713   # Now try to locate executable using which
46714   new_path=`$WHICH "$new_path" 2> /dev/null`
46715   # bat and cmd files are not always considered executable in cygwin causing which
46716   # to not find them
46717   if test "x$new_path" = x \
46718       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46719       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46720     new_path=`$CYGPATH -u "$path"`
46721   fi
46722   if test "x$new_path" = x; then
46723     # Oops. Which didn't find the executable.
46724     # The splitting of arguments from the executable at a space might have been incorrect,
46725     # since paths with space are more likely in Windows. Give it another try with the whole
46726     # argument.
46727     path="$complete"
46728     arguments="EOL"
46729     new_path=`$CYGPATH -u "$path"`
46730     new_path=`$WHICH "$new_path" 2> /dev/null`
46731     # bat and cmd files are not always considered executable in cygwin causing which
46732     # to not find them
46733     if test "x$new_path" = x \
46734         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46735         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46736       new_path=`$CYGPATH -u "$path"`
46737     fi
46738     if test "x$new_path" = x; then
46739       # It's still not found. Now this is an unrecoverable error.
46740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46741 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46742       has_space=`$ECHO "$complete" | $GREP " "`
46743       if test "x$has_space" != x; then
46744         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46745 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46746       fi
46747       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46748     fi
46749   fi
46750 
46751   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46752   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46753   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46754   # "foo.exe" is OK but "foo" is an error.
46755   #
46756   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46757   # It is also a way to make sure we got the proper file name for the real test later on.
46758   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46759   if test "x$test_shortpath" = x; then
46760     # Short path failed, file does not exist as specified.
46761     # Try adding .exe or .cmd
46762     if test -f "${new_path}.exe"; then
46763       input_to_shortpath="${new_path}.exe"
46764     elif test -f "${new_path}.cmd"; then
46765       input_to_shortpath="${new_path}.cmd"
46766     else
46767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46768 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46769       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46770 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46771       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46772     fi
46773   else
46774     input_to_shortpath="$new_path"
46775   fi
46776 
46777   # Call helper function which possibly converts this using DOS-style short mode.
46778   # If so, the updated path is stored in $new_path.
46779   new_path="$input_to_shortpath"
46780 
46781   input_path="$input_to_shortpath"
46782   # Check if we need to convert this using DOS-style short mode. If the path
46783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46784   # take no chances and rewrite it.
46785   # Note: m4 eats our [], so we need to use [ and ] instead.
46786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46787   if test "x$has_forbidden_chars" != x; then
46788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46792       # Going to short mode and back again did indeed matter. Since short mode is
46793       # case insensitive, let's make it lowercase to improve readability.
46794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46795       # Now convert it back to Unix-style (cygpath)
46796       input_path=`$CYGPATH -u "$shortmode_path"`
46797       new_path="$input_path"
46798     fi
46799   fi
46800 
46801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46802   if test "x$test_cygdrive_prefix" = x; then
46803     # As a simple fix, exclude /usr/bin since it's not a real path.
46804     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46806       # a path prefixed by /cygdrive for fixpath to work.
46807       new_path="$CYGWIN_ROOT_PATH$input_path"
46808     fi
46809   fi
46810 
46811   # remove trailing .exe if any
46812   new_path="${new_path/%.exe/}"
46813 
46814     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815 
46816   # First separate the path from the arguments. This will split at the first
46817   # space.
46818   complete="$BUILD_STRIP"
46819   path="${complete%% *}"
46820   tmp="$complete EOL"
46821   arguments="${tmp#* }"
46822 
46823   # Input might be given as Windows format, start by converting to
46824   # unix format.
46825   new_path="$path"
46826 
46827   windows_path="$new_path"
46828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46829     unix_path=`$CYGPATH -u "$windows_path"`
46830     new_path="$unix_path"
46831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46833     new_path="$unix_path"
46834   fi
46835 
46836 
46837   # Now try to locate executable using which
46838   new_path=`$WHICH "$new_path" 2> /dev/null`
46839 
46840   if test "x$new_path" = x; then
46841     # Oops. Which didn't find the executable.
46842     # The splitting of arguments from the executable at a space might have been incorrect,
46843     # since paths with space are more likely in Windows. Give it another try with the whole
46844     # argument.
46845     path="$complete"
46846     arguments="EOL"
46847     new_path="$path"
46848 
46849   windows_path="$new_path"
46850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46851     unix_path=`$CYGPATH -u "$windows_path"`
46852     new_path="$unix_path"
46853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46855     new_path="$unix_path"
46856   fi
46857 
46858 
46859     new_path=`$WHICH "$new_path" 2> /dev/null`
46860     # bat and cmd files are not always considered executable in MSYS causing which
46861     # to not find them
46862     if test "x$new_path" = x \
46863         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46864         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46865       new_path="$path"
46866 
46867   windows_path="$new_path"
46868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46869     unix_path=`$CYGPATH -u "$windows_path"`
46870     new_path="$unix_path"
46871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46873     new_path="$unix_path"
46874   fi
46875 
46876     fi
46877 
46878     if test "x$new_path" = x; then
46879       # It's still not found. Now this is an unrecoverable error.
46880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46881 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46882       has_space=`$ECHO "$complete" | $GREP " "`
46883       if test "x$has_space" != x; then
46884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46886       fi
46887       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46888     fi
46889   fi
46890 
46891   # Now new_path has a complete unix path to the binary
46892   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46893     # Keep paths in /bin as-is, but remove trailing .exe if any
46894     new_path="${new_path/%.exe/}"
46895     # Do not save /bin paths to all_fixpath_prefixes!
46896   else
46897     # Not in mixed or Windows style, start by that.
46898     new_path=`cmd //c echo $new_path`
46899 
46900   input_path="$new_path"
46901   # Check if we need to convert this using DOS-style short mode. If the path
46902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46903   # take no chances and rewrite it.
46904   # Note: m4 eats our [], so we need to use [ and ] instead.
46905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46906   if test "x$has_forbidden_chars" != x; then
46907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46908     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46909   fi
46910 
46911     # Output is in $new_path
46912 
46913   windows_path="$new_path"
46914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915     unix_path=`$CYGPATH -u "$windows_path"`
46916     new_path="$unix_path"
46917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46919     new_path="$unix_path"
46920   fi
46921 
46922     # remove trailing .exe if any
46923     new_path="${new_path/%.exe/}"
46924 
46925     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46926     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46927   fi
46928 
46929     else
46930       # We're on a unix platform. Hooray! :)
46931       # First separate the path from the arguments. This will split at the first
46932       # space.
46933       complete="$BUILD_STRIP"
46934       path="${complete%% *}"
46935       tmp="$complete EOL"
46936       arguments="${tmp#* }"
46937 
46938       # Cannot rely on the command "which" here since it doesn't always work.
46939       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46940       if test -z "$is_absolute_path"; then
46941         # Path to executable is not absolute. Find it.
46942         IFS_save="$IFS"
46943         IFS=:
46944         for p in $PATH; do
46945           if test -f "$p/$path" && test -x "$p/$path"; then
46946             new_path="$p/$path"
46947             break
46948           fi
46949         done
46950         IFS="$IFS_save"
46951       else
46952         # This is an absolute path, we can use it without further modifications.
46953         new_path="$path"
46954       fi
46955 
46956       if test "x$new_path" = x; then
46957         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46958 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46959         has_space=`$ECHO "$complete" | $GREP " "`
46960         if test "x$has_space" != x; then
46961           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46962 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46963         fi
46964         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46965       fi
46966     fi
46967 
46968     # Now join together the path and the arguments once again
46969     if test "x$arguments" != xEOL; then
46970       new_complete="$new_path ${arguments% *}"
46971     else
46972       new_complete="$new_path"
46973     fi
46974 
46975     if test "x$complete" != "x$new_complete"; then
46976       BUILD_STRIP="$new_complete"
46977       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46978 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46979     fi
46980   fi
46981 
46982     # Assume the C compiler is the assembler
46983     BUILD_AS="$BUILD_CC -c"
46984     # Just like for the target compiler, use the compiler as linker
46985     BUILD_LD="$BUILD_CC"
46986     BUILD_LDCXX="$BUILD_CXX"
46987 
46988     PATH="$OLDPATH"
46989 
46990 
46991   COMPILER=$BUILD_CC
46992   COMPILER_NAME=BuildC
46993 
46994   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46995     # cc -V output typically looks like
46996     #     cc: Sun C 5.12 Linux_i386 2011/11/16
46997     # or
46998     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46999     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47000     # Check that this is likely to be the Solaris Studio cc.
47001     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47002     if test $? -ne 0; then
47003       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47004       { $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
47005 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47006       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47007 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47008       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47009 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47010       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47011     fi
47012     # Remove usage instructions (if present), and
47013     # collapse compiler output into a single line
47014     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47015         $SED -e 's/ *[Uu]sage:.*//'`
47016     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47017         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47018   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47019     # xlc -qversion output typically looks like
47020     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47021     #     Version: 11.01.0000.0015
47022     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47023     # Check that this is likely to be the IBM XL C compiler.
47024     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47025     if test $? -ne 0; then
47026       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47027       { $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
47028 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47030 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47031       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47032 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47033       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47034     fi
47035     # Collapse compiler output into a single line
47036     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47037     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47039   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47040     # There is no specific version flag, but all output starts with a version string.
47041     # First line typically looks something like:
47042     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47043     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47044     # Check that this is likely to be Microsoft CL.EXE.
47045     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47046     if test $? -ne 0; then
47047       { $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
47048 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47049       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47050 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47051       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47052     fi
47053     # Collapse compiler output into a single line
47054     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47055     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47056         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47057   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47058     # gcc --version output typically looks like
47059     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47060     #     Copyright (C) 2013 Free Software Foundation, Inc.
47061     #     This is free software; see the source for copying conditions.  There is NO
47062     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47063     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47064     # Check that this is likely to be GCC.
47065     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47066     if test $? -ne 0; then
47067       { $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
47068 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47069       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47070 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47071       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47072     fi
47073     # Remove Copyright and legalese from version string, and
47074     # collapse into a single line
47075     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47076         $SED -e 's/ *Copyright .*//'`
47077     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47078         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47079   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47080     # clang --version output typically looks like
47081     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47082     #    clang version 3.3 (tags/RELEASE_33/final)
47083     # or
47084     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47085     #    Target: x86_64-pc-linux-gnu
47086     #    Thread model: posix
47087     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47088     # Check that this is likely to be clang
47089     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47090     if test $? -ne 0; then
47091       { $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
47092 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47093       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47094 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47095       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096     fi
47097     # Collapse compiler output into a single line
47098     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47099     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47101   else
47102       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47103   fi
47104   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47105   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47106   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47107   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47108 
47109   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47110 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47111 
47112 
47113   COMPILER=$BUILD_CXX
47114   COMPILER_NAME=BuildC++
47115 
47116   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47117     # cc -V output typically looks like
47118     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47119     # or
47120     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47121     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47122     # Check that this is likely to be the Solaris Studio cc.
47123     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47124     if test $? -ne 0; then
47125       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47126       { $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
47127 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47128       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47129 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47130       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47131 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47132       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47133     fi
47134     # Remove usage instructions (if present), and
47135     # collapse compiler output into a single line
47136     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47137         $SED -e 's/ *[Uu]sage:.*//'`
47138     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47139         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47140   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47141     # xlc -qversion output typically looks like
47142     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47143     #     Version: 11.01.0000.0015
47144     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47145     # Check that this is likely to be the IBM XL C compiler.
47146     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47147     if test $? -ne 0; then
47148       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47149       { $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
47150 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47151       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47152 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47153       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47154 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47155       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47156     fi
47157     # Collapse compiler output into a single line
47158     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47159     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47161   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47162     # There is no specific version flag, but all output starts with a version string.
47163     # First line typically looks something like:
47164     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47165     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47166     # Check that this is likely to be Microsoft CL.EXE.
47167     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47168     if test $? -ne 0; then
47169       { $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
47170 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47171       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47172 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47173       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47174     fi
47175     # Collapse compiler output into a single line
47176     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47177     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47178         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47179   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47180     # gcc --version output typically looks like
47181     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47182     #     Copyright (C) 2013 Free Software Foundation, Inc.
47183     #     This is free software; see the source for copying conditions.  There is NO
47184     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47185     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47186     # Check that this is likely to be GCC.
47187     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47188     if test $? -ne 0; then
47189       { $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
47190 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47191       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47192 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47193       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47194     fi
47195     # Remove Copyright and legalese from version string, and
47196     # collapse into a single line
47197     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47198         $SED -e 's/ *Copyright .*//'`
47199     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47200         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47201   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47202     # clang --version output typically looks like
47203     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47204     #    clang version 3.3 (tags/RELEASE_33/final)
47205     # or
47206     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47207     #    Target: x86_64-pc-linux-gnu
47208     #    Thread model: posix
47209     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47210     # Check that this is likely to be clang
47211     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47212     if test $? -ne 0; then
47213       { $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
47214 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47215       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47216 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47217       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47218     fi
47219     # Collapse compiler output into a single line
47220     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47221     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47222         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47223   else
47224       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47225   fi
47226   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47227   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47228   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47229   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47230 
47231   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47232 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47233 
47234 
47235   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47236     { $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
47237 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47238     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47239 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47240   fi
47241 
47242   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47243   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47244     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47245 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47246   fi
47247 
47248   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47249     { $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
47250 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47251   fi
47252 
47253   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47254 
47255   else
47256     # If we are not cross compiling, use the normal target compilers for
47257     # building the build platform executables.
47258     BUILD_CC="$CC"
47259     BUILD_CXX="$CXX"
47260     BUILD_LD="$LD"
47261     BUILD_LDCXX="$LDCXX"
47262     BUILD_NM="$NM"
47263     BUILD_AS="$AS"
47264     BUILD_OBJCOPY="$OBJCOPY"
47265     BUILD_STRIP="$STRIP"
47266     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47267     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47268     BUILD_AR="$AR"
47269 
47270 
47271   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47272     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47273 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47274     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47275 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47276   fi
47277 
47278   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47279   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47280     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47281 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47282   fi
47283 
47284   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47285     { $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
47286 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47287   fi
47288 
47289   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47290 
47291   fi
47292 
47293 
47294 
47295 
47296 
47297 
47298 
47299 
47300 
47301 
47302 
47303 
47304 
47305 
47306   # The package path is used only on macosx?
47307   # FIXME: clean this up, and/or move it elsewhere.
47308   PACKAGE_PATH=/opt/local
47309 
47310 
47311   # Check for extra potential brokenness.
47312   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47313     # On Windows, double-check that we got the right compiler.
47314     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47315     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47316     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47317       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47318         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
47319       fi
47320     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47321       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47322         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47323       fi
47324     fi
47325   fi
47326 
47327   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47328     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47329     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47330     # This is later checked when setting flags.
47331 
47332     # "-Og" suppported for GCC 4.8 and later
47333     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47334 
47335 
47336 
47337 
47338 
47339 
47340 
47341 
47342 
47343 
47344 
47345 
47346 
47347 
47348 
47349 
47350 
47351 
47352 
47353 
47354 
47355 
47356 
47357 
47358 
47359 
47360 
47361 
47362 
47363 
47364 
47365 
47366 
47367 
47368 
47369 
47370 
47371 
47372 
47373 
47374 
47375 
47376 
47377 
47378 
47379 
47380 
47381     # Execute function body
47382 
47383 
47384 
47385 
47386 
47387 
47388 
47389 
47390 
47391 
47392 
47393 
47394 
47395 
47396 
47397 
47398 
47399 
47400 
47401 
47402 
47403 
47404 
47405 
47406 
47407 
47408 
47409 
47410 
47411 
47412 
47413 
47414 
47415 
47416 
47417 
47418 
47419 
47420 
47421 
47422 
47423 
47424 
47425 
47426 
47427 
47428 
47429 
47430     # Execute function body
47431 
47432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47433 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47434   supports=yes
47435 
47436   saved_cflags="$CFLAGS"
47437   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47438   ac_ext=c
47439 ac_cpp='$CPP $CPPFLAGS'
47440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47443 
47444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47445 /* end confdefs.h.  */
47446 int i;
47447 _ACEOF
47448 if ac_fn_c_try_compile "$LINENO"; then :
47449 
47450 else
47451   supports=no
47452 fi
47453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47454   ac_ext=cpp
47455 ac_cpp='$CXXCPP $CPPFLAGS'
47456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47459 
47460   CFLAGS="$saved_cflags"
47461 
47462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47463 $as_echo "$supports" >&6; }
47464   if test "x$supports" = "xyes" ; then
47465     :
47466     C_COMP_SUPPORTS="yes"
47467   else
47468     :
47469     C_COMP_SUPPORTS="no"
47470   fi
47471 
47472 
47473 
47474 
47475 
47476 
47477 
47478 
47479 
47480 
47481 
47482 
47483 
47484 
47485 
47486 
47487 
47488 
47489 
47490 
47491 
47492 
47493 
47494 
47495 
47496 
47497 
47498 
47499 
47500 
47501 
47502 
47503 
47504 
47505 
47506 
47507 
47508 
47509 
47510 
47511 
47512 
47513 
47514 
47515 
47516 
47517 
47518 
47519 
47520 
47521 
47522 
47523 
47524 
47525 
47526 
47527 
47528 
47529 
47530     # Execute function body
47531 
47532   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47533 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47534   supports=yes
47535 
47536   saved_cxxflags="$CXXFLAGS"
47537   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47538   ac_ext=cpp
47539 ac_cpp='$CXXCPP $CPPFLAGS'
47540 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47541 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47542 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47543 
47544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47545 /* end confdefs.h.  */
47546 int i;
47547 _ACEOF
47548 if ac_fn_cxx_try_compile "$LINENO"; then :
47549 
47550 else
47551   supports=no
47552 fi
47553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47554   ac_ext=cpp
47555 ac_cpp='$CXXCPP $CPPFLAGS'
47556 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47557 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47558 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47559 
47560   CXXFLAGS="$saved_cxxflags"
47561 
47562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47563 $as_echo "$supports" >&6; }
47564   if test "x$supports" = "xyes" ; then
47565     :
47566     CXX_COMP_SUPPORTS="yes"
47567   else
47568     :
47569     CXX_COMP_SUPPORTS="no"
47570   fi
47571 
47572 
47573 
47574 
47575 
47576 
47577 
47578 
47579 
47580 
47581 
47582 
47583 
47584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47585 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47586   supports=no
47587   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47588 
47589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47590 $as_echo "$supports" >&6; }
47591   if test "x$supports" = "xyes" ; then
47592     :
47593     HAS_CFLAG_OPTIMIZE_DEBUG=true
47594   else
47595     :
47596     HAS_CFLAG_OPTIMIZE_DEBUG=false
47597   fi
47598 
47599 
47600 
47601 
47602 
47603 
47604 
47605     # "-z relro" supported in GNU binutils 2.17 and later
47606     LINKER_RELRO_FLAG="-Wl,-z,relro"
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 
47640 
47641 
47642 
47643 
47644 
47645 
47646 
47647 
47648 
47649 
47650 
47651 
47652 
47653 
47654     # Execute function body
47655 
47656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47657 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47658   supports=yes
47659 
47660   saved_ldflags="$LDFLAGS"
47661   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47662   ac_ext=c
47663 ac_cpp='$CPP $CPPFLAGS'
47664 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47665 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47666 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47667 
47668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47669 /* end confdefs.h.  */
47670 
47671 int
47672 main ()
47673 {
47674 
47675   ;
47676   return 0;
47677 }
47678 _ACEOF
47679 if ac_fn_c_try_link "$LINENO"; then :
47680 
47681 else
47682   supports=no
47683 fi
47684 rm -f core conftest.err conftest.$ac_objext \
47685     conftest$ac_exeext conftest.$ac_ext
47686   ac_ext=cpp
47687 ac_cpp='$CXXCPP $CPPFLAGS'
47688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47691 
47692   LDFLAGS="$saved_ldflags"
47693 
47694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47695 $as_echo "$supports" >&6; }
47696   if test "x$supports" = "xyes" ; then
47697     :
47698     HAS_LINKER_RELRO=true
47699   else
47700     :
47701     HAS_LINKER_RELRO=false
47702   fi
47703 
47704 
47705 
47706 
47707 
47708 
47709 
47710 
47711 
47712 
47713 
47714 
47715 
47716     # "-z now" supported in GNU binutils 2.11 and later
47717     LINKER_NOW_FLAG="-Wl,-z,now"
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 
47764 
47765     # Execute function body
47766 
47767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47768 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47769   supports=yes
47770 
47771   saved_ldflags="$LDFLAGS"
47772   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47773   ac_ext=c
47774 ac_cpp='$CPP $CPPFLAGS'
47775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47778 
47779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47780 /* end confdefs.h.  */
47781 
47782 int
47783 main ()
47784 {
47785 
47786   ;
47787   return 0;
47788 }
47789 _ACEOF
47790 if ac_fn_c_try_link "$LINENO"; then :
47791 
47792 else
47793   supports=no
47794 fi
47795 rm -f core conftest.err conftest.$ac_objext \
47796     conftest$ac_exeext conftest.$ac_ext
47797   ac_ext=cpp
47798 ac_cpp='$CXXCPP $CPPFLAGS'
47799 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47800 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47801 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47802 
47803   LDFLAGS="$saved_ldflags"
47804 
47805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47806 $as_echo "$supports" >&6; }
47807   if test "x$supports" = "xyes" ; then
47808     :
47809     HAS_LINKER_NOW=true
47810   else
47811     :
47812     HAS_LINKER_NOW=false
47813   fi
47814 
47815 
47816 
47817 
47818 
47819 
47820 
47821 
47822 
47823 
47824 
47825 
47826   fi
47827 
47828   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47829   # in executable.'
47830   USING_BROKEN_SUSE_LD=no
47831   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47833 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47834     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47835     $ECHO "int main() { }" > main.c
47836     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47838 $as_echo "no" >&6; }
47839       USING_BROKEN_SUSE_LD=no
47840     else
47841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47842 $as_echo "yes" >&6; }
47843       USING_BROKEN_SUSE_LD=yes
47844     fi
47845     $RM version-script.map main.c a.out
47846   fi
47847 
47848 
47849   # Setup hotspot lecagy names for toolchains
47850   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47851   if test "x$TOOLCHAIN_TYPE" = xclang; then
47852     HOTSPOT_TOOLCHAIN_TYPE=gcc
47853   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47854     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47855   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47856     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47857   fi
47858 
47859 
47860 
47861 # Setup the JTReg Regression Test Harness.
47862 
47863 
47864 # Check whether --with-jtreg was given.
47865 if test "${with_jtreg+set}" = set; then :
47866   withval=$with_jtreg;
47867 else
47868   with_jtreg=no
47869 fi
47870 
47871 
47872   if test "x$with_jtreg" = xno; then
47873     # jtreg disabled
47874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47875 $as_echo_n "checking for jtreg... " >&6; }
47876     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47877 $as_echo "no" >&6; }
47878   else
47879     if test "x$with_jtreg" != xyes; then
47880       # with path specified.
47881       JT_HOME="$with_jtreg"
47882     fi
47883 
47884     if test "x$JT_HOME" != x; then
47885       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47886 $as_echo_n "checking for jtreg... " >&6; }
47887 
47888       # use JT_HOME enviroment var.
47889 
47890   # Only process if variable expands to non-empty
47891 
47892   if test "x$JT_HOME" != x; then
47893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47894 
47895   # Input might be given as Windows format, start by converting to
47896   # unix format.
47897   path="$JT_HOME"
47898   new_path=`$CYGPATH -u "$path"`
47899 
47900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47903   # "foo.exe" is OK but "foo" is an error.
47904   #
47905   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47906   # It is also a way to make sure we got the proper file name for the real test later on.
47907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47908   if test "x$test_shortpath" = x; then
47909     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47910 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47911     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47912   fi
47913 
47914   # Call helper function which possibly converts this using DOS-style short mode.
47915   # If so, the updated path is stored in $new_path.
47916 
47917   input_path="$new_path"
47918   # Check if we need to convert this using DOS-style short mode. If the path
47919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47920   # take no chances and rewrite it.
47921   # Note: m4 eats our [], so we need to use [ and ] instead.
47922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47923   if test "x$has_forbidden_chars" != x; then
47924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47928       # Going to short mode and back again did indeed matter. Since short mode is
47929       # case insensitive, let's make it lowercase to improve readability.
47930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47931       # Now convert it back to Unix-style (cygpath)
47932       input_path=`$CYGPATH -u "$shortmode_path"`
47933       new_path="$input_path"
47934     fi
47935   fi
47936 
47937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47938   if test "x$test_cygdrive_prefix" = x; then
47939     # As a simple fix, exclude /usr/bin since it's not a real path.
47940     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47942       # a path prefixed by /cygdrive for fixpath to work.
47943       new_path="$CYGWIN_ROOT_PATH$input_path"
47944     fi
47945   fi
47946 
47947 
47948   if test "x$path" != "x$new_path"; then
47949     JT_HOME="$new_path"
47950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47951 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47952   fi
47953 
47954     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955 
47956   path="$JT_HOME"
47957   has_colon=`$ECHO $path | $GREP ^.:`
47958   new_path="$path"
47959   if test "x$has_colon" = x; then
47960     # Not in mixed or Windows style, start by that.
47961     new_path=`cmd //c echo $path`
47962   fi
47963 
47964 
47965   input_path="$new_path"
47966   # Check if we need to convert this using DOS-style short mode. If the path
47967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47968   # take no chances and rewrite it.
47969   # Note: m4 eats our [], so we need to use [ and ] instead.
47970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47971   if test "x$has_forbidden_chars" != x; then
47972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47974   fi
47975 
47976 
47977   windows_path="$new_path"
47978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47979     unix_path=`$CYGPATH -u "$windows_path"`
47980     new_path="$unix_path"
47981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47983     new_path="$unix_path"
47984   fi
47985 
47986   if test "x$path" != "x$new_path"; then
47987     JT_HOME="$new_path"
47988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47989 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47990   fi
47991 
47992   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47993   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47994 
47995     else
47996       # We're on a unix platform. Hooray! :)
47997       path="$JT_HOME"
47998       has_space=`$ECHO "$path" | $GREP " "`
47999       if test "x$has_space" != x; then
48000         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48001 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48002         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48003       fi
48004 
48005       # Use eval to expand a potential ~
48006       eval path="$path"
48007       if test ! -f "$path" && test ! -d "$path"; then
48008         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48009       fi
48010 
48011       if test -d "$path"; then
48012         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48013       else
48014         dir="`$DIRNAME "$path"`"
48015         base="`$BASENAME "$path"`"
48016         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48017       fi
48018     fi
48019   fi
48020 
48021 
48022       # jtreg win32 script works for everybody
48023       JTREGEXE="$JT_HOME/bin/jtreg"
48024 
48025       if test ! -f "$JTREGEXE"; then
48026         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48027       fi
48028 
48029       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48030 $as_echo "$JTREGEXE" >&6; }
48031     else
48032       # try to find jtreg on path
48033 
48034 
48035 
48036   # Publish this variable in the help.
48037 
48038 
48039   if [ -z "${JTREGEXE+x}" ]; then
48040     # The variable is not set by user, try to locate tool using the code snippet
48041     for ac_prog in jtreg
48042 do
48043   # Extract the first word of "$ac_prog", so it can be a program name with args.
48044 set dummy $ac_prog; ac_word=$2
48045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48046 $as_echo_n "checking for $ac_word... " >&6; }
48047 if ${ac_cv_path_JTREGEXE+:} false; then :
48048   $as_echo_n "(cached) " >&6
48049 else
48050   case $JTREGEXE in
48051   [\\/]* | ?:[\\/]*)
48052   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48053   ;;
48054   *)
48055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48056 for as_dir in $PATH
48057 do
48058   IFS=$as_save_IFS
48059   test -z "$as_dir" && as_dir=.
48060     for ac_exec_ext in '' $ac_executable_extensions; do
48061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48062     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48064     break 2
48065   fi
48066 done
48067   done
48068 IFS=$as_save_IFS
48069 
48070   ;;
48071 esac
48072 fi
48073 JTREGEXE=$ac_cv_path_JTREGEXE
48074 if test -n "$JTREGEXE"; then
48075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48076 $as_echo "$JTREGEXE" >&6; }
48077 else
48078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48079 $as_echo "no" >&6; }
48080 fi
48081 
48082 
48083   test -n "$JTREGEXE" && break
48084 done
48085 
48086   else
48087     # The variable is set, but is it from the command line or the environment?
48088 
48089     # Try to remove the string !JTREGEXE! from our list.
48090     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48091     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48092       # If it failed, the variable was not from the command line. Ignore it,
48093       # but warn the user (except for BASH, which is always set by the calling BASH).
48094       if test "xJTREGEXE" != xBASH; then
48095         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48096 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48097       fi
48098       # Try to locate tool using the code snippet
48099       for ac_prog in jtreg
48100 do
48101   # Extract the first word of "$ac_prog", so it can be a program name with args.
48102 set dummy $ac_prog; ac_word=$2
48103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48104 $as_echo_n "checking for $ac_word... " >&6; }
48105 if ${ac_cv_path_JTREGEXE+:} false; then :
48106   $as_echo_n "(cached) " >&6
48107 else
48108   case $JTREGEXE in
48109   [\\/]* | ?:[\\/]*)
48110   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48111   ;;
48112   *)
48113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48114 for as_dir in $PATH
48115 do
48116   IFS=$as_save_IFS
48117   test -z "$as_dir" && as_dir=.
48118     for ac_exec_ext in '' $ac_executable_extensions; do
48119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48120     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48122     break 2
48123   fi
48124 done
48125   done
48126 IFS=$as_save_IFS
48127 
48128   ;;
48129 esac
48130 fi
48131 JTREGEXE=$ac_cv_path_JTREGEXE
48132 if test -n "$JTREGEXE"; then
48133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48134 $as_echo "$JTREGEXE" >&6; }
48135 else
48136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48137 $as_echo "no" >&6; }
48138 fi
48139 
48140 
48141   test -n "$JTREGEXE" && break
48142 done
48143 
48144     else
48145       # If it succeeded, then it was overridden by the user. We will use it
48146       # for the tool.
48147 
48148       # First remove it from the list of overridden variables, so we can test
48149       # for unknown variables in the end.
48150       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48151 
48152       # Check if we try to supply an empty value
48153       if test "x$JTREGEXE" = x; then
48154         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48155 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48157 $as_echo_n "checking for JTREGEXE... " >&6; }
48158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48159 $as_echo "disabled" >&6; }
48160       else
48161         # Check if the provided tool contains a complete path.
48162         tool_specified="$JTREGEXE"
48163         tool_basename="${tool_specified##*/}"
48164         if test "x$tool_basename" = "x$tool_specified"; then
48165           # A command without a complete path is provided, search $PATH.
48166           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48167 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48168           # Extract the first word of "$tool_basename", so it can be a program name with args.
48169 set dummy $tool_basename; ac_word=$2
48170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48171 $as_echo_n "checking for $ac_word... " >&6; }
48172 if ${ac_cv_path_JTREGEXE+:} false; then :
48173   $as_echo_n "(cached) " >&6
48174 else
48175   case $JTREGEXE in
48176   [\\/]* | ?:[\\/]*)
48177   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48178   ;;
48179   *)
48180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48181 for as_dir in $PATH
48182 do
48183   IFS=$as_save_IFS
48184   test -z "$as_dir" && as_dir=.
48185     for ac_exec_ext in '' $ac_executable_extensions; do
48186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48187     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48189     break 2
48190   fi
48191 done
48192   done
48193 IFS=$as_save_IFS
48194 
48195   ;;
48196 esac
48197 fi
48198 JTREGEXE=$ac_cv_path_JTREGEXE
48199 if test -n "$JTREGEXE"; then
48200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48201 $as_echo "$JTREGEXE" >&6; }
48202 else
48203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48204 $as_echo "no" >&6; }
48205 fi
48206 
48207 
48208           if test "x$JTREGEXE" = x; then
48209             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48210           fi
48211         else
48212           # Otherwise we believe it is a complete path. Use it as it is.
48213           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48214 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48215           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48216 $as_echo_n "checking for JTREGEXE... " >&6; }
48217           if test ! -x "$tool_specified"; then
48218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48219 $as_echo "not found" >&6; }
48220             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48221           fi
48222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48223 $as_echo "$tool_specified" >&6; }
48224         fi
48225       fi
48226     fi
48227 
48228   fi
48229 
48230 
48231 
48232   if test "x$JTREGEXE" = x; then
48233     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48234   fi
48235 
48236 
48237       JT_HOME="`$DIRNAME $JTREGEXE`"
48238     fi
48239   fi
48240 
48241 
48242 
48243 
48244 
48245 
48246   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48247   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48248   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48249   #                              commands produced by the link step (currently AIX only)
48250   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48251     COMPILER_TARGET_BITS_FLAG="-q"
48252     COMPILER_COMMAND_FILE_FLAG="-f"
48253     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48254   else
48255     COMPILER_TARGET_BITS_FLAG="-m"
48256     COMPILER_COMMAND_FILE_FLAG="@"
48257     COMPILER_BINDCMD_FILE_FLAG=""
48258 
48259     # The solstudio linker does not support @-files.
48260     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48261       COMPILER_COMMAND_FILE_FLAG=
48262     fi
48263 
48264     # Check if @file is supported by gcc
48265     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48266       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48267 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48268       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48269       $ECHO "" "--version" > command.file
48270       if $CXX @command.file 2>&5 >&5; then
48271         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48272 $as_echo "yes" >&6; }
48273         COMPILER_COMMAND_FILE_FLAG="@"
48274       else
48275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48276 $as_echo "no" >&6; }
48277         COMPILER_COMMAND_FILE_FLAG=
48278       fi
48279       $RM command.file
48280     fi
48281   fi
48282 
48283 
48284 
48285 
48286   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48287   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48288     ARFLAGS="-r"
48289   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48290     ARFLAGS="-X64"
48291   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48292     # lib.exe is used as AR to create static libraries.
48293     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48294   else
48295     ARFLAGS=""
48296   fi
48297 
48298 
48299   ## Setup strip.
48300   # FIXME: should this really be per platform, or should it be per toolchain type?
48301   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48302   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48303   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48304     STRIPFLAGS="-g"
48305   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48306     STRIPFLAGS="-x"
48307   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48308     STRIPFLAGS="-S"
48309   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48310     STRIPFLAGS="-X32_64"
48311   fi
48312 
48313 
48314 
48315   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48316     CC_OUT_OPTION=-Fo
48317     EXE_OUT_OPTION=-out:
48318     LD_OUT_OPTION=-out:
48319     AR_OUT_OPTION=-out:
48320   else
48321     # The option used to specify the target .o,.a or .so file.
48322     # When compiling, how to specify the to be created object file.
48323     CC_OUT_OPTION='-o$(SPACE)'
48324     # When linking, how to specify the to be created executable.
48325     EXE_OUT_OPTION='-o$(SPACE)'
48326     # When linking, how to specify the to be created dynamically linkable library.
48327     LD_OUT_OPTION='-o$(SPACE)'
48328     # When archiving, how to specify the to be create static archive for object files.
48329     AR_OUT_OPTION='rcs$(SPACE)'
48330   fi
48331 
48332 
48333 
48334 
48335 
48336   # On Windows, we need to set RC flags.
48337   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48338     RC_FLAGS="-nologo -l0x409"
48339     JVM_RCFLAGS="-nologo"
48340     if test "x$DEBUG_LEVEL" = xrelease; then
48341       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48342       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48343     fi
48344 
48345     # The version variables used to create RC_FLAGS may be overridden
48346     # in a custom configure script, or possibly the command line.
48347     # Let those variables be expanded at make time in spec.gmk.
48348     # The \$ are escaped to the shell, and the $(...) variables
48349     # are evaluated by make.
48350     RC_FLAGS="$RC_FLAGS \
48351         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48352         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48353         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48354         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48355         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48356         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48357         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48358 
48359     JVM_RCFLAGS="$JVM_RCFLAGS \
48360         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48361         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48362         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48363         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48364         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48365         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48366         -D\"HS_FNAME=jvm.dll\" \
48367         -D\"HS_INTERNAL_NAME=jvm\""
48368   fi
48369 
48370 
48371 
48372   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48373     # silence copyright notice and other headers.
48374     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48375   fi
48376 
48377 
48378 # Now we can test some aspects on the target using configure macros.
48379 
48380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48381 $as_echo_n "checking for ANSI C header files... " >&6; }
48382 if ${ac_cv_header_stdc+:} false; then :
48383   $as_echo_n "(cached) " >&6
48384 else
48385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48386 /* end confdefs.h.  */
48387 #include <stdlib.h>
48388 #include <stdarg.h>
48389 #include <string.h>
48390 #include <float.h>
48391 
48392 int
48393 main ()
48394 {
48395 
48396   ;
48397   return 0;
48398 }
48399 _ACEOF
48400 if ac_fn_cxx_try_compile "$LINENO"; then :
48401   ac_cv_header_stdc=yes
48402 else
48403   ac_cv_header_stdc=no
48404 fi
48405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48406 
48407 if test $ac_cv_header_stdc = yes; then
48408   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410 /* end confdefs.h.  */
48411 #include <string.h>
48412 
48413 _ACEOF
48414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48415   $EGREP "memchr" >/dev/null 2>&1; then :
48416 
48417 else
48418   ac_cv_header_stdc=no
48419 fi
48420 rm -f conftest*
48421 
48422 fi
48423 
48424 if test $ac_cv_header_stdc = yes; then
48425   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48427 /* end confdefs.h.  */
48428 #include <stdlib.h>
48429 
48430 _ACEOF
48431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48432   $EGREP "free" >/dev/null 2>&1; then :
48433 
48434 else
48435   ac_cv_header_stdc=no
48436 fi
48437 rm -f conftest*
48438 
48439 fi
48440 
48441 if test $ac_cv_header_stdc = yes; then
48442   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48443   if test "$cross_compiling" = yes; then :
48444   :
48445 else
48446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447 /* end confdefs.h.  */
48448 #include <ctype.h>
48449 #include <stdlib.h>
48450 #if ((' ' & 0x0FF) == 0x020)
48451 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48452 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48453 #else
48454 # define ISLOWER(c) \
48455                    (('a' <= (c) && (c) <= 'i') \
48456                      || ('j' <= (c) && (c) <= 'r') \
48457                      || ('s' <= (c) && (c) <= 'z'))
48458 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48459 #endif
48460 
48461 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48462 int
48463 main ()
48464 {
48465   int i;
48466   for (i = 0; i < 256; i++)
48467     if (XOR (islower (i), ISLOWER (i))
48468         || toupper (i) != TOUPPER (i))
48469       return 2;
48470   return 0;
48471 }
48472 _ACEOF
48473 if ac_fn_cxx_try_run "$LINENO"; then :
48474 
48475 else
48476   ac_cv_header_stdc=no
48477 fi
48478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48479   conftest.$ac_objext conftest.beam conftest.$ac_ext
48480 fi
48481 
48482 fi
48483 fi
48484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48485 $as_echo "$ac_cv_header_stdc" >&6; }
48486 if test $ac_cv_header_stdc = yes; then
48487 
48488 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48489 
48490 fi
48491 
48492 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48493 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48494                   inttypes.h stdint.h unistd.h
48495 do :
48496   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48497 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48498 "
48499 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48500   cat >>confdefs.h <<_ACEOF
48501 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48502 _ACEOF
48503 
48504 fi
48505 
48506 done
48507 
48508 
48509 
48510   ###############################################################################
48511   #
48512   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48513   # (The JVM can use 32 or 64 bit Java pointers but that decision
48514   # is made at runtime.)
48515   #
48516 
48517   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48518     # Always specify -m flag on Solaris
48519     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48520 
48521   # When we add flags to the "official" CFLAGS etc, we need to
48522   # keep track of these additions in ADDED_CFLAGS etc. These
48523   # will later be checked to make sure only controlled additions
48524   # have been made to CFLAGS etc.
48525   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48526   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48527   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48528 
48529   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48530   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48531   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48532 
48533   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48534   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48535   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48536 
48537   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48538   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48539   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48540 
48541   elif test "x$COMPILE_TYPE" = xreduced; then
48542     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48543       # Specify -m if running reduced on unix platforms
48544 
48545   # When we add flags to the "official" CFLAGS etc, we need to
48546   # keep track of these additions in ADDED_CFLAGS etc. These
48547   # will later be checked to make sure only controlled additions
48548   # have been made to CFLAGS etc.
48549   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552 
48553   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48554   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48555   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48556 
48557   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48558   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48559   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48560 
48561   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48562   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48563   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48564 
48565     fi
48566   fi
48567   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48568     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571   fi
48572 
48573   # Make compilation sanity check
48574   for ac_header in stdio.h
48575 do :
48576   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48577 if test "x$ac_cv_header_stdio_h" = xyes; then :
48578   cat >>confdefs.h <<_ACEOF
48579 #define HAVE_STDIO_H 1
48580 _ACEOF
48581 
48582 else
48583 
48584     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48585 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48586     if test "x$COMPILE_TYPE" = xreduced; then
48587 
48588   # Print a helpful message on how to acquire the necessary build dependency.
48589   # reduced is the help tag: freetype, cups, alsa etc
48590   MISSING_DEPENDENCY=reduced
48591 
48592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48593     cygwin_help $MISSING_DEPENDENCY
48594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48595     msys_help $MISSING_DEPENDENCY
48596   else
48597     PKGHANDLER_COMMAND=
48598 
48599     case $PKGHANDLER in
48600       apt-get)
48601         apt_help     $MISSING_DEPENDENCY ;;
48602       yum)
48603         yum_help     $MISSING_DEPENDENCY ;;
48604       port)
48605         port_help    $MISSING_DEPENDENCY ;;
48606       pkgutil)
48607         pkgutil_help $MISSING_DEPENDENCY ;;
48608       pkgadd)
48609         pkgadd_help  $MISSING_DEPENDENCY ;;
48610     esac
48611 
48612     if test "x$PKGHANDLER_COMMAND" != x; then
48613       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48614     fi
48615   fi
48616 
48617       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48618 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48619     elif test "x$COMPILE_TYPE" = xcross; then
48620       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48621 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48622     fi
48623     as_fn_error $? "Cannot continue." "$LINENO" 5
48624 
48625 fi
48626 
48627 done
48628 
48629 
48630   # The cast to long int works around a bug in the HP C Compiler
48631 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48632 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48633 # This bug is HP SR number 8606223364.
48634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48635 $as_echo_n "checking size of int *... " >&6; }
48636 if ${ac_cv_sizeof_int_p+:} false; then :
48637   $as_echo_n "(cached) " >&6
48638 else
48639   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48640 
48641 else
48642   if test "$ac_cv_type_int_p" = yes; then
48643      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48644 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48645 as_fn_error 77 "cannot compute sizeof (int *)
48646 See \`config.log' for more details" "$LINENO" 5; }
48647    else
48648      ac_cv_sizeof_int_p=0
48649    fi
48650 fi
48651 
48652 fi
48653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48654 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48655 
48656 
48657 
48658 cat >>confdefs.h <<_ACEOF
48659 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48660 _ACEOF
48661 
48662 
48663 
48664   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48665   if test "x$ac_cv_sizeof_int_p" = x; then
48666     # The test failed, lets stick to the assumed value.
48667     { $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
48668 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48669   else
48670     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48671 
48672     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48673       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48674       # Let's try to implicitely set the compilers target architecture and retry the test
48675       { $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
48676 $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;}
48677       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48678 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48679 
48680   # When we add flags to the "official" CFLAGS etc, we need to
48681   # keep track of these additions in ADDED_CFLAGS etc. These
48682   # will later be checked to make sure only controlled additions
48683   # have been made to CFLAGS etc.
48684   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48685   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48686   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48687 
48688   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48689   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48690   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48691 
48692   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48693   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48694   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48695 
48696   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48697   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48698   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48699 
48700 
48701       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48702       unset ac_cv_sizeof_int_p
48703       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48704       cat >>confdefs.h <<_ACEOF
48705 #undef SIZEOF_INT_P
48706 _ACEOF
48707 
48708       # The cast to long int works around a bug in the HP C Compiler
48709 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48710 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48711 # This bug is HP SR number 8606223364.
48712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48713 $as_echo_n "checking size of int *... " >&6; }
48714 if ${ac_cv_sizeof_int_p+:} false; then :
48715   $as_echo_n "(cached) " >&6
48716 else
48717   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48718 
48719 else
48720   if test "$ac_cv_type_int_p" = yes; then
48721      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48722 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48723 as_fn_error 77 "cannot compute sizeof (int *)
48724 See \`config.log' for more details" "$LINENO" 5; }
48725    else
48726      ac_cv_sizeof_int_p=0
48727    fi
48728 fi
48729 
48730 fi
48731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48732 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48733 
48734 
48735 
48736 cat >>confdefs.h <<_ACEOF
48737 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48738 _ACEOF
48739 
48740 
48741 
48742       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48743 
48744       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48745         { $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
48746 $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;}
48747         if test "x$COMPILE_TYPE" = xreduced; then
48748 
48749   # Print a helpful message on how to acquire the necessary build dependency.
48750   # reduced is the help tag: freetype, cups, alsa etc
48751   MISSING_DEPENDENCY=reduced
48752 
48753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48754     cygwin_help $MISSING_DEPENDENCY
48755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48756     msys_help $MISSING_DEPENDENCY
48757   else
48758     PKGHANDLER_COMMAND=
48759 
48760     case $PKGHANDLER in
48761       apt-get)
48762         apt_help     $MISSING_DEPENDENCY ;;
48763       yum)
48764         yum_help     $MISSING_DEPENDENCY ;;
48765       port)
48766         port_help    $MISSING_DEPENDENCY ;;
48767       pkgutil)
48768         pkgutil_help $MISSING_DEPENDENCY ;;
48769       pkgadd)
48770         pkgadd_help  $MISSING_DEPENDENCY ;;
48771     esac
48772 
48773     if test "x$PKGHANDLER_COMMAND" != x; then
48774       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48775     fi
48776   fi
48777 
48778           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48779 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48780         elif test "x$COMPILE_TYPE" = xcross; then
48781           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48782 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48783         fi
48784         as_fn_error $? "Cannot continue." "$LINENO" 5
48785       fi
48786     fi
48787   fi
48788 
48789   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48790 $as_echo_n "checking for target address size... " >&6; }
48791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48792 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48793 
48794 
48795   ###############################################################################
48796   #
48797   # Is the target little of big endian?
48798   #
48799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48800 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48801 if ${ac_cv_c_bigendian+:} false; then :
48802   $as_echo_n "(cached) " >&6
48803 else
48804   ac_cv_c_bigendian=unknown
48805     # See if we're dealing with a universal compiler.
48806     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48807 /* end confdefs.h.  */
48808 #ifndef __APPLE_CC__
48809                not a universal capable compiler
48810              #endif
48811              typedef int dummy;
48812 
48813 _ACEOF
48814 if ac_fn_cxx_try_compile "$LINENO"; then :
48815 
48816         # Check for potential -arch flags.  It is not universal unless
48817         # there are at least two -arch flags with different values.
48818         ac_arch=
48819         ac_prev=
48820         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48821          if test -n "$ac_prev"; then
48822            case $ac_word in
48823              i?86 | x86_64 | ppc | ppc64)
48824                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48825                  ac_arch=$ac_word
48826                else
48827                  ac_cv_c_bigendian=universal
48828                  break
48829                fi
48830                ;;
48831            esac
48832            ac_prev=
48833          elif test "x$ac_word" = "x-arch"; then
48834            ac_prev=arch
48835          fi
48836        done
48837 fi
48838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48839     if test $ac_cv_c_bigendian = unknown; then
48840       # See if sys/param.h defines the BYTE_ORDER macro.
48841       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48842 /* end confdefs.h.  */
48843 #include <sys/types.h>
48844              #include <sys/param.h>
48845 
48846 int
48847 main ()
48848 {
48849 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48850                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48851                      && LITTLE_ENDIAN)
48852               bogus endian macros
48853              #endif
48854 
48855   ;
48856   return 0;
48857 }
48858 _ACEOF
48859 if ac_fn_cxx_try_compile "$LINENO"; then :
48860   # It does; now see whether it defined to BIG_ENDIAN or not.
48861          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48862 /* end confdefs.h.  */
48863 #include <sys/types.h>
48864                 #include <sys/param.h>
48865 
48866 int
48867 main ()
48868 {
48869 #if BYTE_ORDER != BIG_ENDIAN
48870                  not big endian
48871                 #endif
48872 
48873   ;
48874   return 0;
48875 }
48876 _ACEOF
48877 if ac_fn_cxx_try_compile "$LINENO"; then :
48878   ac_cv_c_bigendian=yes
48879 else
48880   ac_cv_c_bigendian=no
48881 fi
48882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48883 fi
48884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48885     fi
48886     if test $ac_cv_c_bigendian = unknown; then
48887       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48888       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48889 /* end confdefs.h.  */
48890 #include <limits.h>
48891 
48892 int
48893 main ()
48894 {
48895 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48896               bogus endian macros
48897              #endif
48898 
48899   ;
48900   return 0;
48901 }
48902 _ACEOF
48903 if ac_fn_cxx_try_compile "$LINENO"; then :
48904   # It does; now see whether it defined to _BIG_ENDIAN or not.
48905          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48906 /* end confdefs.h.  */
48907 #include <limits.h>
48908 
48909 int
48910 main ()
48911 {
48912 #ifndef _BIG_ENDIAN
48913                  not big endian
48914                 #endif
48915 
48916   ;
48917   return 0;
48918 }
48919 _ACEOF
48920 if ac_fn_cxx_try_compile "$LINENO"; then :
48921   ac_cv_c_bigendian=yes
48922 else
48923   ac_cv_c_bigendian=no
48924 fi
48925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48926 fi
48927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48928     fi
48929     if test $ac_cv_c_bigendian = unknown; then
48930       # Compile a test program.
48931       if test "$cross_compiling" = yes; then :
48932   # Try to guess by grepping values from an object file.
48933          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48934 /* end confdefs.h.  */
48935 short int ascii_mm[] =
48936                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48937                 short int ascii_ii[] =
48938                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48939                 int use_ascii (int i) {
48940                   return ascii_mm[i] + ascii_ii[i];
48941                 }
48942                 short int ebcdic_ii[] =
48943                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48944                 short int ebcdic_mm[] =
48945                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48946                 int use_ebcdic (int i) {
48947                   return ebcdic_mm[i] + ebcdic_ii[i];
48948                 }
48949                 extern int foo;
48950 
48951 int
48952 main ()
48953 {
48954 return use_ascii (foo) == use_ebcdic (foo);
48955   ;
48956   return 0;
48957 }
48958 _ACEOF
48959 if ac_fn_cxx_try_compile "$LINENO"; then :
48960   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48961               ac_cv_c_bigendian=yes
48962             fi
48963             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48964               if test "$ac_cv_c_bigendian" = unknown; then
48965                 ac_cv_c_bigendian=no
48966               else
48967                 # finding both strings is unlikely to happen, but who knows?
48968                 ac_cv_c_bigendian=unknown
48969               fi
48970             fi
48971 fi
48972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48973 else
48974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48975 /* end confdefs.h.  */
48976 $ac_includes_default
48977 int
48978 main ()
48979 {
48980 
48981              /* Are we little or big endian?  From Harbison&Steele.  */
48982              union
48983              {
48984                long int l;
48985                char c[sizeof (long int)];
48986              } u;
48987              u.l = 1;
48988              return u.c[sizeof (long int) - 1] == 1;
48989 
48990   ;
48991   return 0;
48992 }
48993 _ACEOF
48994 if ac_fn_cxx_try_run "$LINENO"; then :
48995   ac_cv_c_bigendian=no
48996 else
48997   ac_cv_c_bigendian=yes
48998 fi
48999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49000   conftest.$ac_objext conftest.beam conftest.$ac_ext
49001 fi
49002 
49003     fi
49004 fi
49005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49006 $as_echo "$ac_cv_c_bigendian" >&6; }
49007  case $ac_cv_c_bigendian in #(
49008    yes)
49009      ENDIAN="big";; #(
49010    no)
49011      ENDIAN="little" ;; #(
49012    universal)
49013      ENDIAN="universal_endianness"
49014      ;; #(
49015    *)
49016      ENDIAN="unknown" ;;
49017  esac
49018 
49019 
49020   if test "x$ENDIAN" = xuniversal_endianness; then
49021     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49022   fi
49023   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49024     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
49025   fi
49026 
49027 
49028 # Configure flags for the tools
49029 
49030   ###############################################################################
49031   #
49032   # How to compile shared libraries.
49033   #
49034 
49035   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49036     PICFLAG="-fPIC"
49037     C_FLAG_REORDER=''
49038     CXX_FLAG_REORDER=''
49039 
49040     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49041       # Linking is different on MacOSX
49042       if test "x$STATIC_BUILD" = xtrue; then
49043         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49044       else
49045         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49046         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49047       fi
49048       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49049       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49050       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49051       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49052     else
49053       # Default works for linux, might work on other platforms as well.
49054       SHARED_LIBRARY_FLAGS='-shared'
49055       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49056       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49057       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49058       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49059     fi
49060   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49061     C_FLAG_REORDER=''
49062     CXX_FLAG_REORDER=''
49063 
49064     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49065       # Linking is different on MacOSX
49066       PICFLAG=''
49067       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49068       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49069       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49070       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49071       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49072 
49073       if test "x$STATIC_BUILD" = xfalse; then
49074         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49075       fi
49076     else
49077       # Default works for linux, might work on other platforms as well.
49078       PICFLAG='-fPIC'
49079       SHARED_LIBRARY_FLAGS='-shared'
49080       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49081       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49082       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49083 
49084       # arm specific settings
49085       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49086         # '-Wl,-z,origin' isn't used on arm.
49087         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49088       else
49089         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49090       fi
49091 
49092     fi
49093   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49094     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49095       PICFLAG="-xcode=pic32"
49096     else
49097       PICFLAG="-KPIC"
49098     fi
49099     C_FLAG_REORDER='-xF'
49100     CXX_FLAG_REORDER='-xF'
49101     SHARED_LIBRARY_FLAGS="-G"
49102     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49103     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49104     SET_SHARED_LIBRARY_NAME='-h $1'
49105     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49106   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49107     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49108     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49109     # will have to patch this single instruction with a call to some out-of-order code which
49110     # does the load from the TOC. This is of course slow. But in that case we also would have
49111     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49112     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49113     # can be patched directly by the linker and does not require a jump to out-of-order code.
49114     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49115     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49116     # loads for accessing a global variable). But there are rumors that this may be seen as a
49117     # 'performance feature' because of improved code locality of the symbols used in a
49118     # compilation unit.
49119     PICFLAG="-qpic"
49120     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49121     C_FLAG_REORDER=''
49122     CXX_FLAG_REORDER=''
49123     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49124     SET_EXECUTABLE_ORIGIN=""
49125     SET_SHARED_LIBRARY_ORIGIN=''
49126     SET_SHARED_LIBRARY_NAME=''
49127     SET_SHARED_LIBRARY_MAPFILE=''
49128   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49129     PICFLAG=""
49130     C_FLAG_REORDER=''
49131     CXX_FLAG_REORDER=''
49132     SHARED_LIBRARY_FLAGS="-dll"
49133     SET_EXECUTABLE_ORIGIN=''
49134     SET_SHARED_LIBRARY_ORIGIN=''
49135     SET_SHARED_LIBRARY_NAME=''
49136     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49137   fi
49138 
49139 
49140 
49141 
49142 
49143 
49144 
49145 
49146 
49147   # The (cross) compiler is now configured, we can now test capabilities
49148   # of the target platform.
49149 
49150 
49151 
49152   ###############################################################################
49153   #
49154   # Setup the opt flags for different compilers
49155   # and different operating systems.
49156   #
49157 
49158   # FIXME: this was indirectly the old default, but just inherited.
49159   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49160   #   C_FLAG_DEPS="-MMD -MF"
49161   # fi
49162 
49163   # Generate make dependency files
49164   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49165     C_FLAG_DEPS="-MMD -MF"
49166   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49167     C_FLAG_DEPS="-MMD -MF"
49168   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49169     C_FLAG_DEPS="-xMMD -xMF"
49170   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49171     C_FLAG_DEPS="-qmakedep=gcc -MF"
49172   fi
49173   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49174 
49175 
49176 
49177   # Debug symbols
49178   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49179     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49180       # reduce from default "-g2" option to save space
49181       CFLAGS_DEBUG_SYMBOLS="-g1"
49182       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49183     else
49184       CFLAGS_DEBUG_SYMBOLS="-g"
49185       CXXFLAGS_DEBUG_SYMBOLS="-g"
49186     fi
49187   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49188     CFLAGS_DEBUG_SYMBOLS="-g"
49189     CXXFLAGS_DEBUG_SYMBOLS="-g"
49190   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49191     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49192     # -g0 enables debug symbols without disabling inlining.
49193     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49194   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49195     CFLAGS_DEBUG_SYMBOLS="-g"
49196     CXXFLAGS_DEBUG_SYMBOLS="-g"
49197   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49198     CFLAGS_DEBUG_SYMBOLS="-Zi"
49199     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49200   fi
49201 
49202 
49203 
49204   # Debug symbols for JVM_CFLAGS
49205   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49206     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49207     if test "x$DEBUG_LEVEL" = xslowdebug; then
49208       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49209     else
49210       # -g0 does not disable inlining, which -g does.
49211       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49212     fi
49213   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49214     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49215   else
49216     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49217   fi
49218 
49219 
49220   # bounds, memory and behavior checking options
49221   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49222     case $DEBUG_LEVEL in
49223     release )
49224       # no adjustment
49225       ;;
49226     fastdebug )
49227       # no adjustment
49228       ;;
49229     slowdebug )
49230       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49231       # get's added conditionally on whether we produce debug symbols or not.
49232       # This is most likely not really correct.
49233 
49234       # Add runtime stack smashing and undefined behavior checks.
49235       # Not all versions of gcc support -fstack-protector
49236       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49237 
49238 
49239 
49240 
49241 
49242 
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251 
49252 
49253 
49254 
49255 
49256 
49257 
49258 
49259 
49260 
49261 
49262 
49263 
49264 
49265 
49266 
49267 
49268 
49269 
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279     # Execute function body
49280 
49281 
49282 
49283 
49284 
49285 
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317 
49318 
49319 
49320 
49321 
49322 
49323 
49324 
49325 
49326 
49327 
49328     # Execute function body
49329 
49330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49331 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49332   supports=yes
49333 
49334   saved_cflags="$CFLAGS"
49335   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49336   ac_ext=c
49337 ac_cpp='$CPP $CPPFLAGS'
49338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49341 
49342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49343 /* end confdefs.h.  */
49344 int i;
49345 _ACEOF
49346 if ac_fn_c_try_compile "$LINENO"; then :
49347 
49348 else
49349   supports=no
49350 fi
49351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49352   ac_ext=cpp
49353 ac_cpp='$CXXCPP $CPPFLAGS'
49354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49357 
49358   CFLAGS="$saved_cflags"
49359 
49360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49361 $as_echo "$supports" >&6; }
49362   if test "x$supports" = "xyes" ; then
49363     :
49364     C_COMP_SUPPORTS="yes"
49365   else
49366     :
49367     C_COMP_SUPPORTS="no"
49368   fi
49369 
49370 
49371 
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392 
49393 
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
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     # Execute function body
49429 
49430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49431 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49432   supports=yes
49433 
49434   saved_cxxflags="$CXXFLAGS"
49435   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49436   ac_ext=cpp
49437 ac_cpp='$CXXCPP $CPPFLAGS'
49438 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49439 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49440 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49441 
49442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49443 /* end confdefs.h.  */
49444 int i;
49445 _ACEOF
49446 if ac_fn_cxx_try_compile "$LINENO"; then :
49447 
49448 else
49449   supports=no
49450 fi
49451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49452   ac_ext=cpp
49453 ac_cpp='$CXXCPP $CPPFLAGS'
49454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49455 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49457 
49458   CXXFLAGS="$saved_cxxflags"
49459 
49460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49461 $as_echo "$supports" >&6; }
49462   if test "x$supports" = "xyes" ; then
49463     :
49464     CXX_COMP_SUPPORTS="yes"
49465   else
49466     :
49467     CXX_COMP_SUPPORTS="no"
49468   fi
49469 
49470 
49471 
49472 
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49483 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49484   supports=no
49485   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49486 
49487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49488 $as_echo "$supports" >&6; }
49489   if test "x$supports" = "xyes" ; then
49490     :
49491 
49492   else
49493     :
49494     STACK_PROTECTOR_CFLAG=""
49495   fi
49496 
49497 
49498 
49499 
49500 
49501 
49502 
49503       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49504       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49505       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49506         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49507       fi
49508       ;;
49509     esac
49510   fi
49511 
49512   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49513     if test "x$DEBUG_LEVEL" != xrelease; then
49514       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49515         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49516       fi
49517     fi
49518   fi
49519 
49520   # Optimization levels
49521   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49522     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49523 
49524     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49525       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49526       C_O_FLAG_HIGHEST_JVM="-xO4"
49527       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49528       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49529       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49530       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49531       C_O_FLAG_DEBUG_JVM=""
49532       C_O_FLAG_NONE="-xregs=no%frameptr"
49533       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49534       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49535       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49536       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49537       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49538       CXX_O_FLAG_DEBUG_JVM=""
49539       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49540       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49541         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49542         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49543       fi
49544     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49545       C_O_FLAG_HIGHEST_JVM="-xO4"
49546       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49547       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49548       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49549       C_O_FLAG_DEBUG=""
49550       C_O_FLAG_DEBUG_JVM=""
49551       C_O_FLAG_NONE=""
49552       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49553       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49554       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49555       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49556       CXX_O_FLAG_DEBUG=""
49557       CXX_O_FLAG_DEBUG_JVM=""
49558       CXX_O_FLAG_NONE=""
49559     fi
49560   else
49561     # The remaining toolchains share opt flags between CC and CXX;
49562     # setup for C and duplicate afterwards.
49563     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49564       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49565         # On MacOSX we optimize for size, something
49566         # we should do for all platforms?
49567         C_O_FLAG_HIGHEST_JVM="-Os"
49568         C_O_FLAG_HIGHEST="-Os"
49569         C_O_FLAG_HI="-Os"
49570         C_O_FLAG_NORM="-Os"
49571         C_O_FLAG_SIZE="-Os"
49572       else
49573         C_O_FLAG_HIGHEST_JVM="-O3"
49574         C_O_FLAG_HIGHEST="-O3"
49575         C_O_FLAG_HI="-O3"
49576         C_O_FLAG_NORM="-O2"
49577         C_O_FLAG_SIZE="-Os"
49578       fi
49579       C_O_FLAG_DEBUG="-O0"
49580       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49581         C_O_FLAG_DEBUG_JVM=""
49582       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49583         C_O_FLAG_DEBUG_JVM="-O0"
49584       fi
49585       C_O_FLAG_NONE="-O0"
49586     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49587       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49588         # On MacOSX we optimize for size, something
49589         # we should do for all platforms?
49590         C_O_FLAG_HIGHEST_JVM="-Os"
49591         C_O_FLAG_HIGHEST="-Os"
49592         C_O_FLAG_HI="-Os"
49593         C_O_FLAG_NORM="-Os"
49594         C_O_FLAG_SIZE="-Os"
49595       else
49596         C_O_FLAG_HIGHEST_JVM="-O3"
49597         C_O_FLAG_HIGHEST="-O3"
49598         C_O_FLAG_HI="-O3"
49599         C_O_FLAG_NORM="-O2"
49600         C_O_FLAG_SIZE="-Os"
49601       fi
49602       C_O_FLAG_DEBUG="-O0"
49603       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49604         C_O_FLAG_DEBUG_JVM=""
49605       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49606         C_O_FLAG_DEBUG_JVM="-O0"
49607       fi
49608       C_O_FLAG_NONE="-O0"
49609     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49610       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49611       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49612       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49613       C_O_FLAG_NORM="-O2"
49614       C_O_FLAG_DEBUG="-qnoopt"
49615       # FIXME: Value below not verified.
49616       C_O_FLAG_DEBUG_JVM=""
49617       C_O_FLAG_NONE="-qnoopt"
49618     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49619       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49620       C_O_FLAG_HIGHEST="-O2"
49621       C_O_FLAG_HI="-O1"
49622       C_O_FLAG_NORM="-O1"
49623       C_O_FLAG_DEBUG="-Od"
49624       C_O_FLAG_DEBUG_JVM=""
49625       C_O_FLAG_NONE="-Od"
49626       C_O_FLAG_SIZE="-Os"
49627     fi
49628     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49629     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49630     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49631     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49632     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49633     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49634     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49635     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49636   fi
49637 
49638   # Adjust optimization flags according to debug level.
49639   case $DEBUG_LEVEL in
49640     release )
49641       # no adjustment
49642       ;;
49643     fastdebug )
49644       # Not quite so much optimization
49645       C_O_FLAG_HI="$C_O_FLAG_NORM"
49646       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49647       ;;
49648     slowdebug )
49649       # Disable optimization
49650       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49651       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49652       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49653       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49654       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49655       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49656       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49657       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49658       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49659       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49660       ;;
49661   esac
49662 
49663 
49664 
49665 
49666 
49667 
49668 
49669 
49670 
49671 
49672 
49673 
49674 
49675 
49676 
49677 
49678 
49679 
49680 
49681 
49682 # Check whether --with-abi-profile was given.
49683 if test "${with_abi_profile+set}" = set; then :
49684   withval=$with_abi_profile;
49685 fi
49686 
49687 
49688   if test "x$with_abi_profile" != x; then
49689     if test "x$OPENJDK_TARGET_CPU" != xarm && \
49690         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49691       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49692     fi
49693 
49694     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49696 $as_echo_n "checking for ABI profle... " >&6; }
49697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49698 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49699 
49700     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49701       ARM_FLOAT_TYPE=vfp-sflt
49702       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49703     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49704       ARM_FLOAT_TYPE=vfp-hflt
49705       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49706     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49707       ARM_FLOAT_TYPE=sflt
49708       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49709     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49710       ARM_FLOAT_TYPE=vfp-sflt
49711       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49712     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49713       ARM_FLOAT_TYPE=vfp-hflt
49714       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49715     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49716       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49717       ARM_FLOAT_TYPE=
49718       ARM_ARCH_TYPE_FLAGS=
49719     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49720       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49721       ARM_FLOAT_TYPE=
49722       ARM_ARCH_TYPE_FLAGS=
49723     else
49724       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49725     fi
49726 
49727     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49728       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49729     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49730       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49731     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49732       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49733     fi
49734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49735 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49737 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49738 
49739     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49740 $as_echo_n "checking for arch type flags... " >&6; }
49741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49742 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49743 
49744     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49745     # autoconf target triplet.
49746      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49747     # Sanity check that it is a known ABI.
49748     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49749         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49750         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49751           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49752 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49753     fi
49754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49755 $as_echo_n "checking for ABI property name... " >&6; }
49756     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49757 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49758 
49759 
49760     # Pass these on to the open part of configure as if they were set using
49761     # --with-extra-c[xx]flags.
49762     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49763     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49764     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49765     # FIXME: This should not really be set using extra_cflags.
49766     if test "x$OPENJDK_TARGET_CPU" = xarm; then
49767         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49768         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49769     fi
49770     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49771     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49772     # And pass the architecture flags to the linker as well
49773     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49774   fi
49775 
49776   # When building with an abi profile, the name of that profile is appended on the
49777   # bundle platform, which is used in bundle names.
49778   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49779     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49780   fi
49781 
49782 
49783   # Special extras...
49784   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49785     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49786       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49787       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49788     fi
49789     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49790     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49791   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49792     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49793     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49794   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49795     CXXSTD_CXXFLAG="-std=gnu++98"
49796 
49797 
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     # Execute function body
49839 
49840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49841 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49842   supports=yes
49843 
49844   saved_cxxflags="$CXXFLAGS"
49845   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49846   ac_ext=cpp
49847 ac_cpp='$CXXCPP $CPPFLAGS'
49848 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49849 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49850 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49851 
49852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49853 /* end confdefs.h.  */
49854 int i;
49855 _ACEOF
49856 if ac_fn_cxx_try_compile "$LINENO"; then :
49857 
49858 else
49859   supports=no
49860 fi
49861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49862   ac_ext=cpp
49863 ac_cpp='$CXXCPP $CPPFLAGS'
49864 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49865 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49866 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49867 
49868   CXXFLAGS="$saved_cxxflags"
49869 
49870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49871 $as_echo "$supports" >&6; }
49872   if test "x$supports" = "xyes" ; then
49873     :
49874 
49875   else
49876     :
49877     CXXSTD_CXXFLAG=""
49878   fi
49879 
49880 
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49892     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49893 
49894   fi
49895   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49896     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49897     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49898   fi
49899 
49900   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49901     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49902     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49903   fi
49904 
49905   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49906   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49907   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49908 
49909   ###############################################################################
49910   #
49911   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49912   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49913   #
49914 
49915   # Setup compiler/platform specific flags into
49916   #    CFLAGS_JDK    - C Compiler flags
49917   #    CXXFLAGS_JDK  - C++ Compiler flags
49918   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49919   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49920     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49921     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49922     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49923     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49924       # Force compatibility with i586 on 32 bit intel platforms.
49925       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49926       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49927     fi
49928     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49929         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49930     case $OPENJDK_TARGET_CPU_ARCH in
49931       arm )
49932         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49933         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49934         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49935         ;;
49936       ppc )
49937         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49938         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49939         ;;
49940       s390 )
49941         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49942         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49943         ;;
49944       * )
49945         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49946         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49947         ;;
49948     esac
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 
50001 
50002 
50003     # Execute function body
50004 
50005   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50006   REFERENCE_VERSION=6
50007 
50008   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50009     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50010   fi
50011 
50012   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50013     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50014   fi
50015 
50016   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50017   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50018 
50019   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50020     :
50021 
50022   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50023   # runs afoul of the more aggressive versions of these optimisations.
50024   # Notably, value range propagation now assumes that the this pointer of C++
50025   # member functions is non-null.
50026   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50027         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50028         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50029 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50030   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50031   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50032 
50033   else
50034     :
50035 
50036   fi
50037 
50038 
50039 
50040 
50041 
50042 
50043 
50044 
50045 
50046 
50047 
50048 
50049 
50050 
50051   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50052     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50053 
50054     # Restrict the debug information created by Clang to avoid
50055     # too big object files and speed the build up a little bit
50056     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50057     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50058     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50059       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50060         # Force compatibility with i586 on 32 bit intel platforms.
50061         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50062         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50063       fi
50064       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50065       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50066           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50067       case $OPENJDK_TARGET_CPU_ARCH in
50068         ppc )
50069           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50070           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50071           ;;
50072         * )
50073           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50074           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50075           ;;
50076       esac
50077     fi
50078   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50079     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50080     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50081     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50082       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50083     fi
50084 
50085     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50086     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50087   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50088     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50089     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50090     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50091   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50092     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50093         -MD -Zc:wchar_t- -W3 -wd4800 \
50094         -DWIN32_LEAN_AND_MEAN \
50095         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50096         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50097         -DWIN32 -DIAL"
50098     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50099       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50100     else
50101       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50102     fi
50103     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50104     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50105     # studio.
50106     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50107       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50108       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50109       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50110     fi
50111   fi
50112 
50113   ###############################################################################
50114 
50115   # Adjust flags according to debug level.
50116   case $DEBUG_LEVEL in
50117     fastdebug | slowdebug )
50118       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50119       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50120       ;;
50121     release )
50122       ;;
50123     * )
50124       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50125       ;;
50126   esac
50127 
50128   # Set some common defines. These works for all compilers, but assume
50129   # -D is universally accepted.
50130 
50131   # Setup endianness
50132   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50133     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50134     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50135     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50136     #   Note: -Dmacro         is the same as    #define macro 1
50137     #         -Dmacro=        is the same as    #define macro
50138     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50139       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50140     else
50141       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50142     fi
50143   else
50144     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50145     # are defined in the system?
50146     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50147       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50148     else
50149       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50150     fi
50151   fi
50152 
50153   # Setup target OS define. Use OS target name but in upper case.
50154   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50155   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50156 
50157   # Setup target CPU
50158   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50159       $OPENJDK_TARGET_ADD_LP64 \
50160       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50161 
50162   # Setup debug/release defines
50163   if test "x$DEBUG_LEVEL" = xrelease; then
50164     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50165     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50166       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50167     fi
50168   else
50169     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50170   fi
50171 
50172   # Set some additional per-OS defines.
50173   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50174     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50175     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50176         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50177   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50178     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50179     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50180         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50181   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50182     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50183     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50184     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50185     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50186         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50187         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50188         -fno-omit-frame-pointer"
50189   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50190     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50191     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50192     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50193         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50194         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50195   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50196     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50197   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50198     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50199     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50200   fi
50201 
50202   # Set some additional per-CPU defines.
50203   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50204     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50205   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50206     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50207   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50208     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50209       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50210       # fixes `relocation truncated to fit' error for gcc 4.1.
50211       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50212       # Use ppc64 instructions, but schedule for power5
50213       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50214     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50215       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50216     fi
50217   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; 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       # Little endian machine uses ELFv2 ABI.
50221       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50222       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50223       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50224     fi
50225   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50226     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50227       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50228     fi
50229   fi
50230 
50231   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50232     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50233   fi
50234 
50235   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50236     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50237       # Solaris does not have _LP64=1 in the old build.
50238       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50239       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50240     fi
50241   fi
50242 
50243   # Set JVM_CFLAGS warning handling
50244   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50245     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50246         -Wunused-value -Woverloaded-virtual"
50247 
50248     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50249 
50250 
50251 
50252 
50253 
50254 
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     # Execute function body
50304 
50305   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50306   REFERENCE_VERSION=4.8
50307 
50308   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50309     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50310   fi
50311 
50312   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50313     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50314   fi
50315 
50316   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50317   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50318 
50319   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50320     :
50321 
50322             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50323             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50324 
50325 
50326   else
50327     :
50328 
50329   fi
50330 
50331 
50332 
50333 
50334 
50335 
50336 
50337 
50338 
50339 
50340 
50341 
50342 
50343 
50344     fi
50345     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50346       # Non-zero builds have stricter warnings
50347       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50348     else
50349       if test "x$TOOLCHAIN_TYPE" = xclang; then
50350         # Some versions of llvm do not like -Wundef
50351         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50352       fi
50353     fi
50354   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50355     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50356         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50357   fi
50358 
50359   # Additional macosx handling
50360   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50361     # Setting these parameters makes it an error to link to macosx APIs that are
50362     # newer than the given OS version and makes the linked binaries compatible
50363     # even if built on a newer version of the OS.
50364     # The expected format is X.Y.Z
50365     MACOSX_VERSION_MIN=10.7.0
50366 
50367 
50368     # The macro takes the version with no dots, ex: 1070
50369     # Let the flags variables get resolved in make for easier override on make
50370     # command line.
50371     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50372     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50373   fi
50374 
50375   # Setup some hard coded includes
50376   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50377       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50378       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50379       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50380       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50381       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50382       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50383 
50384   # The shared libraries are compiled using the picflag.
50385   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50386       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50387   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50388       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50389 
50390   # Executable flags
50391   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50392   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50393 
50394 
50395 
50396 
50397 
50398 
50399   # Setup LDFLAGS et al.
50400   #
50401 
50402   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50403     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50404     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50405     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50406     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50407       LDFLAGS_SAFESH="-safeseh"
50408       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50409       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50410       # NOTE: Old build added -machine. Probably not needed.
50411       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50412     else
50413       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50414     fi
50415   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50416       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50417       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50418         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50419         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50420     fi
50421   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50422     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50423     # We have previously set HAS_GNU_HASH if this is the case
50424     if test -n "$HAS_GNU_HASH"; then
50425       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50426       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50427       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50428     fi
50429       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50430         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50431     fi
50432     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50433       # And since we now know that the linker is gnu, then add -z defs, to forbid
50434       # undefined symbols in object files.
50435       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50436       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50437       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50438       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50439       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50440       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50441         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50442       fi
50443       case $DEBUG_LEVEL in
50444         release )
50445           # tell linker to optimize libraries.
50446           # Should this be supplied to the OSS linker as well?
50447           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50448           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50449           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50450           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50451             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50452           fi
50453           ;;
50454         slowdebug )
50455           # Hotspot always let the linker optimize
50456           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50457           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50458             # do relocations at load
50459             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50460             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50461             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50462           fi
50463           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50464             # mark relocations read only
50465             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50466             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50467             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50468           fi
50469           ;;
50470         fastdebug )
50471           # Hotspot always let the linker optimize
50472           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50473           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50474             # mark relocations read only
50475             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50476             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50477             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50478           fi
50479           ;;
50480         * )
50481           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50482           ;;
50483         esac
50484     fi
50485   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50486     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50487     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50488     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50489     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50490     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50491     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50492       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50493     fi
50494   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50495     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50496     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50497     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50498   fi
50499 
50500   # Customize LDFLAGS for executables
50501 
50502   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50503 
50504   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50505     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50506       LDFLAGS_STACK_SIZE=1048576
50507     else
50508       LDFLAGS_STACK_SIZE=327680
50509     fi
50510     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50511   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50512     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50513   fi
50514 
50515   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50516 
50517   # Customize LDFLAGS for libs
50518   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50519 
50520   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50521   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50522     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50523         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50524     JDKLIB_LIBS=""
50525   else
50526     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50527         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50528 
50529     if test "xTARGET" = "xTARGET"; then
50530       # On some platforms (mac) the linker warns about non existing -L dirs.
50531       # For any of the variants server, client or minimal, the dir matches the
50532       # variant name. The "main" variant should be used for linking. For the
50533       # rest, the dir is just server.
50534       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50535           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50536         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50537             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50538       else
50539         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50540             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50541       fi
50542     elif test "xTARGET" = "xBUILD"; then
50543       # When building a buildjdk, it's always only the server variant
50544       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50545           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50546     fi
50547 
50548     JDKLIB_LIBS="-ljava -ljvm"
50549     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50550       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50551     fi
50552 
50553   fi
50554 
50555 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50556 
50557   # Set JVM_LIBS (per os)
50558   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50559     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50560   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50561     # FIXME: This hard-coded path is not really proper.
50562     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50563       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50564     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50565       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50566     fi
50567     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50568         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50569   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50570     JVM_LIBS="$JVM_LIBS -lm"
50571   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50572     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50573   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50574     JVM_LIBS="$JVM_LIBS -lm"
50575   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50576     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50577         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50578         wsock32.lib winmm.lib version.lib psapi.lib"
50579     fi
50580 
50581   # Set JVM_ASFLAGS
50582   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50583     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50584       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50585     fi
50586   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50587     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50588   fi
50589 
50590   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50591 
50592 
50593 
50594 
50595 
50596 
50597 
50598 
50599 
50600 
50601 
50602 
50603 
50604 
50605 
50606   # Special extras...
50607   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50608     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50609       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50610       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50611     fi
50612     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50613     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50614   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50615     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50616     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50617   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50618     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50619 
50620 
50621 
50622 
50623 
50624 
50625 
50626 
50627 
50628 
50629 
50630 
50631 
50632 
50633 
50634 
50635 
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     # Execute function body
50662 
50663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50664 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50665   supports=yes
50666 
50667   saved_cxxflags="$CXXFLAGS"
50668   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50669   ac_ext=cpp
50670 ac_cpp='$CXXCPP $CPPFLAGS'
50671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50674 
50675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50676 /* end confdefs.h.  */
50677 int i;
50678 _ACEOF
50679 if ac_fn_cxx_try_compile "$LINENO"; then :
50680 
50681 else
50682   supports=no
50683 fi
50684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50685   ac_ext=cpp
50686 ac_cpp='$CXXCPP $CPPFLAGS'
50687 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50688 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50689 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50690 
50691   CXXFLAGS="$saved_cxxflags"
50692 
50693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50694 $as_echo "$supports" >&6; }
50695   if test "x$supports" = "xyes" ; then
50696     :
50697 
50698   else
50699     :
50700     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50701   fi
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712 
50713 
50714     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50715     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50716 
50717   fi
50718   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50719     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50720     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50721   fi
50722 
50723   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50724     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50725     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50726   fi
50727 
50728   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50729   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50730   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50731 
50732   ###############################################################################
50733   #
50734   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50735   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50736   #
50737 
50738   # Setup compiler/platform specific flags into
50739   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50740   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50741   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50742   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50743     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50744     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50745     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50746     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50747       # Force compatibility with i586 on 32 bit intel platforms.
50748       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50749       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50750     fi
50751     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50752         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50753     case $OPENJDK_BUILD_CPU_ARCH in
50754       arm )
50755         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50756         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50757         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50758         ;;
50759       ppc )
50760         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50761         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50762         ;;
50763       s390 )
50764         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50765         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50766         ;;
50767       * )
50768         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50769         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50770         ;;
50771     esac
50772 
50773 
50774 
50775 
50776 
50777 
50778 
50779 
50780 
50781 
50782 
50783 
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     # Execute function body
50827 
50828   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50829   REFERENCE_VERSION=6
50830 
50831   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50832     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50833   fi
50834 
50835   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50836     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50837   fi
50838 
50839   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50840   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50841 
50842   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50843     :
50844 
50845   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50846   # runs afoul of the more aggressive versions of these optimisations.
50847   # Notably, value range propagation now assumes that the this pointer of C++
50848   # member functions is non-null.
50849   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50850         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50851         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50852 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50853   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50854   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50855 
50856   else
50857     :
50858 
50859   fi
50860 
50861 
50862 
50863 
50864 
50865 
50866 
50867 
50868 
50869 
50870 
50871 
50872 
50873 
50874   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50875     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50876 
50877     # Restrict the debug information created by Clang to avoid
50878     # too big object files and speed the build up a little bit
50879     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50880     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50881     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50882       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50883         # Force compatibility with i586 on 32 bit intel platforms.
50884         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50885         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50886       fi
50887       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50888       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50889           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50890       case $OPENJDK_BUILD_CPU_ARCH in
50891         ppc )
50892           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50893           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50894           ;;
50895         * )
50896           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50897           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50898           ;;
50899       esac
50900     fi
50901   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50902     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50903     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50904     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50905       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50906     fi
50907 
50908     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50909     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50910   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50911     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50912     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50913     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50914   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50915     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50916         -MD -Zc:wchar_t- -W3 -wd4800 \
50917         -DWIN32_LEAN_AND_MEAN \
50918         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50919         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50920         -DWIN32 -DIAL"
50921     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50922       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50923     else
50924       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50925     fi
50926     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50927     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50928     # studio.
50929     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50930       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50931       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50932       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50933     fi
50934   fi
50935 
50936   ###############################################################################
50937 
50938   # Adjust flags according to debug level.
50939   case $DEBUG_LEVEL in
50940     fastdebug | slowdebug )
50941       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50942       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50943       ;;
50944     release )
50945       ;;
50946     * )
50947       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50948       ;;
50949   esac
50950 
50951   # Set some common defines. These works for all compilers, but assume
50952   # -D is universally accepted.
50953 
50954   # Setup endianness
50955   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50956     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50957     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50958     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50959     #   Note: -Dmacro         is the same as    #define macro 1
50960     #         -Dmacro=        is the same as    #define macro
50961     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50962       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50963     else
50964       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50965     fi
50966   else
50967     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50968     # are defined in the system?
50969     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50970       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50971     else
50972       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50973     fi
50974   fi
50975 
50976   # Setup target OS define. Use OS target name but in upper case.
50977   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50978   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50979 
50980   # Setup target CPU
50981   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50982       $OPENJDK_BUILD_ADD_LP64 \
50983       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50984 
50985   # Setup debug/release defines
50986   if test "x$DEBUG_LEVEL" = xrelease; then
50987     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50988     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50989       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50990     fi
50991   else
50992     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50993   fi
50994 
50995   # Set some additional per-OS defines.
50996   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50997     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50998     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50999         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51000   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51001     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51002     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51003         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51004   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51005     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51006     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51007     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51008     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51009         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51010         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51011         -fno-omit-frame-pointer"
51012   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51013     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51014     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51015     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51016         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51017         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51018   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51019     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51020   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51021     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51022     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51023   fi
51024 
51025   # Set some additional per-CPU defines.
51026   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51027     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51028   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51029     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51030   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51031     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51032       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51033       # fixes `relocation truncated to fit' error for gcc 4.1.
51034       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51035       # Use ppc64 instructions, but schedule for power5
51036       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51037     elif test "x$OPENJDK_BUILD_OS" = xaix; then
51038       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51039     fi
51040   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51041     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51042       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51043       # Little endian machine uses ELFv2 ABI.
51044       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51045       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51046       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51047     fi
51048   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51049     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51050       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51051     fi
51052   fi
51053 
51054   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51055     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51056   fi
51057 
51058   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51059     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51060       # Solaris does not have _LP64=1 in the old build.
51061       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51062       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51063     fi
51064   fi
51065 
51066   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51067   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51068     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51069         -Wunused-value -Woverloaded-virtual"
51070 
51071     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51072 
51073 
51074 
51075 
51076 
51077 
51078 
51079 
51080 
51081 
51082 
51083 
51084 
51085 
51086 
51087 
51088 
51089 
51090 
51091 
51092 
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     # Execute function body
51127 
51128   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51129   REFERENCE_VERSION=4.8
51130 
51131   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51132     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51133   fi
51134 
51135   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51136     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51137   fi
51138 
51139   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51140   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51141 
51142   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51143     :
51144 
51145             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51146             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51147 
51148 
51149   else
51150     :
51151 
51152   fi
51153 
51154 
51155 
51156 
51157 
51158 
51159 
51160 
51161 
51162 
51163 
51164 
51165 
51166 
51167     fi
51168     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51169       # Non-zero builds have stricter warnings
51170       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51171     else
51172       if test "x$TOOLCHAIN_TYPE" = xclang; then
51173         # Some versions of llvm do not like -Wundef
51174         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51175       fi
51176     fi
51177   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51178     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51179         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51180   fi
51181 
51182   # Additional macosx handling
51183   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51184     # Setting these parameters makes it an error to link to macosx APIs that are
51185     # newer than the given OS version and makes the linked binaries compatible
51186     # even if built on a newer version of the OS.
51187     # The expected format is X.Y.Z
51188     MACOSX_VERSION_MIN=10.7.0
51189 
51190 
51191     # The macro takes the version with no dots, ex: 1070
51192     # Let the flags variables get resolved in make for easier override on make
51193     # command line.
51194     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)"
51195     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51196   fi
51197 
51198   # Setup some hard coded includes
51199   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51200       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51201       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51202       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51203       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51204       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51205       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51206 
51207   # The shared libraries are compiled using the picflag.
51208   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51209       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51210   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51211       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51212 
51213   # Executable flags
51214   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51215   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51216 
51217 
51218 
51219 
51220 
51221 
51222   # Setup LDFLAGS et al.
51223   #
51224 
51225   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51226     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51227     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51228     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51229     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51230       LDFLAGS_SAFESH="-safeseh"
51231       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51232       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51233       # NOTE: Old build added -machine. Probably not needed.
51234       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51235     else
51236       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51237     fi
51238   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51239       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51240       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51241         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51242         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51243     fi
51244   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51245     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51246     # We have previously set HAS_GNU_HASH if this is the case
51247     if test -n "$HAS_GNU_HASH"; then
51248       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51249       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51250       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51251     fi
51252       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51253         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51254     fi
51255     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51256       # And since we now know that the linker is gnu, then add -z defs, to forbid
51257       # undefined symbols in object files.
51258       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51259       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51260       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51261       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51262       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51263       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51264         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51265       fi
51266       case $DEBUG_LEVEL in
51267         release )
51268           # tell linker to optimize libraries.
51269           # Should this be supplied to the OSS linker as well?
51270           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51271           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51272           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51273           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51274             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51275           fi
51276           ;;
51277         slowdebug )
51278           # Hotspot always let the linker optimize
51279           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51280           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51281             # do relocations at load
51282             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51283             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51284             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51285           fi
51286           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51287             # mark relocations read only
51288             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51289             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51290             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51291           fi
51292           ;;
51293         fastdebug )
51294           # Hotspot always let the linker optimize
51295           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51296           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51297             # mark relocations read only
51298             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51299             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51300             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51301           fi
51302           ;;
51303         * )
51304           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51305           ;;
51306         esac
51307     fi
51308   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51309     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51310     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51311     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51312     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51313     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51314     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51315       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51316     fi
51317   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51318     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51319     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51320     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51321   fi
51322 
51323   # Customize LDFLAGS for executables
51324 
51325   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51326 
51327   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51328     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51329       LDFLAGS_STACK_SIZE=1048576
51330     else
51331       LDFLAGS_STACK_SIZE=327680
51332     fi
51333     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51334   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51335     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51336   fi
51337 
51338   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51339 
51340   # Customize LDFLAGS for libs
51341   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51342 
51343   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51344   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51345     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51346         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51347     OPENJDK_BUILD_JDKLIB_LIBS=""
51348   else
51349     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51350         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51351 
51352     if test "xBUILD" = "xTARGET"; then
51353       # On some platforms (mac) the linker warns about non existing -L dirs.
51354       # For any of the variants server, client or minimal, the dir matches the
51355       # variant name. The "main" variant should be used for linking. For the
51356       # rest, the dir is just server.
51357       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51358           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51359         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51360             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51361       else
51362         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51363             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51364       fi
51365     elif test "xBUILD" = "xBUILD"; then
51366       # When building a buildjdk, it's always only the server variant
51367       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51368           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51369     fi
51370 
51371     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51372     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51373       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51374     fi
51375 
51376   fi
51377 
51378 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51379 
51380   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51381   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51382     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51383   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51384     # FIXME: This hard-coded path is not really proper.
51385     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51386       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51387     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51388       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51389     fi
51390     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51391         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51392   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51393     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51394   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51395     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51396   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51397     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51398   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51399     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51400         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51401         wsock32.lib winmm.lib version.lib psapi.lib"
51402     fi
51403 
51404   # Set OPENJDK_BUILD_JVM_ASFLAGS
51405   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51406     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51407       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51408     fi
51409   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51410     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51411   fi
51412 
51413   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429   # Tests are only ever compiled for TARGET
51430   # Flags for compiling test libraries
51431   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51432   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51433 
51434   # Flags for compiling test executables
51435   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51436   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51437 
51438 
51439 
51440 
51441 
51442 
51443   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51444   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51445 
51446 
51447 
51448 
51449 
51450 
51451   # Some Zero and Shark settings.
51452   # ZERO_ARCHFLAG tells the compiler which mode to build for
51453   case "${OPENJDK_TARGET_CPU}" in
51454     s390)
51455       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51456       ;;
51457     *)
51458       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51459   esac
51460 
51461 
51462 
51463 
51464 
51465 
51466 
51467 
51468 
51469 
51470 
51471 
51472 
51473 
51474 
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484 
51485 
51486 
51487 
51488 
51489 
51490 
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498 
51499 
51500 
51501 
51502     # Execute function body
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 
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551     # Execute function body
51552 
51553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51554 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51555   supports=yes
51556 
51557   saved_cflags="$CFLAGS"
51558   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51559   ac_ext=c
51560 ac_cpp='$CPP $CPPFLAGS'
51561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51564 
51565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51566 /* end confdefs.h.  */
51567 int i;
51568 _ACEOF
51569 if ac_fn_c_try_compile "$LINENO"; then :
51570 
51571 else
51572   supports=no
51573 fi
51574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51575   ac_ext=cpp
51576 ac_cpp='$CXXCPP $CPPFLAGS'
51577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51578 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51580 
51581   CFLAGS="$saved_cflags"
51582 
51583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51584 $as_echo "$supports" >&6; }
51585   if test "x$supports" = "xyes" ; then
51586     :
51587     C_COMP_SUPPORTS="yes"
51588   else
51589     :
51590     C_COMP_SUPPORTS="no"
51591   fi
51592 
51593 
51594 
51595 
51596 
51597 
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606 
51607 
51608 
51609 
51610 
51611 
51612 
51613 
51614 
51615 
51616 
51617 
51618 
51619 
51620 
51621 
51622 
51623 
51624 
51625 
51626 
51627 
51628 
51629 
51630 
51631 
51632 
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645 
51646 
51647 
51648 
51649 
51650 
51651     # Execute function body
51652 
51653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51654 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51655   supports=yes
51656 
51657   saved_cxxflags="$CXXFLAGS"
51658   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51659   ac_ext=cpp
51660 ac_cpp='$CXXCPP $CPPFLAGS'
51661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51664 
51665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51666 /* end confdefs.h.  */
51667 int i;
51668 _ACEOF
51669 if ac_fn_cxx_try_compile "$LINENO"; then :
51670 
51671 else
51672   supports=no
51673 fi
51674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51675   ac_ext=cpp
51676 ac_cpp='$CXXCPP $CPPFLAGS'
51677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51678 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51680 
51681   CXXFLAGS="$saved_cxxflags"
51682 
51683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51684 $as_echo "$supports" >&6; }
51685   if test "x$supports" = "xyes" ; then
51686     :
51687     CXX_COMP_SUPPORTS="yes"
51688   else
51689     :
51690     CXX_COMP_SUPPORTS="no"
51691   fi
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51706 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51707   supports=no
51708   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51709 
51710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51711 $as_echo "$supports" >&6; }
51712   if test "x$supports" = "xyes" ; then
51713     :
51714 
51715   else
51716     :
51717     ZERO_ARCHFLAG=""
51718   fi
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726 
51727   # Check that the compiler supports -mX (or -qX on AIX) flags
51728   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51729 
51730 
51731 
51732 
51733 
51734 
51735 
51736 
51737 
51738 
51739 
51740 
51741 
51742 
51743 
51744 
51745 
51746 
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776     # Execute function body
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 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825     # Execute function body
51826 
51827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51828 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51829   supports=yes
51830 
51831   saved_cflags="$CFLAGS"
51832   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51833   ac_ext=c
51834 ac_cpp='$CPP $CPPFLAGS'
51835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51838 
51839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51840 /* end confdefs.h.  */
51841 int i;
51842 _ACEOF
51843 if ac_fn_c_try_compile "$LINENO"; then :
51844 
51845 else
51846   supports=no
51847 fi
51848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51849   ac_ext=cpp
51850 ac_cpp='$CXXCPP $CPPFLAGS'
51851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51854 
51855   CFLAGS="$saved_cflags"
51856 
51857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51858 $as_echo "$supports" >&6; }
51859   if test "x$supports" = "xyes" ; then
51860     :
51861     C_COMP_SUPPORTS="yes"
51862   else
51863     :
51864     C_COMP_SUPPORTS="no"
51865   fi
51866 
51867 
51868 
51869 
51870 
51871 
51872 
51873 
51874 
51875 
51876 
51877 
51878 
51879 
51880 
51881 
51882 
51883 
51884 
51885 
51886 
51887 
51888 
51889 
51890 
51891 
51892 
51893 
51894 
51895 
51896 
51897 
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     # Execute function body
51926 
51927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51928 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51929   supports=yes
51930 
51931   saved_cxxflags="$CXXFLAGS"
51932   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51933   ac_ext=cpp
51934 ac_cpp='$CXXCPP $CPPFLAGS'
51935 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51936 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51937 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51938 
51939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51940 /* end confdefs.h.  */
51941 int i;
51942 _ACEOF
51943 if ac_fn_cxx_try_compile "$LINENO"; then :
51944 
51945 else
51946   supports=no
51947 fi
51948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51949   ac_ext=cpp
51950 ac_cpp='$CXXCPP $CPPFLAGS'
51951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51954 
51955   CXXFLAGS="$saved_cxxflags"
51956 
51957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51958 $as_echo "$supports" >&6; }
51959   if test "x$supports" = "xyes" ; then
51960     :
51961     CXX_COMP_SUPPORTS="yes"
51962   else
51963     :
51964     CXX_COMP_SUPPORTS="no"
51965   fi
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51980 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51981   supports=no
51982   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51983 
51984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51985 $as_echo "$supports" >&6; }
51986   if test "x$supports" = "xyes" ; then
51987     :
51988     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51989   else
51990     :
51991     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51992   fi
51993 
51994 
51995 
51996 
51997 
51998 
51999 
52000 
52001   # Check whether --enable-warnings-as-errors was given.
52002 if test "${enable_warnings_as_errors+set}" = set; then :
52003   enableval=$enable_warnings_as_errors;
52004 fi
52005 
52006 
52007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52008 $as_echo_n "checking if native warnings are errors... " >&6; }
52009   if test "x$enable_warnings_as_errors" = "xyes"; then
52010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52011 $as_echo "yes (explicitly set)" >&6; }
52012     WARNINGS_AS_ERRORS=true
52013   elif test "x$enable_warnings_as_errors" = "xno"; then
52014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52015 $as_echo "no" >&6; }
52016     WARNINGS_AS_ERRORS=false
52017   elif test "x$enable_warnings_as_errors" = "x"; then
52018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52019 $as_echo "yes (default)" >&6; }
52020     WARNINGS_AS_ERRORS=true
52021   else
52022     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52023   fi
52024 
52025   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52026     # Set legacy hotspot variable
52027     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52028   else
52029     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52030   fi
52031 
52032 
52033 
52034 
52035   case "${TOOLCHAIN_TYPE}" in
52036     microsoft)
52037       DISABLE_WARNING_PREFIX="-wd"
52038       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52039       ;;
52040     solstudio)
52041       DISABLE_WARNING_PREFIX="-erroff="
52042       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52043       ;;
52044     gcc)
52045       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52046 
52047 
52048 
52049 
52050 
52051 
52052 
52053 
52054 
52055 
52056 
52057 
52058 
52059 
52060 
52061 
52062 
52063 
52064 
52065 
52066 
52067 
52068 
52069 
52070 
52071 
52072 
52073 
52074 
52075 
52076 
52077 
52078 
52079 
52080 
52081 
52082 
52083 
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093     # Execute function body
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 
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142     # Execute function body
52143 
52144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52145 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52146   supports=yes
52147 
52148   saved_cflags="$CFLAGS"
52149   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52150   ac_ext=c
52151 ac_cpp='$CPP $CPPFLAGS'
52152 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52153 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52155 
52156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52157 /* end confdefs.h.  */
52158 int i;
52159 _ACEOF
52160 if ac_fn_c_try_compile "$LINENO"; then :
52161 
52162 else
52163   supports=no
52164 fi
52165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52166   ac_ext=cpp
52167 ac_cpp='$CXXCPP $CPPFLAGS'
52168 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52169 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52170 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52171 
52172   CFLAGS="$saved_cflags"
52173 
52174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52175 $as_echo "$supports" >&6; }
52176   if test "x$supports" = "xyes" ; then
52177     :
52178     C_COMP_SUPPORTS="yes"
52179   else
52180     :
52181     C_COMP_SUPPORTS="no"
52182   fi
52183 
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191 
52192 
52193 
52194 
52195 
52196 
52197 
52198 
52199 
52200 
52201 
52202 
52203 
52204 
52205 
52206 
52207 
52208 
52209 
52210 
52211 
52212 
52213 
52214 
52215 
52216 
52217 
52218 
52219 
52220 
52221 
52222 
52223 
52224 
52225 
52226 
52227 
52228 
52229 
52230 
52231 
52232 
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242     # Execute function body
52243 
52244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52245 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52246   supports=yes
52247 
52248   saved_cxxflags="$CXXFLAGS"
52249   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52250   ac_ext=cpp
52251 ac_cpp='$CXXCPP $CPPFLAGS'
52252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52255 
52256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52257 /* end confdefs.h.  */
52258 int i;
52259 _ACEOF
52260 if ac_fn_cxx_try_compile "$LINENO"; then :
52261 
52262 else
52263   supports=no
52264 fi
52265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52266   ac_ext=cpp
52267 ac_cpp='$CXXCPP $CPPFLAGS'
52268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52271 
52272   CXXFLAGS="$saved_cxxflags"
52273 
52274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52275 $as_echo "$supports" >&6; }
52276   if test "x$supports" = "xyes" ; then
52277     :
52278     CXX_COMP_SUPPORTS="yes"
52279   else
52280     :
52281     CXX_COMP_SUPPORTS="no"
52282   fi
52283 
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52297 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52298   supports=no
52299   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52300 
52301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52302 $as_echo "$supports" >&6; }
52303   if test "x$supports" = "xyes" ; then
52304     :
52305     GCC_CAN_DISABLE_WARNINGS=true
52306   else
52307     :
52308     GCC_CAN_DISABLE_WARNINGS=false
52309 
52310   fi
52311 
52312 
52313 
52314 
52315 
52316 
52317       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52318         DISABLE_WARNING_PREFIX="-Wno-"
52319       else
52320         DISABLE_WARNING_PREFIX=
52321       fi
52322       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52323       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52324       # CFLAGS since any target specific flags will likely not work with the
52325       # build compiler
52326       CC_OLD="$CC"
52327       CXX_OLD="$CXX"
52328       CC="$BUILD_CC"
52329       CXX="$BUILD_CXX"
52330       CFLAGS_OLD="$CFLAGS"
52331       CFLAGS=""
52332 
52333 
52334 
52335 
52336 
52337 
52338 
52339 
52340 
52341 
52342 
52343 
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351 
52352 
52353 
52354 
52355 
52356 
52357 
52358 
52359 
52360 
52361 
52362 
52363 
52364 
52365 
52366 
52367 
52368 
52369 
52370 
52371 
52372 
52373 
52374 
52375 
52376 
52377 
52378 
52379     # Execute function body
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 
52412 
52413 
52414 
52415 
52416 
52417 
52418 
52419 
52420 
52421 
52422 
52423 
52424 
52425 
52426 
52427 
52428     # Execute function body
52429 
52430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52431 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52432   supports=yes
52433 
52434   saved_cflags="$CFLAGS"
52435   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52436   ac_ext=c
52437 ac_cpp='$CPP $CPPFLAGS'
52438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52441 
52442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52443 /* end confdefs.h.  */
52444 int i;
52445 _ACEOF
52446 if ac_fn_c_try_compile "$LINENO"; then :
52447 
52448 else
52449   supports=no
52450 fi
52451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52452   ac_ext=cpp
52453 ac_cpp='$CXXCPP $CPPFLAGS'
52454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52455 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52457 
52458   CFLAGS="$saved_cflags"
52459 
52460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52461 $as_echo "$supports" >&6; }
52462   if test "x$supports" = "xyes" ; then
52463     :
52464     C_COMP_SUPPORTS="yes"
52465   else
52466     :
52467     C_COMP_SUPPORTS="no"
52468   fi
52469 
52470 
52471 
52472 
52473 
52474 
52475 
52476 
52477 
52478 
52479 
52480 
52481 
52482 
52483 
52484 
52485 
52486 
52487 
52488 
52489 
52490 
52491 
52492 
52493 
52494 
52495 
52496 
52497 
52498 
52499 
52500 
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     # Execute function body
52529 
52530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52531 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52532   supports=yes
52533 
52534   saved_cxxflags="$CXXFLAGS"
52535   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52536   ac_ext=cpp
52537 ac_cpp='$CXXCPP $CPPFLAGS'
52538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52541 
52542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52543 /* end confdefs.h.  */
52544 int i;
52545 _ACEOF
52546 if ac_fn_cxx_try_compile "$LINENO"; then :
52547 
52548 else
52549   supports=no
52550 fi
52551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52552   ac_ext=cpp
52553 ac_cpp='$CXXCPP $CPPFLAGS'
52554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52557 
52558   CXXFLAGS="$saved_cxxflags"
52559 
52560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52561 $as_echo "$supports" >&6; }
52562   if test "x$supports" = "xyes" ; then
52563     :
52564     CXX_COMP_SUPPORTS="yes"
52565   else
52566     :
52567     CXX_COMP_SUPPORTS="no"
52568   fi
52569 
52570 
52571 
52572 
52573 
52574 
52575 
52576 
52577 
52578 
52579 
52580 
52581 
52582   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52583 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52584   supports=no
52585   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52586 
52587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52588 $as_echo "$supports" >&6; }
52589   if test "x$supports" = "xyes" ; then
52590     :
52591     BUILD_CC_CAN_DISABLE_WARNINGS=true
52592   else
52593     :
52594     BUILD_CC_CAN_DISABLE_WARNINGS=false
52595 
52596   fi
52597 
52598 
52599 
52600 
52601 
52602 
52603       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52604         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52605       else
52606         BUILD_CC_DISABLE_WARNING_PREFIX=
52607       fi
52608       CC="$CC_OLD"
52609       CXX="$CXX_OLD"
52610       CFLAGS="$CFLAGS_OLD"
52611       ;;
52612     clang)
52613       DISABLE_WARNING_PREFIX="-Wno-"
52614       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52615       ;;
52616     xlc)
52617       DISABLE_WARNING_PREFIX="-qsuppress="
52618       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52619       ;;
52620   esac
52621 
52622 
52623 
52624 
52625 
52626 # Setup debug symbols (need objcopy from the toolchain for that)
52627 
52628   #
52629   # NATIVE_DEBUG_SYMBOLS
52630   # This must be done after the toolchain is setup, since we're looking at objcopy.
52631   #
52632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52633 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52634 
52635 # Check whether --with-native-debug-symbols was given.
52636 if test "${with_native_debug_symbols+set}" = set; then :
52637   withval=$with_native_debug_symbols;
52638         if test "x$OPENJDK_TARGET_OS" = xaix; then
52639           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52640             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52641           fi
52642         fi
52643 
52644 else
52645 
52646         if test "x$OPENJDK_TARGET_OS" = xaix; then
52647           # AIX doesn't support 'zipped' so use 'internal' as default
52648           with_native_debug_symbols="internal"
52649         else
52650           if test "x$STATIC_BUILD" = xtrue; then
52651             with_native_debug_symbols="none"
52652           else
52653             with_native_debug_symbols="zipped"
52654           fi
52655         fi
52656 
52657 fi
52658 
52659   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52661 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52662 
52663   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52664 
52665     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52666       if test "x$OBJCOPY" = x; then
52667         # enabling of enable-debug-symbols and can't find objcopy
52668         # this is an error
52669         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52670       fi
52671     fi
52672 
52673     COMPILE_WITH_DEBUG_SYMBOLS=true
52674     COPY_DEBUG_SYMBOLS=true
52675     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52676   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52677     COMPILE_WITH_DEBUG_SYMBOLS=false
52678     COPY_DEBUG_SYMBOLS=false
52679     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52680   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52681     COMPILE_WITH_DEBUG_SYMBOLS=true
52682     COPY_DEBUG_SYMBOLS=false
52683     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52684   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52685 
52686     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52687       if test "x$OBJCOPY" = x; then
52688         # enabling of enable-debug-symbols and can't find objcopy
52689         # this is an error
52690         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52691       fi
52692     fi
52693 
52694     COMPILE_WITH_DEBUG_SYMBOLS=true
52695     COPY_DEBUG_SYMBOLS=true
52696     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52697   else
52698     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52699   fi
52700 
52701   # --enable-debug-symbols is deprecated.
52702   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52703 
52704   # Check whether --enable-debug-symbols was given.
52705 if test "${enable_debug_symbols+set}" = set; then :
52706   enableval=$enable_debug_symbols;
52707 fi
52708 
52709   if test "x$enable_debug_symbols" != x; then
52710     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52711 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52712 
52713     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52714       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52715 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52716     fi
52717 
52718   fi
52719 
52720 
52721   # --enable-zip-debug-info is deprecated.
52722   # Please use --with-native-debug-symbols=zipped .
52723 
52724   # Check whether --enable-zip-debug-info was given.
52725 if test "${enable_zip_debug_info+set}" = set; then :
52726   enableval=$enable_zip_debug_info;
52727 fi
52728 
52729   if test "x$enable_zip_debug_info" != x; then
52730     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52731 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52732 
52733     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52734       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52735 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52736     fi
52737 
52738   fi
52739 
52740 
52741 
52742 
52743 
52744 
52745 
52746   # Check whether --enable-native-coverage was given.
52747 if test "${enable_native_coverage+set}" = set; then :
52748   enableval=$enable_native_coverage;
52749 fi
52750 
52751   GCOV_ENABLED="false"
52752   if test "x$enable_native_coverage" = "xyes"; then
52753     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52754       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52755 $as_echo_n "checking if native coverage is enabled... " >&6; }
52756       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52757 $as_echo "yes" >&6; }
52758       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52759       GCOV_LDFLAGS="-fprofile-arcs"
52760       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52761       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52762       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52763       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52764       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52765       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52766       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52767       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52768       GCOV_ENABLED="true"
52769     else
52770       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52771     fi
52772   elif test "x$enable_native_coverage" = "xno"; then
52773     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52774 $as_echo_n "checking if native coverage is enabled... " >&6; }
52775     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52776 $as_echo "no" >&6; }
52777   elif test "x$enable_native_coverage" != "x"; then
52778     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52779   fi
52780 
52781 
52782 
52783 
52784 # Need toolchain to setup dtrace
52785 
52786   # Test for dtrace dependencies
52787   # Check whether --enable-dtrace was given.
52788 if test "${enable_dtrace+set}" = set; then :
52789   enableval=$enable_dtrace;
52790 fi
52791 
52792 
52793   DTRACE_DEP_MISSING=false
52794 
52795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52796 $as_echo_n "checking for dtrace tool... " >&6; }
52797   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52799 $as_echo "$DTRACE" >&6; }
52800   else
52801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52802 $as_echo "not found, cannot build dtrace" >&6; }
52803     DTRACE_DEP_MISSING=true
52804   fi
52805 
52806   for ac_header in sys/sdt.h
52807 do :
52808   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52809 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52810   cat >>confdefs.h <<_ACEOF
52811 #define HAVE_SYS_SDT_H 1
52812 _ACEOF
52813  DTRACE_HEADERS_OK=yes
52814 else
52815   DTRACE_HEADERS_OK=no
52816 fi
52817 
52818 done
52819 
52820   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52821     DTRACE_DEP_MISSING=true
52822   fi
52823 
52824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52825 $as_echo_n "checking if dtrace should be built... " >&6; }
52826   if test "x$enable_dtrace" = "xyes"; then
52827     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52829 $as_echo "no, missing dependencies" >&6; }
52830 
52831   # Print a helpful message on how to acquire the necessary build dependency.
52832   # dtrace is the help tag: freetype, cups, alsa etc
52833   MISSING_DEPENDENCY=dtrace
52834 
52835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52836     cygwin_help $MISSING_DEPENDENCY
52837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52838     msys_help $MISSING_DEPENDENCY
52839   else
52840     PKGHANDLER_COMMAND=
52841 
52842     case $PKGHANDLER in
52843       apt-get)
52844         apt_help     $MISSING_DEPENDENCY ;;
52845       yum)
52846         yum_help     $MISSING_DEPENDENCY ;;
52847       port)
52848         port_help    $MISSING_DEPENDENCY ;;
52849       pkgutil)
52850         pkgutil_help $MISSING_DEPENDENCY ;;
52851       pkgadd)
52852         pkgadd_help  $MISSING_DEPENDENCY ;;
52853     esac
52854 
52855     if test "x$PKGHANDLER_COMMAND" != x; then
52856       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52857     fi
52858   fi
52859 
52860       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52861     else
52862       INCLUDE_DTRACE=true
52863       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52864 $as_echo "yes, forced" >&6; }
52865     fi
52866   elif test "x$enable_dtrace" = "xno"; then
52867     INCLUDE_DTRACE=false
52868     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52869 $as_echo "no, forced" >&6; }
52870   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52871     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52872       INCLUDE_DTRACE=false
52873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52874 $as_echo "no, missing dependencies" >&6; }
52875     else
52876       INCLUDE_DTRACE=true
52877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52878 $as_echo "yes, dependencies present" >&6; }
52879     fi
52880   else
52881     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52882   fi
52883 
52884 
52885 
52886   # Check whether --enable-aot was given.
52887 if test "${enable_aot+set}" = set; then :
52888   enableval=$enable_aot;
52889 fi
52890 
52891 
52892   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52893     ENABLE_AOT="true"
52894   elif test "x$enable_aot" = "xyes"; then
52895     ENABLE_AOT="true"
52896   elif test "x$enable_aot" = "xno"; then
52897     ENABLE_AOT="false"
52898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52899 $as_echo_n "checking if aot should be enabled... " >&6; }
52900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52901 $as_echo "no, forced" >&6; }
52902   else
52903     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52904   fi
52905 
52906   if test "x$ENABLE_AOT" = "xtrue"; then
52907     # Only enable AOT on linux-X64.
52908     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52909       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52910         if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52911           ENABLE_AOT="true"
52912         else
52913           ENABLE_AOT="false"
52914           if test "x$enable_aot" = "xyes"; then
52915             as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52916           fi
52917         fi
52918       else
52919         ENABLE_AOT="false"
52920         if test "x$enable_aot" = "xyes"; then
52921           as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52922         fi
52923       fi
52924     else
52925       ENABLE_AOT="false"
52926       if test "x$enable_aot" = "xyes"; then
52927         as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52928       fi
52929     fi
52930   fi
52931 
52932 
52933 
52934 
52935   # Check whether --enable-hotspot-gtest was given.
52936 if test "${enable_hotspot_gtest+set}" = set; then :
52937   enableval=$enable_hotspot_gtest;
52938 fi
52939 
52940 
52941   if test -e "$HOTSPOT_TOPDIR/test/native"; then
52942     GTEST_DIR_EXISTS="true"
52943   else
52944     GTEST_DIR_EXISTS="false"
52945   fi
52946 
52947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52948 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52949   if test "x$enable_hotspot_gtest" = "xyes"; then
52950     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52951       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52952 $as_echo "yes, forced" >&6; }
52953       BUILD_GTEST="true"
52954     else
52955       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52956     fi
52957   elif test "x$enable_hotspot_gtest" = "xno"; then
52958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52959 $as_echo "no, forced" >&6; }
52960     BUILD_GTEST="false"
52961   elif test "x$enable_hotspot_gtest" = "x"; then
52962     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52964 $as_echo "yes" >&6; }
52965       BUILD_GTEST="true"
52966     else
52967       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52968 $as_echo "no" >&6; }
52969       BUILD_GTEST="false"
52970     fi
52971   else
52972     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52973   fi
52974 
52975 
52976 
52977 
52978 ###############################################################################
52979 #
52980 # Check dependencies for external and internal libraries.
52981 #
52982 ###############################################################################
52983 
52984 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52985 
52986   # When using cygwin or msys, we need a wrapper binary that renames
52987   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52988   # @files and rewrites these too! This wrapper binary is
52989   # called fixpath.
52990   FIXPATH=
52991   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52993 $as_echo_n "checking if fixpath can be created... " >&6; }
52994     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52995     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52996     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52997     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52998       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52999       FIXPATH="$FIXPATH_BIN -c"
53000     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53001       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53002       # @ was chosen as separator to minimize risk of other tools messing around with it
53003       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53004           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53005       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53006       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53007     fi
53008     FIXPATH_SRC_W="$FIXPATH_SRC"
53009     FIXPATH_BIN_W="$FIXPATH_BIN"
53010 
53011   unix_path="$FIXPATH_SRC_W"
53012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53013     windows_path=`$CYGPATH -m "$unix_path"`
53014     FIXPATH_SRC_W="$windows_path"
53015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53016     windows_path=`cmd //c echo $unix_path`
53017     FIXPATH_SRC_W="$windows_path"
53018   fi
53019 
53020 
53021   unix_path="$FIXPATH_BIN_W"
53022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53023     windows_path=`$CYGPATH -m "$unix_path"`
53024     FIXPATH_BIN_W="$windows_path"
53025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53026     windows_path=`cmd //c echo $unix_path`
53027     FIXPATH_BIN_W="$windows_path"
53028   fi
53029 
53030     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53031     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53032     cd $FIXPATH_DIR
53033     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53034     cd $CURDIR
53035 
53036     if test ! -x $FIXPATH_BIN; then
53037       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53038 $as_echo "no" >&6; }
53039       cat $FIXPATH_DIR/fixpath1.log
53040       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53041     fi
53042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53043 $as_echo "yes" >&6; }
53044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53045 $as_echo_n "checking if fixpath.exe works... " >&6; }
53046     cd $FIXPATH_DIR
53047     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53048         > $FIXPATH_DIR/fixpath2.log 2>&1
53049     cd $CURDIR
53050     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53052 $as_echo "no" >&6; }
53053       cat $FIXPATH_DIR/fixpath2.log
53054       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53055     fi
53056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53057 $as_echo "yes" >&6; }
53058 
53059     FIXPATH_DETACH_FLAG="--detach"
53060   fi
53061 
53062 
53063 
53064 
53065 
53066 
53067   # Check if X11 is needed
53068   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53069     # No X11 support on windows or macosx
53070     NEEDS_LIB_X11=false
53071   else
53072     # All other instances need X11, even if building headless only, libawt still
53073     # needs X11 headers.
53074     NEEDS_LIB_X11=true
53075   fi
53076 
53077   # Check if cups is needed
53078   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53079     # Windows have a separate print system
53080     NEEDS_LIB_CUPS=false
53081   else
53082     NEEDS_LIB_CUPS=true
53083   fi
53084 
53085   # A custom hook may have set this already
53086   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53087     NEEDS_LIB_FREETYPE=true
53088   fi
53089 
53090   # Check if alsa is needed
53091   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53092     NEEDS_LIB_ALSA=true
53093   else
53094     NEEDS_LIB_ALSA=false
53095   fi
53096 
53097   # Check if ffi is needed
53098   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53099     NEEDS_LIB_FFI=true
53100   else
53101     NEEDS_LIB_FFI=false
53102   fi
53103 
53104 
53105   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53106   # dynamic build is configured on command line.
53107 
53108 # Check whether --with-stdc++lib was given.
53109 if test "${with_stdc__lib+set}" = set; then :
53110   withval=$with_stdc__lib;
53111         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53112                 && test "x$with_stdc__lib" != xdefault; then
53113           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53114         fi
53115 
53116 else
53117   with_stdc__lib=default
53118 
53119 fi
53120 
53121 
53122   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53123     # Test if stdc++ can be linked statically.
53124     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53125 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53126     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53127     ac_ext=cpp
53128 ac_cpp='$CXXCPP $CPPFLAGS'
53129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53132 
53133     OLD_LIBS="$LIBS"
53134     LIBS="$STATIC_STDCXX_FLAGS"
53135     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53136 /* end confdefs.h.  */
53137 
53138 int
53139 main ()
53140 {
53141 return 0;
53142   ;
53143   return 0;
53144 }
53145 _ACEOF
53146 if ac_fn_cxx_try_link "$LINENO"; then :
53147   has_static_libstdcxx=yes
53148 else
53149   has_static_libstdcxx=no
53150 fi
53151 rm -f core conftest.err conftest.$ac_objext \
53152     conftest$ac_exeext conftest.$ac_ext
53153     LIBS="$OLD_LIBS"
53154     ac_ext=cpp
53155 ac_cpp='$CXXCPP $CPPFLAGS'
53156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53159 
53160     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53161 $as_echo "$has_static_libstdcxx" >&6; }
53162 
53163     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53164       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53165     fi
53166 
53167     # If dynamic was requested, it's available since it would fail above otherwise.
53168     # If dynamic wasn't requested, go with static unless it isn't available.
53169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53170 $as_echo_n "checking how to link with libstdc++... " >&6; }
53171     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53172         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53173       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53174 $as_echo "dynamic" >&6; }
53175     else
53176       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53177       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53178       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53179       # just use the same setting as for the TARGET toolchain.
53180       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53182 $as_echo "static" >&6; }
53183     fi
53184   fi
53185 
53186   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53187   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53188     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53189   fi
53190 
53191 
53192 
53193   # Setup Windows runtime dlls
53194   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53195 
53196 
53197 # Check whether --with-msvcr-dll was given.
53198 if test "${with_msvcr_dll+set}" = set; then :
53199   withval=$with_msvcr_dll;
53200 fi
53201 
53202 
53203   if test "x$with_msvcr_dll" != x; then
53204     # If given explicitly by user, do not probe. If not present, fail directly.
53205 
53206   DLL_NAME="$MSVCR_NAME"
53207   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53208   METHOD="--with-msvcr-dll"
53209   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53210     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53211 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53212 
53213     # Need to check if the found msvcr is correct architecture
53214     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53215 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53216     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53217     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53218       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53219       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53220       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53221         CORRECT_MSVCR_ARCH="PE32 executable"
53222       else
53223         CORRECT_MSVCR_ARCH="PE32+ executable"
53224       fi
53225     else
53226       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53227         CORRECT_MSVCR_ARCH=386
53228       else
53229         CORRECT_MSVCR_ARCH=x86-64
53230       fi
53231     fi
53232     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53233       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53234 $as_echo "ok" >&6; }
53235       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53236 
53237   # Only process if variable expands to non-empty
53238 
53239   if test "x$MSVC_DLL" != x; then
53240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53241 
53242   # Input might be given as Windows format, start by converting to
53243   # unix format.
53244   path="$MSVC_DLL"
53245   new_path=`$CYGPATH -u "$path"`
53246 
53247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53250   # "foo.exe" is OK but "foo" is an error.
53251   #
53252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53253   # It is also a way to make sure we got the proper file name for the real test later on.
53254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53255   if test "x$test_shortpath" = x; then
53256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53257 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53258     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53259   fi
53260 
53261   # Call helper function which possibly converts this using DOS-style short mode.
53262   # If so, the updated path is stored in $new_path.
53263 
53264   input_path="$new_path"
53265   # Check if we need to convert this using DOS-style short mode. If the path
53266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53267   # take no chances and rewrite it.
53268   # Note: m4 eats our [], so we need to use [ and ] instead.
53269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53270   if test "x$has_forbidden_chars" != x; then
53271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53275       # Going to short mode and back again did indeed matter. Since short mode is
53276       # case insensitive, let's make it lowercase to improve readability.
53277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53278       # Now convert it back to Unix-style (cygpath)
53279       input_path=`$CYGPATH -u "$shortmode_path"`
53280       new_path="$input_path"
53281     fi
53282   fi
53283 
53284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53285   if test "x$test_cygdrive_prefix" = x; then
53286     # As a simple fix, exclude /usr/bin since it's not a real path.
53287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53289       # a path prefixed by /cygdrive for fixpath to work.
53290       new_path="$CYGWIN_ROOT_PATH$input_path"
53291     fi
53292   fi
53293 
53294 
53295   if test "x$path" != "x$new_path"; then
53296     MSVC_DLL="$new_path"
53297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53298 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53299   fi
53300 
53301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53302 
53303   path="$MSVC_DLL"
53304   has_colon=`$ECHO $path | $GREP ^.:`
53305   new_path="$path"
53306   if test "x$has_colon" = x; then
53307     # Not in mixed or Windows style, start by that.
53308     new_path=`cmd //c echo $path`
53309   fi
53310 
53311 
53312   input_path="$new_path"
53313   # Check if we need to convert this using DOS-style short mode. If the path
53314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53315   # take no chances and rewrite it.
53316   # Note: m4 eats our [], so we need to use [ and ] instead.
53317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53318   if test "x$has_forbidden_chars" != x; then
53319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53321   fi
53322 
53323 
53324   windows_path="$new_path"
53325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53326     unix_path=`$CYGPATH -u "$windows_path"`
53327     new_path="$unix_path"
53328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53330     new_path="$unix_path"
53331   fi
53332 
53333   if test "x$path" != "x$new_path"; then
53334     MSVC_DLL="$new_path"
53335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53336 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53337   fi
53338 
53339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53341 
53342     else
53343       # We're on a unix platform. Hooray! :)
53344       path="$MSVC_DLL"
53345       has_space=`$ECHO "$path" | $GREP " "`
53346       if test "x$has_space" != x; then
53347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53348 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53349         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53350       fi
53351 
53352       # Use eval to expand a potential ~
53353       eval path="$path"
53354       if test ! -f "$path" && test ! -d "$path"; then
53355         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53356       fi
53357 
53358       if test -d "$path"; then
53359         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53360       else
53361         dir="`$DIRNAME "$path"`"
53362         base="`$BASENAME "$path"`"
53363         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53364       fi
53365     fi
53366   fi
53367 
53368       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53369 $as_echo_n "checking for $DLL_NAME... " >&6; }
53370       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53371 $as_echo "$MSVC_DLL" >&6; }
53372     else
53373       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53374 $as_echo "incorrect, ignoring" >&6; }
53375       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53376 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53377     fi
53378   fi
53379 
53380     if test "x$MSVC_DLL" = x; then
53381       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53382     fi
53383     MSVCR_DLL="$MSVC_DLL"
53384   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53385 
53386   DLL_NAME="$MSVCR_NAME"
53387   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53388   METHOD="devkit"
53389   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53390     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53391 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53392 
53393     # Need to check if the found msvcr is correct architecture
53394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53395 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53396     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53397     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53398       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53399       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53400       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53401         CORRECT_MSVCR_ARCH="PE32 executable"
53402       else
53403         CORRECT_MSVCR_ARCH="PE32+ executable"
53404       fi
53405     else
53406       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53407         CORRECT_MSVCR_ARCH=386
53408       else
53409         CORRECT_MSVCR_ARCH=x86-64
53410       fi
53411     fi
53412     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53413       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53414 $as_echo "ok" >&6; }
53415       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53416 
53417   # Only process if variable expands to non-empty
53418 
53419   if test "x$MSVC_DLL" != x; then
53420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53421 
53422   # Input might be given as Windows format, start by converting to
53423   # unix format.
53424   path="$MSVC_DLL"
53425   new_path=`$CYGPATH -u "$path"`
53426 
53427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53430   # "foo.exe" is OK but "foo" is an error.
53431   #
53432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53433   # It is also a way to make sure we got the proper file name for the real test later on.
53434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53435   if test "x$test_shortpath" = x; then
53436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53437 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53438     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53439   fi
53440 
53441   # Call helper function which possibly converts this using DOS-style short mode.
53442   # If so, the updated path is stored in $new_path.
53443 
53444   input_path="$new_path"
53445   # Check if we need to convert this using DOS-style short mode. If the path
53446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53447   # take no chances and rewrite it.
53448   # Note: m4 eats our [], so we need to use [ and ] instead.
53449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53450   if test "x$has_forbidden_chars" != x; then
53451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53455       # Going to short mode and back again did indeed matter. Since short mode is
53456       # case insensitive, let's make it lowercase to improve readability.
53457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53458       # Now convert it back to Unix-style (cygpath)
53459       input_path=`$CYGPATH -u "$shortmode_path"`
53460       new_path="$input_path"
53461     fi
53462   fi
53463 
53464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53465   if test "x$test_cygdrive_prefix" = x; then
53466     # As a simple fix, exclude /usr/bin since it's not a real path.
53467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53469       # a path prefixed by /cygdrive for fixpath to work.
53470       new_path="$CYGWIN_ROOT_PATH$input_path"
53471     fi
53472   fi
53473 
53474 
53475   if test "x$path" != "x$new_path"; then
53476     MSVC_DLL="$new_path"
53477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53478 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53479   fi
53480 
53481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53482 
53483   path="$MSVC_DLL"
53484   has_colon=`$ECHO $path | $GREP ^.:`
53485   new_path="$path"
53486   if test "x$has_colon" = x; then
53487     # Not in mixed or Windows style, start by that.
53488     new_path=`cmd //c echo $path`
53489   fi
53490 
53491 
53492   input_path="$new_path"
53493   # Check if we need to convert this using DOS-style short mode. If the path
53494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53495   # take no chances and rewrite it.
53496   # Note: m4 eats our [], so we need to use [ and ] instead.
53497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53498   if test "x$has_forbidden_chars" != x; then
53499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53501   fi
53502 
53503 
53504   windows_path="$new_path"
53505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53506     unix_path=`$CYGPATH -u "$windows_path"`
53507     new_path="$unix_path"
53508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53510     new_path="$unix_path"
53511   fi
53512 
53513   if test "x$path" != "x$new_path"; then
53514     MSVC_DLL="$new_path"
53515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53516 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53517   fi
53518 
53519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53521 
53522     else
53523       # We're on a unix platform. Hooray! :)
53524       path="$MSVC_DLL"
53525       has_space=`$ECHO "$path" | $GREP " "`
53526       if test "x$has_space" != x; then
53527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53528 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53529         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53530       fi
53531 
53532       # Use eval to expand a potential ~
53533       eval path="$path"
53534       if test ! -f "$path" && test ! -d "$path"; then
53535         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53536       fi
53537 
53538       if test -d "$path"; then
53539         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53540       else
53541         dir="`$DIRNAME "$path"`"
53542         base="`$BASENAME "$path"`"
53543         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53544       fi
53545     fi
53546   fi
53547 
53548       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53549 $as_echo_n "checking for $DLL_NAME... " >&6; }
53550       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53551 $as_echo "$MSVC_DLL" >&6; }
53552     else
53553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53554 $as_echo "incorrect, ignoring" >&6; }
53555       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53556 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53557     fi
53558   fi
53559 
53560     if test "x$MSVC_DLL" = x; then
53561       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53562     fi
53563     MSVCR_DLL="$MSVC_DLL"
53564   else
53565 
53566   DLL_NAME="${MSVCR_NAME}"
53567   MSVC_DLL=
53568 
53569   if test "x$MSVC_DLL" = x; then
53570     # Probe: Using well-known location from Visual Studio 10.0
53571     if test "x$VCINSTALLDIR" != x; then
53572       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53573 
53574   windows_path="$CYGWIN_VC_INSTALL_DIR"
53575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53576     unix_path=`$CYGPATH -u "$windows_path"`
53577     CYGWIN_VC_INSTALL_DIR="$unix_path"
53578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53580     CYGWIN_VC_INSTALL_DIR="$unix_path"
53581   fi
53582 
53583       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53584         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53585       else
53586         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53587       fi
53588       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53589 
53590   DLL_NAME="$DLL_NAME"
53591   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53592   METHOD="well-known location in VCINSTALLDIR"
53593   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53594     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53595 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53596 
53597     # Need to check if the found msvcr is correct architecture
53598     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53599 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53600     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53601     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53602       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53603       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53604       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53605         CORRECT_MSVCR_ARCH="PE32 executable"
53606       else
53607         CORRECT_MSVCR_ARCH="PE32+ executable"
53608       fi
53609     else
53610       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53611         CORRECT_MSVCR_ARCH=386
53612       else
53613         CORRECT_MSVCR_ARCH=x86-64
53614       fi
53615     fi
53616     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53617       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53618 $as_echo "ok" >&6; }
53619       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53620 
53621   # Only process if variable expands to non-empty
53622 
53623   if test "x$MSVC_DLL" != x; then
53624     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53625 
53626   # Input might be given as Windows format, start by converting to
53627   # unix format.
53628   path="$MSVC_DLL"
53629   new_path=`$CYGPATH -u "$path"`
53630 
53631   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53632   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53633   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53634   # "foo.exe" is OK but "foo" is an error.
53635   #
53636   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53637   # It is also a way to make sure we got the proper file name for the real test later on.
53638   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53639   if test "x$test_shortpath" = x; then
53640     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53641 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53642     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53643   fi
53644 
53645   # Call helper function which possibly converts this using DOS-style short mode.
53646   # If so, the updated path is stored in $new_path.
53647 
53648   input_path="$new_path"
53649   # Check if we need to convert this using DOS-style short mode. If the path
53650   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53651   # take no chances and rewrite it.
53652   # Note: m4 eats our [], so we need to use [ and ] instead.
53653   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53654   if test "x$has_forbidden_chars" != x; then
53655     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53656     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53657     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53658     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53659       # Going to short mode and back again did indeed matter. Since short mode is
53660       # case insensitive, let's make it lowercase to improve readability.
53661       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53662       # Now convert it back to Unix-style (cygpath)
53663       input_path=`$CYGPATH -u "$shortmode_path"`
53664       new_path="$input_path"
53665     fi
53666   fi
53667 
53668   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53669   if test "x$test_cygdrive_prefix" = x; then
53670     # As a simple fix, exclude /usr/bin since it's not a real path.
53671     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53672       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53673       # a path prefixed by /cygdrive for fixpath to work.
53674       new_path="$CYGWIN_ROOT_PATH$input_path"
53675     fi
53676   fi
53677 
53678 
53679   if test "x$path" != "x$new_path"; then
53680     MSVC_DLL="$new_path"
53681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53682 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53683   fi
53684 
53685     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53686 
53687   path="$MSVC_DLL"
53688   has_colon=`$ECHO $path | $GREP ^.:`
53689   new_path="$path"
53690   if test "x$has_colon" = x; then
53691     # Not in mixed or Windows style, start by that.
53692     new_path=`cmd //c echo $path`
53693   fi
53694 
53695 
53696   input_path="$new_path"
53697   # Check if we need to convert this using DOS-style short mode. If the path
53698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53699   # take no chances and rewrite it.
53700   # Note: m4 eats our [], so we need to use [ and ] instead.
53701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53702   if test "x$has_forbidden_chars" != x; then
53703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53704     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53705   fi
53706 
53707 
53708   windows_path="$new_path"
53709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53710     unix_path=`$CYGPATH -u "$windows_path"`
53711     new_path="$unix_path"
53712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53714     new_path="$unix_path"
53715   fi
53716 
53717   if test "x$path" != "x$new_path"; then
53718     MSVC_DLL="$new_path"
53719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53720 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53721   fi
53722 
53723   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53724   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53725 
53726     else
53727       # We're on a unix platform. Hooray! :)
53728       path="$MSVC_DLL"
53729       has_space=`$ECHO "$path" | $GREP " "`
53730       if test "x$has_space" != x; then
53731         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53732 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53733         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53734       fi
53735 
53736       # Use eval to expand a potential ~
53737       eval path="$path"
53738       if test ! -f "$path" && test ! -d "$path"; then
53739         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53740       fi
53741 
53742       if test -d "$path"; then
53743         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53744       else
53745         dir="`$DIRNAME "$path"`"
53746         base="`$BASENAME "$path"`"
53747         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53748       fi
53749     fi
53750   fi
53751 
53752       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53753 $as_echo_n "checking for $DLL_NAME... " >&6; }
53754       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53755 $as_echo "$MSVC_DLL" >&6; }
53756     else
53757       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53758 $as_echo "incorrect, ignoring" >&6; }
53759       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53760 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53761     fi
53762   fi
53763 
53764     fi
53765   fi
53766 
53767   if test "x$MSVC_DLL" = x; then
53768     # Probe: Check in the Boot JDK directory.
53769     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53770 
53771   DLL_NAME="$DLL_NAME"
53772   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53773   METHOD="well-known location in Boot JDK"
53774   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53775     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53776 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53777 
53778     # Need to check if the found msvcr is correct architecture
53779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53780 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53781     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53783       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53784       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53785       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53786         CORRECT_MSVCR_ARCH="PE32 executable"
53787       else
53788         CORRECT_MSVCR_ARCH="PE32+ executable"
53789       fi
53790     else
53791       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53792         CORRECT_MSVCR_ARCH=386
53793       else
53794         CORRECT_MSVCR_ARCH=x86-64
53795       fi
53796     fi
53797     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53799 $as_echo "ok" >&6; }
53800       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53801 
53802   # Only process if variable expands to non-empty
53803 
53804   if test "x$MSVC_DLL" != x; then
53805     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53806 
53807   # Input might be given as Windows format, start by converting to
53808   # unix format.
53809   path="$MSVC_DLL"
53810   new_path=`$CYGPATH -u "$path"`
53811 
53812   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53813   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53814   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53815   # "foo.exe" is OK but "foo" is an error.
53816   #
53817   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53818   # It is also a way to make sure we got the proper file name for the real test later on.
53819   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53820   if test "x$test_shortpath" = x; then
53821     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53822 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53823     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53824   fi
53825 
53826   # Call helper function which possibly converts this using DOS-style short mode.
53827   # If so, the updated path is stored in $new_path.
53828 
53829   input_path="$new_path"
53830   # Check if we need to convert this using DOS-style short mode. If the path
53831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53832   # take no chances and rewrite it.
53833   # Note: m4 eats our [], so we need to use [ and ] instead.
53834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53835   if test "x$has_forbidden_chars" != x; then
53836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53837     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53838     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53839     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53840       # Going to short mode and back again did indeed matter. Since short mode is
53841       # case insensitive, let's make it lowercase to improve readability.
53842       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53843       # Now convert it back to Unix-style (cygpath)
53844       input_path=`$CYGPATH -u "$shortmode_path"`
53845       new_path="$input_path"
53846     fi
53847   fi
53848 
53849   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53850   if test "x$test_cygdrive_prefix" = x; then
53851     # As a simple fix, exclude /usr/bin since it's not a real path.
53852     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53853       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53854       # a path prefixed by /cygdrive for fixpath to work.
53855       new_path="$CYGWIN_ROOT_PATH$input_path"
53856     fi
53857   fi
53858 
53859 
53860   if test "x$path" != "x$new_path"; then
53861     MSVC_DLL="$new_path"
53862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53863 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53864   fi
53865 
53866     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53867 
53868   path="$MSVC_DLL"
53869   has_colon=`$ECHO $path | $GREP ^.:`
53870   new_path="$path"
53871   if test "x$has_colon" = x; then
53872     # Not in mixed or Windows style, start by that.
53873     new_path=`cmd //c echo $path`
53874   fi
53875 
53876 
53877   input_path="$new_path"
53878   # Check if we need to convert this using DOS-style short mode. If the path
53879   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53880   # take no chances and rewrite it.
53881   # Note: m4 eats our [], so we need to use [ and ] instead.
53882   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53883   if test "x$has_forbidden_chars" != x; then
53884     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53885     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53886   fi
53887 
53888 
53889   windows_path="$new_path"
53890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53891     unix_path=`$CYGPATH -u "$windows_path"`
53892     new_path="$unix_path"
53893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53895     new_path="$unix_path"
53896   fi
53897 
53898   if test "x$path" != "x$new_path"; then
53899     MSVC_DLL="$new_path"
53900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53901 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53902   fi
53903 
53904   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53905   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53906 
53907     else
53908       # We're on a unix platform. Hooray! :)
53909       path="$MSVC_DLL"
53910       has_space=`$ECHO "$path" | $GREP " "`
53911       if test "x$has_space" != x; then
53912         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53913 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53914         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53915       fi
53916 
53917       # Use eval to expand a potential ~
53918       eval path="$path"
53919       if test ! -f "$path" && test ! -d "$path"; then
53920         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53921       fi
53922 
53923       if test -d "$path"; then
53924         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53925       else
53926         dir="`$DIRNAME "$path"`"
53927         base="`$BASENAME "$path"`"
53928         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53929       fi
53930     fi
53931   fi
53932 
53933       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53934 $as_echo_n "checking for $DLL_NAME... " >&6; }
53935       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53936 $as_echo "$MSVC_DLL" >&6; }
53937     else
53938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53939 $as_echo "incorrect, ignoring" >&6; }
53940       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53941 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53942     fi
53943   fi
53944 
53945   fi
53946 
53947   if test "x$MSVC_DLL" = x; then
53948     # Probe: Look in the Windows system32 directory
53949     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53950 
53951   windows_path="$CYGWIN_SYSTEMROOT"
53952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53953     unix_path=`$CYGPATH -u "$windows_path"`
53954     CYGWIN_SYSTEMROOT="$unix_path"
53955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53957     CYGWIN_SYSTEMROOT="$unix_path"
53958   fi
53959 
53960     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53961 
53962   DLL_NAME="$DLL_NAME"
53963   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53964   METHOD="well-known location in SYSTEMROOT"
53965   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53966     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53967 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53968 
53969     # Need to check if the found msvcr is correct architecture
53970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53971 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53972     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53973     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53974       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53975       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53976       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53977         CORRECT_MSVCR_ARCH="PE32 executable"
53978       else
53979         CORRECT_MSVCR_ARCH="PE32+ executable"
53980       fi
53981     else
53982       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53983         CORRECT_MSVCR_ARCH=386
53984       else
53985         CORRECT_MSVCR_ARCH=x86-64
53986       fi
53987     fi
53988     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53989       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53990 $as_echo "ok" >&6; }
53991       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53992 
53993   # Only process if variable expands to non-empty
53994 
53995   if test "x$MSVC_DLL" != x; then
53996     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53997 
53998   # Input might be given as Windows format, start by converting to
53999   # unix format.
54000   path="$MSVC_DLL"
54001   new_path=`$CYGPATH -u "$path"`
54002 
54003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54006   # "foo.exe" is OK but "foo" is an error.
54007   #
54008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54009   # It is also a way to make sure we got the proper file name for the real test later on.
54010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54011   if test "x$test_shortpath" = x; then
54012     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54013 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54014     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54015   fi
54016 
54017   # Call helper function which possibly converts this using DOS-style short mode.
54018   # If so, the updated path is stored in $new_path.
54019 
54020   input_path="$new_path"
54021   # Check if we need to convert this using DOS-style short mode. If the path
54022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54023   # take no chances and rewrite it.
54024   # Note: m4 eats our [], so we need to use [ and ] instead.
54025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54026   if test "x$has_forbidden_chars" != x; then
54027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54031       # Going to short mode and back again did indeed matter. Since short mode is
54032       # case insensitive, let's make it lowercase to improve readability.
54033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54034       # Now convert it back to Unix-style (cygpath)
54035       input_path=`$CYGPATH -u "$shortmode_path"`
54036       new_path="$input_path"
54037     fi
54038   fi
54039 
54040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54041   if test "x$test_cygdrive_prefix" = x; then
54042     # As a simple fix, exclude /usr/bin since it's not a real path.
54043     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54045       # a path prefixed by /cygdrive for fixpath to work.
54046       new_path="$CYGWIN_ROOT_PATH$input_path"
54047     fi
54048   fi
54049 
54050 
54051   if test "x$path" != "x$new_path"; then
54052     MSVC_DLL="$new_path"
54053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54054 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54055   fi
54056 
54057     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54058 
54059   path="$MSVC_DLL"
54060   has_colon=`$ECHO $path | $GREP ^.:`
54061   new_path="$path"
54062   if test "x$has_colon" = x; then
54063     # Not in mixed or Windows style, start by that.
54064     new_path=`cmd //c echo $path`
54065   fi
54066 
54067 
54068   input_path="$new_path"
54069   # Check if we need to convert this using DOS-style short mode. If the path
54070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54071   # take no chances and rewrite it.
54072   # Note: m4 eats our [], so we need to use [ and ] instead.
54073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54074   if test "x$has_forbidden_chars" != x; then
54075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54077   fi
54078 
54079 
54080   windows_path="$new_path"
54081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54082     unix_path=`$CYGPATH -u "$windows_path"`
54083     new_path="$unix_path"
54084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54086     new_path="$unix_path"
54087   fi
54088 
54089   if test "x$path" != "x$new_path"; then
54090     MSVC_DLL="$new_path"
54091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54092 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54093   fi
54094 
54095   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54096   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54097 
54098     else
54099       # We're on a unix platform. Hooray! :)
54100       path="$MSVC_DLL"
54101       has_space=`$ECHO "$path" | $GREP " "`
54102       if test "x$has_space" != x; then
54103         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54104 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54105         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54106       fi
54107 
54108       # Use eval to expand a potential ~
54109       eval path="$path"
54110       if test ! -f "$path" && test ! -d "$path"; then
54111         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54112       fi
54113 
54114       if test -d "$path"; then
54115         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54116       else
54117         dir="`$DIRNAME "$path"`"
54118         base="`$BASENAME "$path"`"
54119         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54120       fi
54121     fi
54122   fi
54123 
54124       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54125 $as_echo_n "checking for $DLL_NAME... " >&6; }
54126       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54127 $as_echo "$MSVC_DLL" >&6; }
54128     else
54129       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54130 $as_echo "incorrect, ignoring" >&6; }
54131       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54132 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54133     fi
54134   fi
54135 
54136   fi
54137 
54138   if test "x$MSVC_DLL" = x; then
54139     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54140     if test "x$VS100COMNTOOLS" != x; then
54141       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54142 
54143   windows_path="$CYGWIN_VS_TOOLS_DIR"
54144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54145     unix_path=`$CYGPATH -u "$windows_path"`
54146     CYGWIN_VS_TOOLS_DIR="$unix_path"
54147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54149     CYGWIN_VS_TOOLS_DIR="$unix_path"
54150   fi
54151 
54152       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54153         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54154             | $GREP -i /x64/ | $HEAD --lines 1`
54155       else
54156         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54157             | $GREP -i /x86/ | $HEAD --lines 1`
54158       fi
54159 
54160   DLL_NAME="$DLL_NAME"
54161   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54162   METHOD="search of VS100COMNTOOLS"
54163   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54164     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54165 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54166 
54167     # Need to check if the found msvcr is correct architecture
54168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54169 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54170     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54171     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54172       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54173       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54174       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54175         CORRECT_MSVCR_ARCH="PE32 executable"
54176       else
54177         CORRECT_MSVCR_ARCH="PE32+ executable"
54178       fi
54179     else
54180       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54181         CORRECT_MSVCR_ARCH=386
54182       else
54183         CORRECT_MSVCR_ARCH=x86-64
54184       fi
54185     fi
54186     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54188 $as_echo "ok" >&6; }
54189       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54190 
54191   # Only process if variable expands to non-empty
54192 
54193   if test "x$MSVC_DLL" != x; then
54194     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195 
54196   # Input might be given as Windows format, start by converting to
54197   # unix format.
54198   path="$MSVC_DLL"
54199   new_path=`$CYGPATH -u "$path"`
54200 
54201   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54202   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54203   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54204   # "foo.exe" is OK but "foo" is an error.
54205   #
54206   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54207   # It is also a way to make sure we got the proper file name for the real test later on.
54208   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54209   if test "x$test_shortpath" = x; then
54210     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54211 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54212     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54213   fi
54214 
54215   # Call helper function which possibly converts this using DOS-style short mode.
54216   # If so, the updated path is stored in $new_path.
54217 
54218   input_path="$new_path"
54219   # Check if we need to convert this using DOS-style short mode. If the path
54220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54221   # take no chances and rewrite it.
54222   # Note: m4 eats our [], so we need to use [ and ] instead.
54223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54224   if test "x$has_forbidden_chars" != x; then
54225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54226     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54227     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54228     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54229       # Going to short mode and back again did indeed matter. Since short mode is
54230       # case insensitive, let's make it lowercase to improve readability.
54231       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54232       # Now convert it back to Unix-style (cygpath)
54233       input_path=`$CYGPATH -u "$shortmode_path"`
54234       new_path="$input_path"
54235     fi
54236   fi
54237 
54238   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54239   if test "x$test_cygdrive_prefix" = x; then
54240     # As a simple fix, exclude /usr/bin since it's not a real path.
54241     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54242       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54243       # a path prefixed by /cygdrive for fixpath to work.
54244       new_path="$CYGWIN_ROOT_PATH$input_path"
54245     fi
54246   fi
54247 
54248 
54249   if test "x$path" != "x$new_path"; then
54250     MSVC_DLL="$new_path"
54251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54252 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54253   fi
54254 
54255     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54256 
54257   path="$MSVC_DLL"
54258   has_colon=`$ECHO $path | $GREP ^.:`
54259   new_path="$path"
54260   if test "x$has_colon" = x; then
54261     # Not in mixed or Windows style, start by that.
54262     new_path=`cmd //c echo $path`
54263   fi
54264 
54265 
54266   input_path="$new_path"
54267   # Check if we need to convert this using DOS-style short mode. If the path
54268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54269   # take no chances and rewrite it.
54270   # Note: m4 eats our [], so we need to use [ and ] instead.
54271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54272   if test "x$has_forbidden_chars" != x; then
54273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54274     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54275   fi
54276 
54277 
54278   windows_path="$new_path"
54279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54280     unix_path=`$CYGPATH -u "$windows_path"`
54281     new_path="$unix_path"
54282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54283     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54284     new_path="$unix_path"
54285   fi
54286 
54287   if test "x$path" != "x$new_path"; then
54288     MSVC_DLL="$new_path"
54289     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54290 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54291   fi
54292 
54293   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54294   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54295 
54296     else
54297       # We're on a unix platform. Hooray! :)
54298       path="$MSVC_DLL"
54299       has_space=`$ECHO "$path" | $GREP " "`
54300       if test "x$has_space" != x; then
54301         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54302 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54303         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54304       fi
54305 
54306       # Use eval to expand a potential ~
54307       eval path="$path"
54308       if test ! -f "$path" && test ! -d "$path"; then
54309         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54310       fi
54311 
54312       if test -d "$path"; then
54313         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54314       else
54315         dir="`$DIRNAME "$path"`"
54316         base="`$BASENAME "$path"`"
54317         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54318       fi
54319     fi
54320   fi
54321 
54322       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54323 $as_echo_n "checking for $DLL_NAME... " >&6; }
54324       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54325 $as_echo "$MSVC_DLL" >&6; }
54326     else
54327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54328 $as_echo "incorrect, ignoring" >&6; }
54329       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54330 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54331     fi
54332   fi
54333 
54334     fi
54335   fi
54336 
54337   if test "x$MSVC_DLL" = x; then
54338     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54339     # (This was the original behaviour; kept since it might turn something up)
54340     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54341       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54342         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54343             | $GREP x64 | $HEAD --lines 1`
54344       else
54345         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54346             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54347         if test "x$POSSIBLE_MSVC_DLL" = x; then
54348           # We're grasping at straws now...
54349           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54350               | $HEAD --lines 1`
54351         fi
54352       fi
54353 
54354 
54355   DLL_NAME="$DLL_NAME"
54356   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54357   METHOD="search of VCINSTALLDIR"
54358   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54359     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54360 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54361 
54362     # Need to check if the found msvcr is correct architecture
54363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54364 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54365     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54366     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54367       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54368       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54369       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54370         CORRECT_MSVCR_ARCH="PE32 executable"
54371       else
54372         CORRECT_MSVCR_ARCH="PE32+ executable"
54373       fi
54374     else
54375       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54376         CORRECT_MSVCR_ARCH=386
54377       else
54378         CORRECT_MSVCR_ARCH=x86-64
54379       fi
54380     fi
54381     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54382       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54383 $as_echo "ok" >&6; }
54384       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54385 
54386   # Only process if variable expands to non-empty
54387 
54388   if test "x$MSVC_DLL" != x; then
54389     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54390 
54391   # Input might be given as Windows format, start by converting to
54392   # unix format.
54393   path="$MSVC_DLL"
54394   new_path=`$CYGPATH -u "$path"`
54395 
54396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54399   # "foo.exe" is OK but "foo" is an error.
54400   #
54401   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54402   # It is also a way to make sure we got the proper file name for the real test later on.
54403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54404   if test "x$test_shortpath" = x; then
54405     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54406 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54407     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54408   fi
54409 
54410   # Call helper function which possibly converts this using DOS-style short mode.
54411   # If so, the updated path is stored in $new_path.
54412 
54413   input_path="$new_path"
54414   # Check if we need to convert this using DOS-style short mode. If the path
54415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54416   # take no chances and rewrite it.
54417   # Note: m4 eats our [], so we need to use [ and ] instead.
54418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54419   if test "x$has_forbidden_chars" != x; then
54420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54424       # Going to short mode and back again did indeed matter. Since short mode is
54425       # case insensitive, let's make it lowercase to improve readability.
54426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54427       # Now convert it back to Unix-style (cygpath)
54428       input_path=`$CYGPATH -u "$shortmode_path"`
54429       new_path="$input_path"
54430     fi
54431   fi
54432 
54433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54434   if test "x$test_cygdrive_prefix" = x; then
54435     # As a simple fix, exclude /usr/bin since it's not a real path.
54436     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54438       # a path prefixed by /cygdrive for fixpath to work.
54439       new_path="$CYGWIN_ROOT_PATH$input_path"
54440     fi
54441   fi
54442 
54443 
54444   if test "x$path" != "x$new_path"; then
54445     MSVC_DLL="$new_path"
54446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54447 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54448   fi
54449 
54450     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54451 
54452   path="$MSVC_DLL"
54453   has_colon=`$ECHO $path | $GREP ^.:`
54454   new_path="$path"
54455   if test "x$has_colon" = x; then
54456     # Not in mixed or Windows style, start by that.
54457     new_path=`cmd //c echo $path`
54458   fi
54459 
54460 
54461   input_path="$new_path"
54462   # Check if we need to convert this using DOS-style short mode. If the path
54463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54464   # take no chances and rewrite it.
54465   # Note: m4 eats our [], so we need to use [ and ] instead.
54466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54467   if test "x$has_forbidden_chars" != x; then
54468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54469     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54470   fi
54471 
54472 
54473   windows_path="$new_path"
54474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54475     unix_path=`$CYGPATH -u "$windows_path"`
54476     new_path="$unix_path"
54477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54479     new_path="$unix_path"
54480   fi
54481 
54482   if test "x$path" != "x$new_path"; then
54483     MSVC_DLL="$new_path"
54484     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54485 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54486   fi
54487 
54488   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54489   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54490 
54491     else
54492       # We're on a unix platform. Hooray! :)
54493       path="$MSVC_DLL"
54494       has_space=`$ECHO "$path" | $GREP " "`
54495       if test "x$has_space" != x; then
54496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54497 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54498         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54499       fi
54500 
54501       # Use eval to expand a potential ~
54502       eval path="$path"
54503       if test ! -f "$path" && test ! -d "$path"; then
54504         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54505       fi
54506 
54507       if test -d "$path"; then
54508         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54509       else
54510         dir="`$DIRNAME "$path"`"
54511         base="`$BASENAME "$path"`"
54512         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54513       fi
54514     fi
54515   fi
54516 
54517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54518 $as_echo_n "checking for $DLL_NAME... " >&6; }
54519       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54520 $as_echo "$MSVC_DLL" >&6; }
54521     else
54522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54523 $as_echo "incorrect, ignoring" >&6; }
54524       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54525 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54526     fi
54527   fi
54528 
54529     fi
54530   fi
54531 
54532   if test "x$MSVC_DLL" = x; then
54533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54534 $as_echo_n "checking for $DLL_NAME... " >&6; }
54535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54536 $as_echo "no" >&6; }
54537     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54538   fi
54539 
54540     MSVCR_DLL="$MSVC_DLL"
54541   fi
54542 
54543 
54544 
54545 # Check whether --with-msvcp-dll was given.
54546 if test "${with_msvcp_dll+set}" = set; then :
54547   withval=$with_msvcp_dll;
54548 fi
54549 
54550 
54551   if test "x$MSVCP_NAME" != "x"; then
54552     if test "x$with_msvcp_dll" != x; then
54553       # If given explicitly by user, do not probe. If not present, fail directly.
54554 
54555   DLL_NAME="$MSVCP_NAME"
54556   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54557   METHOD="--with-msvcp-dll"
54558   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54559     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54560 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54561 
54562     # Need to check if the found msvcr is correct architecture
54563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54564 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54565     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54566     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54567       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54568       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54569       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54570         CORRECT_MSVCR_ARCH="PE32 executable"
54571       else
54572         CORRECT_MSVCR_ARCH="PE32+ executable"
54573       fi
54574     else
54575       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54576         CORRECT_MSVCR_ARCH=386
54577       else
54578         CORRECT_MSVCR_ARCH=x86-64
54579       fi
54580     fi
54581     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54582       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54583 $as_echo "ok" >&6; }
54584       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54585 
54586   # Only process if variable expands to non-empty
54587 
54588   if test "x$MSVC_DLL" != x; then
54589     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54590 
54591   # Input might be given as Windows format, start by converting to
54592   # unix format.
54593   path="$MSVC_DLL"
54594   new_path=`$CYGPATH -u "$path"`
54595 
54596   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54597   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54598   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54599   # "foo.exe" is OK but "foo" is an error.
54600   #
54601   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54602   # It is also a way to make sure we got the proper file name for the real test later on.
54603   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54604   if test "x$test_shortpath" = x; then
54605     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54606 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54607     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54608   fi
54609 
54610   # Call helper function which possibly converts this using DOS-style short mode.
54611   # If so, the updated path is stored in $new_path.
54612 
54613   input_path="$new_path"
54614   # Check if we need to convert this using DOS-style short mode. If the path
54615   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54616   # take no chances and rewrite it.
54617   # Note: m4 eats our [], so we need to use [ and ] instead.
54618   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54619   if test "x$has_forbidden_chars" != x; then
54620     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54621     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54622     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54623     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54624       # Going to short mode and back again did indeed matter. Since short mode is
54625       # case insensitive, let's make it lowercase to improve readability.
54626       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54627       # Now convert it back to Unix-style (cygpath)
54628       input_path=`$CYGPATH -u "$shortmode_path"`
54629       new_path="$input_path"
54630     fi
54631   fi
54632 
54633   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54634   if test "x$test_cygdrive_prefix" = x; then
54635     # As a simple fix, exclude /usr/bin since it's not a real path.
54636     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54637       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54638       # a path prefixed by /cygdrive for fixpath to work.
54639       new_path="$CYGWIN_ROOT_PATH$input_path"
54640     fi
54641   fi
54642 
54643 
54644   if test "x$path" != "x$new_path"; then
54645     MSVC_DLL="$new_path"
54646     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54647 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54648   fi
54649 
54650     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54651 
54652   path="$MSVC_DLL"
54653   has_colon=`$ECHO $path | $GREP ^.:`
54654   new_path="$path"
54655   if test "x$has_colon" = x; then
54656     # Not in mixed or Windows style, start by that.
54657     new_path=`cmd //c echo $path`
54658   fi
54659 
54660 
54661   input_path="$new_path"
54662   # Check if we need to convert this using DOS-style short mode. If the path
54663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54664   # take no chances and rewrite it.
54665   # Note: m4 eats our [], so we need to use [ and ] instead.
54666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54667   if test "x$has_forbidden_chars" != x; then
54668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54669     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54670   fi
54671 
54672 
54673   windows_path="$new_path"
54674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54675     unix_path=`$CYGPATH -u "$windows_path"`
54676     new_path="$unix_path"
54677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54679     new_path="$unix_path"
54680   fi
54681 
54682   if test "x$path" != "x$new_path"; then
54683     MSVC_DLL="$new_path"
54684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54685 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54686   fi
54687 
54688   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54689   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54690 
54691     else
54692       # We're on a unix platform. Hooray! :)
54693       path="$MSVC_DLL"
54694       has_space=`$ECHO "$path" | $GREP " "`
54695       if test "x$has_space" != x; then
54696         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54697 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54698         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54699       fi
54700 
54701       # Use eval to expand a potential ~
54702       eval path="$path"
54703       if test ! -f "$path" && test ! -d "$path"; then
54704         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54705       fi
54706 
54707       if test -d "$path"; then
54708         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54709       else
54710         dir="`$DIRNAME "$path"`"
54711         base="`$BASENAME "$path"`"
54712         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54713       fi
54714     fi
54715   fi
54716 
54717       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54718 $as_echo_n "checking for $DLL_NAME... " >&6; }
54719       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54720 $as_echo "$MSVC_DLL" >&6; }
54721     else
54722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54723 $as_echo "incorrect, ignoring" >&6; }
54724       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54725 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54726     fi
54727   fi
54728 
54729       if test "x$MSVC_DLL" = x; then
54730         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54731       fi
54732       MSVCP_DLL="$MSVC_DLL"
54733     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54734 
54735   DLL_NAME="$MSVCP_NAME"
54736   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54737   METHOD="devkit"
54738   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54739     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54740 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54741 
54742     # Need to check if the found msvcr is correct architecture
54743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54744 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54745     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54747       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54748       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54749       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54750         CORRECT_MSVCR_ARCH="PE32 executable"
54751       else
54752         CORRECT_MSVCR_ARCH="PE32+ executable"
54753       fi
54754     else
54755       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54756         CORRECT_MSVCR_ARCH=386
54757       else
54758         CORRECT_MSVCR_ARCH=x86-64
54759       fi
54760     fi
54761     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54762       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54763 $as_echo "ok" >&6; }
54764       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54765 
54766   # Only process if variable expands to non-empty
54767 
54768   if test "x$MSVC_DLL" != x; then
54769     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54770 
54771   # Input might be given as Windows format, start by converting to
54772   # unix format.
54773   path="$MSVC_DLL"
54774   new_path=`$CYGPATH -u "$path"`
54775 
54776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54779   # "foo.exe" is OK but "foo" is an error.
54780   #
54781   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54782   # It is also a way to make sure we got the proper file name for the real test later on.
54783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54784   if test "x$test_shortpath" = x; then
54785     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54786 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54787     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54788   fi
54789 
54790   # Call helper function which possibly converts this using DOS-style short mode.
54791   # If so, the updated path is stored in $new_path.
54792 
54793   input_path="$new_path"
54794   # Check if we need to convert this using DOS-style short mode. If the path
54795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54796   # take no chances and rewrite it.
54797   # Note: m4 eats our [], so we need to use [ and ] instead.
54798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54799   if test "x$has_forbidden_chars" != x; then
54800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54801     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54802     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54803     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54804       # Going to short mode and back again did indeed matter. Since short mode is
54805       # case insensitive, let's make it lowercase to improve readability.
54806       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54807       # Now convert it back to Unix-style (cygpath)
54808       input_path=`$CYGPATH -u "$shortmode_path"`
54809       new_path="$input_path"
54810     fi
54811   fi
54812 
54813   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54814   if test "x$test_cygdrive_prefix" = x; then
54815     # As a simple fix, exclude /usr/bin since it's not a real path.
54816     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54817       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54818       # a path prefixed by /cygdrive for fixpath to work.
54819       new_path="$CYGWIN_ROOT_PATH$input_path"
54820     fi
54821   fi
54822 
54823 
54824   if test "x$path" != "x$new_path"; then
54825     MSVC_DLL="$new_path"
54826     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54827 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54828   fi
54829 
54830     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54831 
54832   path="$MSVC_DLL"
54833   has_colon=`$ECHO $path | $GREP ^.:`
54834   new_path="$path"
54835   if test "x$has_colon" = x; then
54836     # Not in mixed or Windows style, start by that.
54837     new_path=`cmd //c echo $path`
54838   fi
54839 
54840 
54841   input_path="$new_path"
54842   # Check if we need to convert this using DOS-style short mode. If the path
54843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54844   # take no chances and rewrite it.
54845   # Note: m4 eats our [], so we need to use [ and ] instead.
54846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54847   if test "x$has_forbidden_chars" != x; then
54848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54849     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54850   fi
54851 
54852 
54853   windows_path="$new_path"
54854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54855     unix_path=`$CYGPATH -u "$windows_path"`
54856     new_path="$unix_path"
54857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54859     new_path="$unix_path"
54860   fi
54861 
54862   if test "x$path" != "x$new_path"; then
54863     MSVC_DLL="$new_path"
54864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54865 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54866   fi
54867 
54868   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54869   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54870 
54871     else
54872       # We're on a unix platform. Hooray! :)
54873       path="$MSVC_DLL"
54874       has_space=`$ECHO "$path" | $GREP " "`
54875       if test "x$has_space" != x; then
54876         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54877 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54878         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54879       fi
54880 
54881       # Use eval to expand a potential ~
54882       eval path="$path"
54883       if test ! -f "$path" && test ! -d "$path"; then
54884         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54885       fi
54886 
54887       if test -d "$path"; then
54888         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54889       else
54890         dir="`$DIRNAME "$path"`"
54891         base="`$BASENAME "$path"`"
54892         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54893       fi
54894     fi
54895   fi
54896 
54897       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54898 $as_echo_n "checking for $DLL_NAME... " >&6; }
54899       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54900 $as_echo "$MSVC_DLL" >&6; }
54901     else
54902       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54903 $as_echo "incorrect, ignoring" >&6; }
54904       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54905 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54906     fi
54907   fi
54908 
54909       if test "x$MSVC_DLL" = x; then
54910         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54911       fi
54912       MSVCP_DLL="$MSVC_DLL"
54913     else
54914 
54915   DLL_NAME="${MSVCP_NAME}"
54916   MSVC_DLL=
54917 
54918   if test "x$MSVC_DLL" = x; then
54919     # Probe: Using well-known location from Visual Studio 10.0
54920     if test "x$VCINSTALLDIR" != x; then
54921       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54922 
54923   windows_path="$CYGWIN_VC_INSTALL_DIR"
54924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54925     unix_path=`$CYGPATH -u "$windows_path"`
54926     CYGWIN_VC_INSTALL_DIR="$unix_path"
54927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54929     CYGWIN_VC_INSTALL_DIR="$unix_path"
54930   fi
54931 
54932       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54933         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54934       else
54935         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54936       fi
54937       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54938 
54939   DLL_NAME="$DLL_NAME"
54940   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54941   METHOD="well-known location in VCINSTALLDIR"
54942   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54943     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54944 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54945 
54946     # Need to check if the found msvcr is correct architecture
54947     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54948 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54949     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54951       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54952       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54953       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54954         CORRECT_MSVCR_ARCH="PE32 executable"
54955       else
54956         CORRECT_MSVCR_ARCH="PE32+ executable"
54957       fi
54958     else
54959       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54960         CORRECT_MSVCR_ARCH=386
54961       else
54962         CORRECT_MSVCR_ARCH=x86-64
54963       fi
54964     fi
54965     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54966       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54967 $as_echo "ok" >&6; }
54968       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54969 
54970   # Only process if variable expands to non-empty
54971 
54972   if test "x$MSVC_DLL" != x; then
54973     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54974 
54975   # Input might be given as Windows format, start by converting to
54976   # unix format.
54977   path="$MSVC_DLL"
54978   new_path=`$CYGPATH -u "$path"`
54979 
54980   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54981   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54982   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54983   # "foo.exe" is OK but "foo" is an error.
54984   #
54985   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54986   # It is also a way to make sure we got the proper file name for the real test later on.
54987   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54988   if test "x$test_shortpath" = x; then
54989     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54990 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54991     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54992   fi
54993 
54994   # Call helper function which possibly converts this using DOS-style short mode.
54995   # If so, the updated path is stored in $new_path.
54996 
54997   input_path="$new_path"
54998   # Check if we need to convert this using DOS-style short mode. If the path
54999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55000   # take no chances and rewrite it.
55001   # Note: m4 eats our [], so we need to use [ and ] instead.
55002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55003   if test "x$has_forbidden_chars" != x; then
55004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55005     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55006     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55007     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55008       # Going to short mode and back again did indeed matter. Since short mode is
55009       # case insensitive, let's make it lowercase to improve readability.
55010       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55011       # Now convert it back to Unix-style (cygpath)
55012       input_path=`$CYGPATH -u "$shortmode_path"`
55013       new_path="$input_path"
55014     fi
55015   fi
55016 
55017   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55018   if test "x$test_cygdrive_prefix" = x; then
55019     # As a simple fix, exclude /usr/bin since it's not a real path.
55020     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55021       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55022       # a path prefixed by /cygdrive for fixpath to work.
55023       new_path="$CYGWIN_ROOT_PATH$input_path"
55024     fi
55025   fi
55026 
55027 
55028   if test "x$path" != "x$new_path"; then
55029     MSVC_DLL="$new_path"
55030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55031 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55032   fi
55033 
55034     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55035 
55036   path="$MSVC_DLL"
55037   has_colon=`$ECHO $path | $GREP ^.:`
55038   new_path="$path"
55039   if test "x$has_colon" = x; then
55040     # Not in mixed or Windows style, start by that.
55041     new_path=`cmd //c echo $path`
55042   fi
55043 
55044 
55045   input_path="$new_path"
55046   # Check if we need to convert this using DOS-style short mode. If the path
55047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55048   # take no chances and rewrite it.
55049   # Note: m4 eats our [], so we need to use [ and ] instead.
55050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55051   if test "x$has_forbidden_chars" != x; then
55052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55053     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55054   fi
55055 
55056 
55057   windows_path="$new_path"
55058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55059     unix_path=`$CYGPATH -u "$windows_path"`
55060     new_path="$unix_path"
55061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55063     new_path="$unix_path"
55064   fi
55065 
55066   if test "x$path" != "x$new_path"; then
55067     MSVC_DLL="$new_path"
55068     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55069 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55070   fi
55071 
55072   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55073   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55074 
55075     else
55076       # We're on a unix platform. Hooray! :)
55077       path="$MSVC_DLL"
55078       has_space=`$ECHO "$path" | $GREP " "`
55079       if test "x$has_space" != x; then
55080         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55081 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55082         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55083       fi
55084 
55085       # Use eval to expand a potential ~
55086       eval path="$path"
55087       if test ! -f "$path" && test ! -d "$path"; then
55088         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55089       fi
55090 
55091       if test -d "$path"; then
55092         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55093       else
55094         dir="`$DIRNAME "$path"`"
55095         base="`$BASENAME "$path"`"
55096         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55097       fi
55098     fi
55099   fi
55100 
55101       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55102 $as_echo_n "checking for $DLL_NAME... " >&6; }
55103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55104 $as_echo "$MSVC_DLL" >&6; }
55105     else
55106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55107 $as_echo "incorrect, ignoring" >&6; }
55108       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55109 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55110     fi
55111   fi
55112 
55113     fi
55114   fi
55115 
55116   if test "x$MSVC_DLL" = x; then
55117     # Probe: Check in the Boot JDK directory.
55118     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55119 
55120   DLL_NAME="$DLL_NAME"
55121   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55122   METHOD="well-known location in Boot JDK"
55123   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55124     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55125 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55126 
55127     # Need to check if the found msvcr is correct architecture
55128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55129 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55130     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55131     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55132       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55133       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55134       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55135         CORRECT_MSVCR_ARCH="PE32 executable"
55136       else
55137         CORRECT_MSVCR_ARCH="PE32+ executable"
55138       fi
55139     else
55140       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55141         CORRECT_MSVCR_ARCH=386
55142       else
55143         CORRECT_MSVCR_ARCH=x86-64
55144       fi
55145     fi
55146     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55147       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55148 $as_echo "ok" >&6; }
55149       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55150 
55151   # Only process if variable expands to non-empty
55152 
55153   if test "x$MSVC_DLL" != x; then
55154     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55155 
55156   # Input might be given as Windows format, start by converting to
55157   # unix format.
55158   path="$MSVC_DLL"
55159   new_path=`$CYGPATH -u "$path"`
55160 
55161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55164   # "foo.exe" is OK but "foo" is an error.
55165   #
55166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55167   # It is also a way to make sure we got the proper file name for the real test later on.
55168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55169   if test "x$test_shortpath" = x; then
55170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55171 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55172     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55173   fi
55174 
55175   # Call helper function which possibly converts this using DOS-style short mode.
55176   # If so, the updated path is stored in $new_path.
55177 
55178   input_path="$new_path"
55179   # Check if we need to convert this using DOS-style short mode. If the path
55180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55181   # take no chances and rewrite it.
55182   # Note: m4 eats our [], so we need to use [ and ] instead.
55183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55184   if test "x$has_forbidden_chars" != x; then
55185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55189       # Going to short mode and back again did indeed matter. Since short mode is
55190       # case insensitive, let's make it lowercase to improve readability.
55191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55192       # Now convert it back to Unix-style (cygpath)
55193       input_path=`$CYGPATH -u "$shortmode_path"`
55194       new_path="$input_path"
55195     fi
55196   fi
55197 
55198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55199   if test "x$test_cygdrive_prefix" = x; then
55200     # As a simple fix, exclude /usr/bin since it's not a real path.
55201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55203       # a path prefixed by /cygdrive for fixpath to work.
55204       new_path="$CYGWIN_ROOT_PATH$input_path"
55205     fi
55206   fi
55207 
55208 
55209   if test "x$path" != "x$new_path"; then
55210     MSVC_DLL="$new_path"
55211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55212 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55213   fi
55214 
55215     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55216 
55217   path="$MSVC_DLL"
55218   has_colon=`$ECHO $path | $GREP ^.:`
55219   new_path="$path"
55220   if test "x$has_colon" = x; then
55221     # Not in mixed or Windows style, start by that.
55222     new_path=`cmd //c echo $path`
55223   fi
55224 
55225 
55226   input_path="$new_path"
55227   # Check if we need to convert this using DOS-style short mode. If the path
55228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55229   # take no chances and rewrite it.
55230   # Note: m4 eats our [], so we need to use [ and ] instead.
55231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55232   if test "x$has_forbidden_chars" != x; then
55233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55235   fi
55236 
55237 
55238   windows_path="$new_path"
55239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55240     unix_path=`$CYGPATH -u "$windows_path"`
55241     new_path="$unix_path"
55242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55244     new_path="$unix_path"
55245   fi
55246 
55247   if test "x$path" != "x$new_path"; then
55248     MSVC_DLL="$new_path"
55249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55250 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55251   fi
55252 
55253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55255 
55256     else
55257       # We're on a unix platform. Hooray! :)
55258       path="$MSVC_DLL"
55259       has_space=`$ECHO "$path" | $GREP " "`
55260       if test "x$has_space" != x; then
55261         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55262 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55263         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55264       fi
55265 
55266       # Use eval to expand a potential ~
55267       eval path="$path"
55268       if test ! -f "$path" && test ! -d "$path"; then
55269         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55270       fi
55271 
55272       if test -d "$path"; then
55273         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55274       else
55275         dir="`$DIRNAME "$path"`"
55276         base="`$BASENAME "$path"`"
55277         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55278       fi
55279     fi
55280   fi
55281 
55282       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55283 $as_echo_n "checking for $DLL_NAME... " >&6; }
55284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55285 $as_echo "$MSVC_DLL" >&6; }
55286     else
55287       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55288 $as_echo "incorrect, ignoring" >&6; }
55289       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55290 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55291     fi
55292   fi
55293 
55294   fi
55295 
55296   if test "x$MSVC_DLL" = x; then
55297     # Probe: Look in the Windows system32 directory
55298     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55299 
55300   windows_path="$CYGWIN_SYSTEMROOT"
55301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55302     unix_path=`$CYGPATH -u "$windows_path"`
55303     CYGWIN_SYSTEMROOT="$unix_path"
55304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55306     CYGWIN_SYSTEMROOT="$unix_path"
55307   fi
55308 
55309     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55310 
55311   DLL_NAME="$DLL_NAME"
55312   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55313   METHOD="well-known location in SYSTEMROOT"
55314   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55315     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55316 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55317 
55318     # Need to check if the found msvcr is correct architecture
55319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55320 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55321     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55322     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55323       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55324       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55325       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55326         CORRECT_MSVCR_ARCH="PE32 executable"
55327       else
55328         CORRECT_MSVCR_ARCH="PE32+ executable"
55329       fi
55330     else
55331       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55332         CORRECT_MSVCR_ARCH=386
55333       else
55334         CORRECT_MSVCR_ARCH=x86-64
55335       fi
55336     fi
55337     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55339 $as_echo "ok" >&6; }
55340       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55341 
55342   # Only process if variable expands to non-empty
55343 
55344   if test "x$MSVC_DLL" != x; then
55345     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55346 
55347   # Input might be given as Windows format, start by converting to
55348   # unix format.
55349   path="$MSVC_DLL"
55350   new_path=`$CYGPATH -u "$path"`
55351 
55352   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55353   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55354   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55355   # "foo.exe" is OK but "foo" is an error.
55356   #
55357   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55358   # It is also a way to make sure we got the proper file name for the real test later on.
55359   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55360   if test "x$test_shortpath" = x; then
55361     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55362 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55363     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55364   fi
55365 
55366   # Call helper function which possibly converts this using DOS-style short mode.
55367   # If so, the updated path is stored in $new_path.
55368 
55369   input_path="$new_path"
55370   # Check if we need to convert this using DOS-style short mode. If the path
55371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55372   # take no chances and rewrite it.
55373   # Note: m4 eats our [], so we need to use [ and ] instead.
55374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55375   if test "x$has_forbidden_chars" != x; then
55376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55380       # Going to short mode and back again did indeed matter. Since short mode is
55381       # case insensitive, let's make it lowercase to improve readability.
55382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55383       # Now convert it back to Unix-style (cygpath)
55384       input_path=`$CYGPATH -u "$shortmode_path"`
55385       new_path="$input_path"
55386     fi
55387   fi
55388 
55389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55390   if test "x$test_cygdrive_prefix" = x; then
55391     # As a simple fix, exclude /usr/bin since it's not a real path.
55392     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55394       # a path prefixed by /cygdrive for fixpath to work.
55395       new_path="$CYGWIN_ROOT_PATH$input_path"
55396     fi
55397   fi
55398 
55399 
55400   if test "x$path" != "x$new_path"; then
55401     MSVC_DLL="$new_path"
55402     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55403 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55404   fi
55405 
55406     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55407 
55408   path="$MSVC_DLL"
55409   has_colon=`$ECHO $path | $GREP ^.:`
55410   new_path="$path"
55411   if test "x$has_colon" = x; then
55412     # Not in mixed or Windows style, start by that.
55413     new_path=`cmd //c echo $path`
55414   fi
55415 
55416 
55417   input_path="$new_path"
55418   # Check if we need to convert this using DOS-style short mode. If the path
55419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55420   # take no chances and rewrite it.
55421   # Note: m4 eats our [], so we need to use [ and ] instead.
55422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55423   if test "x$has_forbidden_chars" != x; then
55424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55425     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55426   fi
55427 
55428 
55429   windows_path="$new_path"
55430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55431     unix_path=`$CYGPATH -u "$windows_path"`
55432     new_path="$unix_path"
55433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55435     new_path="$unix_path"
55436   fi
55437 
55438   if test "x$path" != "x$new_path"; then
55439     MSVC_DLL="$new_path"
55440     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55441 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55442   fi
55443 
55444   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55445   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55446 
55447     else
55448       # We're on a unix platform. Hooray! :)
55449       path="$MSVC_DLL"
55450       has_space=`$ECHO "$path" | $GREP " "`
55451       if test "x$has_space" != x; then
55452         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55453 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55454         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55455       fi
55456 
55457       # Use eval to expand a potential ~
55458       eval path="$path"
55459       if test ! -f "$path" && test ! -d "$path"; then
55460         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55461       fi
55462 
55463       if test -d "$path"; then
55464         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55465       else
55466         dir="`$DIRNAME "$path"`"
55467         base="`$BASENAME "$path"`"
55468         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55469       fi
55470     fi
55471   fi
55472 
55473       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55474 $as_echo_n "checking for $DLL_NAME... " >&6; }
55475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55476 $as_echo "$MSVC_DLL" >&6; }
55477     else
55478       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55479 $as_echo "incorrect, ignoring" >&6; }
55480       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55481 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55482     fi
55483   fi
55484 
55485   fi
55486 
55487   if test "x$MSVC_DLL" = x; then
55488     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55489     if test "x$VS100COMNTOOLS" != x; then
55490       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55491 
55492   windows_path="$CYGWIN_VS_TOOLS_DIR"
55493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55494     unix_path=`$CYGPATH -u "$windows_path"`
55495     CYGWIN_VS_TOOLS_DIR="$unix_path"
55496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55498     CYGWIN_VS_TOOLS_DIR="$unix_path"
55499   fi
55500 
55501       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55502         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55503             | $GREP -i /x64/ | $HEAD --lines 1`
55504       else
55505         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55506             | $GREP -i /x86/ | $HEAD --lines 1`
55507       fi
55508 
55509   DLL_NAME="$DLL_NAME"
55510   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55511   METHOD="search of VS100COMNTOOLS"
55512   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55513     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55514 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55515 
55516     # Need to check if the found msvcr is correct architecture
55517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55518 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55519     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55520     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55521       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55522       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55523       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55524         CORRECT_MSVCR_ARCH="PE32 executable"
55525       else
55526         CORRECT_MSVCR_ARCH="PE32+ executable"
55527       fi
55528     else
55529       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55530         CORRECT_MSVCR_ARCH=386
55531       else
55532         CORRECT_MSVCR_ARCH=x86-64
55533       fi
55534     fi
55535     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55536       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55537 $as_echo "ok" >&6; }
55538       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55539 
55540   # Only process if variable expands to non-empty
55541 
55542   if test "x$MSVC_DLL" != x; then
55543     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55544 
55545   # Input might be given as Windows format, start by converting to
55546   # unix format.
55547   path="$MSVC_DLL"
55548   new_path=`$CYGPATH -u "$path"`
55549 
55550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55553   # "foo.exe" is OK but "foo" is an error.
55554   #
55555   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55556   # It is also a way to make sure we got the proper file name for the real test later on.
55557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55558   if test "x$test_shortpath" = x; then
55559     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55560 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55561     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55562   fi
55563 
55564   # Call helper function which possibly converts this using DOS-style short mode.
55565   # If so, the updated path is stored in $new_path.
55566 
55567   input_path="$new_path"
55568   # Check if we need to convert this using DOS-style short mode. If the path
55569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55570   # take no chances and rewrite it.
55571   # Note: m4 eats our [], so we need to use [ and ] instead.
55572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55573   if test "x$has_forbidden_chars" != x; then
55574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55575     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55576     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55577     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55578       # Going to short mode and back again did indeed matter. Since short mode is
55579       # case insensitive, let's make it lowercase to improve readability.
55580       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55581       # Now convert it back to Unix-style (cygpath)
55582       input_path=`$CYGPATH -u "$shortmode_path"`
55583       new_path="$input_path"
55584     fi
55585   fi
55586 
55587   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55588   if test "x$test_cygdrive_prefix" = x; then
55589     # As a simple fix, exclude /usr/bin since it's not a real path.
55590     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55591       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55592       # a path prefixed by /cygdrive for fixpath to work.
55593       new_path="$CYGWIN_ROOT_PATH$input_path"
55594     fi
55595   fi
55596 
55597 
55598   if test "x$path" != "x$new_path"; then
55599     MSVC_DLL="$new_path"
55600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55601 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55602   fi
55603 
55604     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55605 
55606   path="$MSVC_DLL"
55607   has_colon=`$ECHO $path | $GREP ^.:`
55608   new_path="$path"
55609   if test "x$has_colon" = x; then
55610     # Not in mixed or Windows style, start by that.
55611     new_path=`cmd //c echo $path`
55612   fi
55613 
55614 
55615   input_path="$new_path"
55616   # Check if we need to convert this using DOS-style short mode. If the path
55617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55618   # take no chances and rewrite it.
55619   # Note: m4 eats our [], so we need to use [ and ] instead.
55620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55621   if test "x$has_forbidden_chars" != x; then
55622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55624   fi
55625 
55626 
55627   windows_path="$new_path"
55628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55629     unix_path=`$CYGPATH -u "$windows_path"`
55630     new_path="$unix_path"
55631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55633     new_path="$unix_path"
55634   fi
55635 
55636   if test "x$path" != "x$new_path"; then
55637     MSVC_DLL="$new_path"
55638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55639 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55640   fi
55641 
55642   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55643   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55644 
55645     else
55646       # We're on a unix platform. Hooray! :)
55647       path="$MSVC_DLL"
55648       has_space=`$ECHO "$path" | $GREP " "`
55649       if test "x$has_space" != x; then
55650         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55651 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55652         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55653       fi
55654 
55655       # Use eval to expand a potential ~
55656       eval path="$path"
55657       if test ! -f "$path" && test ! -d "$path"; then
55658         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55659       fi
55660 
55661       if test -d "$path"; then
55662         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55663       else
55664         dir="`$DIRNAME "$path"`"
55665         base="`$BASENAME "$path"`"
55666         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55667       fi
55668     fi
55669   fi
55670 
55671       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55672 $as_echo_n "checking for $DLL_NAME... " >&6; }
55673       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55674 $as_echo "$MSVC_DLL" >&6; }
55675     else
55676       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55677 $as_echo "incorrect, ignoring" >&6; }
55678       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55679 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55680     fi
55681   fi
55682 
55683     fi
55684   fi
55685 
55686   if test "x$MSVC_DLL" = x; then
55687     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55688     # (This was the original behaviour; kept since it might turn something up)
55689     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55690       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55691         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55692             | $GREP x64 | $HEAD --lines 1`
55693       else
55694         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55695             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55696         if test "x$POSSIBLE_MSVC_DLL" = x; then
55697           # We're grasping at straws now...
55698           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55699               | $HEAD --lines 1`
55700         fi
55701       fi
55702 
55703 
55704   DLL_NAME="$DLL_NAME"
55705   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55706   METHOD="search of VCINSTALLDIR"
55707   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55708     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55709 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55710 
55711     # Need to check if the found msvcr is correct architecture
55712     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55713 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55714     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55715     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55716       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55717       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55718       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55719         CORRECT_MSVCR_ARCH="PE32 executable"
55720       else
55721         CORRECT_MSVCR_ARCH="PE32+ executable"
55722       fi
55723     else
55724       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55725         CORRECT_MSVCR_ARCH=386
55726       else
55727         CORRECT_MSVCR_ARCH=x86-64
55728       fi
55729     fi
55730     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55731       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55732 $as_echo "ok" >&6; }
55733       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55734 
55735   # Only process if variable expands to non-empty
55736 
55737   if test "x$MSVC_DLL" != x; then
55738     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55739 
55740   # Input might be given as Windows format, start by converting to
55741   # unix format.
55742   path="$MSVC_DLL"
55743   new_path=`$CYGPATH -u "$path"`
55744 
55745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55748   # "foo.exe" is OK but "foo" is an error.
55749   #
55750   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55751   # It is also a way to make sure we got the proper file name for the real test later on.
55752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55753   if test "x$test_shortpath" = x; then
55754     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55755 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55756     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55757   fi
55758 
55759   # Call helper function which possibly converts this using DOS-style short mode.
55760   # If so, the updated path is stored in $new_path.
55761 
55762   input_path="$new_path"
55763   # Check if we need to convert this using DOS-style short mode. If the path
55764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55765   # take no chances and rewrite it.
55766   # Note: m4 eats our [], so we need to use [ and ] instead.
55767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55768   if test "x$has_forbidden_chars" != x; then
55769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55773       # Going to short mode and back again did indeed matter. Since short mode is
55774       # case insensitive, let's make it lowercase to improve readability.
55775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55776       # Now convert it back to Unix-style (cygpath)
55777       input_path=`$CYGPATH -u "$shortmode_path"`
55778       new_path="$input_path"
55779     fi
55780   fi
55781 
55782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55783   if test "x$test_cygdrive_prefix" = x; then
55784     # As a simple fix, exclude /usr/bin since it's not a real path.
55785     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55787       # a path prefixed by /cygdrive for fixpath to work.
55788       new_path="$CYGWIN_ROOT_PATH$input_path"
55789     fi
55790   fi
55791 
55792 
55793   if test "x$path" != "x$new_path"; then
55794     MSVC_DLL="$new_path"
55795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55796 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55797   fi
55798 
55799     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55800 
55801   path="$MSVC_DLL"
55802   has_colon=`$ECHO $path | $GREP ^.:`
55803   new_path="$path"
55804   if test "x$has_colon" = x; then
55805     # Not in mixed or Windows style, start by that.
55806     new_path=`cmd //c echo $path`
55807   fi
55808 
55809 
55810   input_path="$new_path"
55811   # Check if we need to convert this using DOS-style short mode. If the path
55812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55813   # take no chances and rewrite it.
55814   # Note: m4 eats our [], so we need to use [ and ] instead.
55815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55816   if test "x$has_forbidden_chars" != x; then
55817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55818     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55819   fi
55820 
55821 
55822   windows_path="$new_path"
55823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55824     unix_path=`$CYGPATH -u "$windows_path"`
55825     new_path="$unix_path"
55826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55828     new_path="$unix_path"
55829   fi
55830 
55831   if test "x$path" != "x$new_path"; then
55832     MSVC_DLL="$new_path"
55833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55834 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55835   fi
55836 
55837   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55838   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55839 
55840     else
55841       # We're on a unix platform. Hooray! :)
55842       path="$MSVC_DLL"
55843       has_space=`$ECHO "$path" | $GREP " "`
55844       if test "x$has_space" != x; then
55845         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55846 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55847         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55848       fi
55849 
55850       # Use eval to expand a potential ~
55851       eval path="$path"
55852       if test ! -f "$path" && test ! -d "$path"; then
55853         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55854       fi
55855 
55856       if test -d "$path"; then
55857         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55858       else
55859         dir="`$DIRNAME "$path"`"
55860         base="`$BASENAME "$path"`"
55861         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55862       fi
55863     fi
55864   fi
55865 
55866       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55867 $as_echo_n "checking for $DLL_NAME... " >&6; }
55868       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55869 $as_echo "$MSVC_DLL" >&6; }
55870     else
55871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55872 $as_echo "incorrect, ignoring" >&6; }
55873       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55874 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55875     fi
55876   fi
55877 
55878     fi
55879   fi
55880 
55881   if test "x$MSVC_DLL" = x; then
55882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55883 $as_echo_n "checking for $DLL_NAME... " >&6; }
55884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55885 $as_echo "no" >&6; }
55886     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55887   fi
55888 
55889       MSVCP_DLL="$MSVC_DLL"
55890     fi
55891 
55892   fi
55893 
55894   fi
55895 
55896 
55897   if test "x$NEEDS_LIB_X11" = xfalse; then
55898     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55899       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55900 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55901     fi
55902     X_CFLAGS=
55903     X_LIBS=
55904   else
55905 
55906     if test "x${with_x}" = xno; then
55907       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55908     fi
55909 
55910     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55911       # The user has specified a X11 base directory. Use it for includes and
55912       # libraries, unless explicitly overridden.
55913       if test "x$x_includes" = xNONE; then
55914         x_includes="${with_x}/include"
55915       fi
55916       if test "x$x_libraries" = xNONE; then
55917         x_libraries="${with_x}/lib"
55918       fi
55919     else
55920       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55921       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55922       # --x-libraries for the sysroot, if that seems to be correct.
55923       if test "x$SYSROOT" != "x"; then
55924         if test "x$x_includes" = xNONE; then
55925           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55926             x_includes="$SYSROOT/usr/X11R6/include"
55927           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55928             x_includes="$SYSROOT/usr/include"
55929           fi
55930         fi
55931         if test "x$x_libraries" = xNONE; then
55932           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55933             x_libraries="$SYSROOT/usr/X11R6/lib"
55934           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55935             x_libraries="$SYSROOT/usr/lib64"
55936           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55937             x_libraries="$SYSROOT/usr/lib"
55938           fi
55939         fi
55940       fi
55941     fi
55942 
55943     # Now let autoconf do it's magic
55944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55945 $as_echo_n "checking for X... " >&6; }
55946 
55947 
55948 # Check whether --with-x was given.
55949 if test "${with_x+set}" = set; then :
55950   withval=$with_x;
55951 fi
55952 
55953 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55954 if test "x$with_x" = xno; then
55955   # The user explicitly disabled X.
55956   have_x=disabled
55957 else
55958   case $x_includes,$x_libraries in #(
55959     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55960     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55961   $as_echo_n "(cached) " >&6
55962 else
55963   # One or both of the vars are not set, and there is no cached value.
55964 ac_x_includes=no ac_x_libraries=no
55965 rm -f -r conftest.dir
55966 if mkdir conftest.dir; then
55967   cd conftest.dir
55968   cat >Imakefile <<'_ACEOF'
55969 incroot:
55970         @echo incroot='${INCROOT}'
55971 usrlibdir:
55972         @echo usrlibdir='${USRLIBDIR}'
55973 libdir:
55974         @echo libdir='${LIBDIR}'
55975 _ACEOF
55976   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55977     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55978     for ac_var in incroot usrlibdir libdir; do
55979       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55980     done
55981     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55982     for ac_extension in a so sl dylib la dll; do
55983       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55984          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55985         ac_im_usrlibdir=$ac_im_libdir; break
55986       fi
55987     done
55988     # Screen out bogus values from the imake configuration.  They are
55989     # bogus both because they are the default anyway, and because
55990     # using them would break gcc on systems where it needs fixed includes.
55991     case $ac_im_incroot in
55992         /usr/include) ac_x_includes= ;;
55993         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55994     esac
55995     case $ac_im_usrlibdir in
55996         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55997         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55998     esac
55999   fi
56000   cd ..
56001   rm -f -r conftest.dir
56002 fi
56003 
56004 # Standard set of common directories for X headers.
56005 # Check X11 before X11Rn because it is often a symlink to the current release.
56006 ac_x_header_dirs='
56007 /usr/X11/include
56008 /usr/X11R7/include
56009 /usr/X11R6/include
56010 /usr/X11R5/include
56011 /usr/X11R4/include
56012 
56013 /usr/include/X11
56014 /usr/include/X11R7
56015 /usr/include/X11R6
56016 /usr/include/X11R5
56017 /usr/include/X11R4
56018 
56019 /usr/local/X11/include
56020 /usr/local/X11R7/include
56021 /usr/local/X11R6/include
56022 /usr/local/X11R5/include
56023 /usr/local/X11R4/include
56024 
56025 /usr/local/include/X11
56026 /usr/local/include/X11R7
56027 /usr/local/include/X11R6
56028 /usr/local/include/X11R5
56029 /usr/local/include/X11R4
56030 
56031 /usr/X386/include
56032 /usr/x386/include
56033 /usr/XFree86/include/X11
56034 
56035 /usr/include
56036 /usr/local/include
56037 /usr/unsupported/include
56038 /usr/athena/include
56039 /usr/local/x11r5/include
56040 /usr/lpp/Xamples/include
56041 
56042 /usr/openwin/include
56043 /usr/openwin/share/include'
56044 
56045 if test "$ac_x_includes" = no; then
56046   # Guess where to find include files, by looking for Xlib.h.
56047   # First, try using that file with no special directory specified.
56048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56049 /* end confdefs.h.  */
56050 #include <X11/Xlib.h>
56051 _ACEOF
56052 if ac_fn_cxx_try_cpp "$LINENO"; then :
56053   # We can compile using X headers with no special include directory.
56054 ac_x_includes=
56055 else
56056   for ac_dir in $ac_x_header_dirs; do
56057   if test -r "$ac_dir/X11/Xlib.h"; then
56058     ac_x_includes=$ac_dir
56059     break
56060   fi
56061 done
56062 fi
56063 rm -f conftest.err conftest.i conftest.$ac_ext
56064 fi # $ac_x_includes = no
56065 
56066 if test "$ac_x_libraries" = no; then
56067   # Check for the libraries.
56068   # See if we find them without any special options.
56069   # Don't add to $LIBS permanently.
56070   ac_save_LIBS=$LIBS
56071   LIBS="-lX11 $LIBS"
56072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56073 /* end confdefs.h.  */
56074 #include <X11/Xlib.h>
56075 int
56076 main ()
56077 {
56078 XrmInitialize ()
56079   ;
56080   return 0;
56081 }
56082 _ACEOF
56083 if ac_fn_cxx_try_link "$LINENO"; then :
56084   LIBS=$ac_save_LIBS
56085 # We can link X programs with no special library path.
56086 ac_x_libraries=
56087 else
56088   LIBS=$ac_save_LIBS
56089 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56090 do
56091   # Don't even attempt the hair of trying to link an X program!
56092   for ac_extension in a so sl dylib la dll; do
56093     if test -r "$ac_dir/libX11.$ac_extension"; then
56094       ac_x_libraries=$ac_dir
56095       break 2
56096     fi
56097   done
56098 done
56099 fi
56100 rm -f core conftest.err conftest.$ac_objext \
56101     conftest$ac_exeext conftest.$ac_ext
56102 fi # $ac_x_libraries = no
56103 
56104 case $ac_x_includes,$ac_x_libraries in #(
56105   no,* | *,no | *\'*)
56106     # Didn't find X, or a directory has "'" in its name.
56107     ac_cv_have_x="have_x=no";; #(
56108   *)
56109     # Record where we found X for the cache.
56110     ac_cv_have_x="have_x=yes\
56111         ac_x_includes='$ac_x_includes'\
56112         ac_x_libraries='$ac_x_libraries'"
56113 esac
56114 fi
56115 ;; #(
56116     *) have_x=yes;;
56117   esac
56118   eval "$ac_cv_have_x"
56119 fi # $with_x != no
56120 
56121 if test "$have_x" != yes; then
56122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56123 $as_echo "$have_x" >&6; }
56124   no_x=yes
56125 else
56126   # If each of the values was on the command line, it overrides each guess.
56127   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56128   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56129   # Update the cache value to reflect the command line values.
56130   ac_cv_have_x="have_x=yes\
56131         ac_x_includes='$x_includes'\
56132         ac_x_libraries='$x_libraries'"
56133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56134 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56135 fi
56136 
56137     if test "$no_x" = yes; then
56138   # Not all programs may use this symbol, but it does not hurt to define it.
56139 
56140 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56141 
56142   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56143 else
56144   if test -n "$x_includes"; then
56145     X_CFLAGS="$X_CFLAGS -I$x_includes"
56146   fi
56147 
56148   # It would also be nice to do this for all -L options, not just this one.
56149   if test -n "$x_libraries"; then
56150     X_LIBS="$X_LIBS -L$x_libraries"
56151     # For Solaris; some versions of Sun CC require a space after -R and
56152     # others require no space.  Words are not sufficient . . . .
56153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56154 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56155     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56156     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56157     ac_cxx_werror_flag=yes
56158     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56159 /* end confdefs.h.  */
56160 
56161 int
56162 main ()
56163 {
56164 
56165   ;
56166   return 0;
56167 }
56168 _ACEOF
56169 if ac_fn_cxx_try_link "$LINENO"; then :
56170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56171 $as_echo "no" >&6; }
56172        X_LIBS="$X_LIBS -R$x_libraries"
56173 else
56174   LIBS="$ac_xsave_LIBS -R $x_libraries"
56175        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56176 /* end confdefs.h.  */
56177 
56178 int
56179 main ()
56180 {
56181 
56182   ;
56183   return 0;
56184 }
56185 _ACEOF
56186 if ac_fn_cxx_try_link "$LINENO"; then :
56187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56188 $as_echo "yes" >&6; }
56189           X_LIBS="$X_LIBS -R $x_libraries"
56190 else
56191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56192 $as_echo "neither works" >&6; }
56193 fi
56194 rm -f core conftest.err conftest.$ac_objext \
56195     conftest$ac_exeext conftest.$ac_ext
56196 fi
56197 rm -f core conftest.err conftest.$ac_objext \
56198     conftest$ac_exeext conftest.$ac_ext
56199     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56200     LIBS=$ac_xsave_LIBS
56201   fi
56202 
56203   # Check for system-dependent libraries X programs must link with.
56204   # Do this before checking for the system-independent R6 libraries
56205   # (-lICE), since we may need -lsocket or whatever for X linking.
56206 
56207   if test "$ISC" = yes; then
56208     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56209   else
56210     # Martyn Johnson says this is needed for Ultrix, if the X
56211     # libraries were built with DECnet support.  And Karl Berry says
56212     # the Alpha needs dnet_stub (dnet does not exist).
56213     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56214     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56215 /* end confdefs.h.  */
56216 
56217 /* Override any GCC internal prototype to avoid an error.
56218    Use char because int might match the return type of a GCC
56219    builtin and then its argument prototype would still apply.  */
56220 #ifdef __cplusplus
56221 extern "C"
56222 #endif
56223 char XOpenDisplay ();
56224 int
56225 main ()
56226 {
56227 return XOpenDisplay ();
56228   ;
56229   return 0;
56230 }
56231 _ACEOF
56232 if ac_fn_cxx_try_link "$LINENO"; then :
56233 
56234 else
56235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56236 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56237 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56238   $as_echo_n "(cached) " >&6
56239 else
56240   ac_check_lib_save_LIBS=$LIBS
56241 LIBS="-ldnet  $LIBS"
56242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56243 /* end confdefs.h.  */
56244 
56245 /* Override any GCC internal prototype to avoid an error.
56246    Use char because int might match the return type of a GCC
56247    builtin and then its argument prototype would still apply.  */
56248 #ifdef __cplusplus
56249 extern "C"
56250 #endif
56251 char dnet_ntoa ();
56252 int
56253 main ()
56254 {
56255 return dnet_ntoa ();
56256   ;
56257   return 0;
56258 }
56259 _ACEOF
56260 if ac_fn_cxx_try_link "$LINENO"; then :
56261   ac_cv_lib_dnet_dnet_ntoa=yes
56262 else
56263   ac_cv_lib_dnet_dnet_ntoa=no
56264 fi
56265 rm -f core conftest.err conftest.$ac_objext \
56266     conftest$ac_exeext conftest.$ac_ext
56267 LIBS=$ac_check_lib_save_LIBS
56268 fi
56269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56270 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56271 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56272   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56273 fi
56274 
56275     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56276       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56277 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56278 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56279   $as_echo_n "(cached) " >&6
56280 else
56281   ac_check_lib_save_LIBS=$LIBS
56282 LIBS="-ldnet_stub  $LIBS"
56283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56284 /* end confdefs.h.  */
56285 
56286 /* Override any GCC internal prototype to avoid an error.
56287    Use char because int might match the return type of a GCC
56288    builtin and then its argument prototype would still apply.  */
56289 #ifdef __cplusplus
56290 extern "C"
56291 #endif
56292 char dnet_ntoa ();
56293 int
56294 main ()
56295 {
56296 return dnet_ntoa ();
56297   ;
56298   return 0;
56299 }
56300 _ACEOF
56301 if ac_fn_cxx_try_link "$LINENO"; then :
56302   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56303 else
56304   ac_cv_lib_dnet_stub_dnet_ntoa=no
56305 fi
56306 rm -f core conftest.err conftest.$ac_objext \
56307     conftest$ac_exeext conftest.$ac_ext
56308 LIBS=$ac_check_lib_save_LIBS
56309 fi
56310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56311 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56312 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56313   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56314 fi
56315 
56316     fi
56317 fi
56318 rm -f core conftest.err conftest.$ac_objext \
56319     conftest$ac_exeext conftest.$ac_ext
56320     LIBS="$ac_xsave_LIBS"
56321 
56322     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56323     # to get the SysV transport functions.
56324     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56325     # needs -lnsl.
56326     # The nsl library prevents programs from opening the X display
56327     # on Irix 5.2, according to T.E. Dickey.
56328     # The functions gethostbyname, getservbyname, and inet_addr are
56329     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56330     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56331 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56332 
56333 fi
56334 
56335     if test $ac_cv_func_gethostbyname = no; then
56336       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56337 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56338 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56339   $as_echo_n "(cached) " >&6
56340 else
56341   ac_check_lib_save_LIBS=$LIBS
56342 LIBS="-lnsl  $LIBS"
56343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56344 /* end confdefs.h.  */
56345 
56346 /* Override any GCC internal prototype to avoid an error.
56347    Use char because int might match the return type of a GCC
56348    builtin and then its argument prototype would still apply.  */
56349 #ifdef __cplusplus
56350 extern "C"
56351 #endif
56352 char gethostbyname ();
56353 int
56354 main ()
56355 {
56356 return gethostbyname ();
56357   ;
56358   return 0;
56359 }
56360 _ACEOF
56361 if ac_fn_cxx_try_link "$LINENO"; then :
56362   ac_cv_lib_nsl_gethostbyname=yes
56363 else
56364   ac_cv_lib_nsl_gethostbyname=no
56365 fi
56366 rm -f core conftest.err conftest.$ac_objext \
56367     conftest$ac_exeext conftest.$ac_ext
56368 LIBS=$ac_check_lib_save_LIBS
56369 fi
56370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56371 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56372 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56373   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56374 fi
56375 
56376       if test $ac_cv_lib_nsl_gethostbyname = no; then
56377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56378 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56379 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56380   $as_echo_n "(cached) " >&6
56381 else
56382   ac_check_lib_save_LIBS=$LIBS
56383 LIBS="-lbsd  $LIBS"
56384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56385 /* end confdefs.h.  */
56386 
56387 /* Override any GCC internal prototype to avoid an error.
56388    Use char because int might match the return type of a GCC
56389    builtin and then its argument prototype would still apply.  */
56390 #ifdef __cplusplus
56391 extern "C"
56392 #endif
56393 char gethostbyname ();
56394 int
56395 main ()
56396 {
56397 return gethostbyname ();
56398   ;
56399   return 0;
56400 }
56401 _ACEOF
56402 if ac_fn_cxx_try_link "$LINENO"; then :
56403   ac_cv_lib_bsd_gethostbyname=yes
56404 else
56405   ac_cv_lib_bsd_gethostbyname=no
56406 fi
56407 rm -f core conftest.err conftest.$ac_objext \
56408     conftest$ac_exeext conftest.$ac_ext
56409 LIBS=$ac_check_lib_save_LIBS
56410 fi
56411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56412 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56413 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56414   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56415 fi
56416 
56417       fi
56418     fi
56419 
56420     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56421     # socket/setsockopt and other routines are undefined under SCO ODT
56422     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56423     # on later versions), says Simon Leinen: it contains gethostby*
56424     # variants that don't use the name server (or something).  -lsocket
56425     # must be given before -lnsl if both are needed.  We assume that
56426     # if connect needs -lnsl, so does gethostbyname.
56427     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56428 if test "x$ac_cv_func_connect" = xyes; then :
56429 
56430 fi
56431 
56432     if test $ac_cv_func_connect = no; then
56433       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56434 $as_echo_n "checking for connect in -lsocket... " >&6; }
56435 if ${ac_cv_lib_socket_connect+:} false; then :
56436   $as_echo_n "(cached) " >&6
56437 else
56438   ac_check_lib_save_LIBS=$LIBS
56439 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56441 /* end confdefs.h.  */
56442 
56443 /* Override any GCC internal prototype to avoid an error.
56444    Use char because int might match the return type of a GCC
56445    builtin and then its argument prototype would still apply.  */
56446 #ifdef __cplusplus
56447 extern "C"
56448 #endif
56449 char connect ();
56450 int
56451 main ()
56452 {
56453 return connect ();
56454   ;
56455   return 0;
56456 }
56457 _ACEOF
56458 if ac_fn_cxx_try_link "$LINENO"; then :
56459   ac_cv_lib_socket_connect=yes
56460 else
56461   ac_cv_lib_socket_connect=no
56462 fi
56463 rm -f core conftest.err conftest.$ac_objext \
56464     conftest$ac_exeext conftest.$ac_ext
56465 LIBS=$ac_check_lib_save_LIBS
56466 fi
56467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56468 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56469 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56470   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56471 fi
56472 
56473     fi
56474 
56475     # Guillermo Gomez says -lposix is necessary on A/UX.
56476     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56477 if test "x$ac_cv_func_remove" = xyes; then :
56478 
56479 fi
56480 
56481     if test $ac_cv_func_remove = no; then
56482       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56483 $as_echo_n "checking for remove in -lposix... " >&6; }
56484 if ${ac_cv_lib_posix_remove+:} false; then :
56485   $as_echo_n "(cached) " >&6
56486 else
56487   ac_check_lib_save_LIBS=$LIBS
56488 LIBS="-lposix  $LIBS"
56489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56490 /* end confdefs.h.  */
56491 
56492 /* Override any GCC internal prototype to avoid an error.
56493    Use char because int might match the return type of a GCC
56494    builtin and then its argument prototype would still apply.  */
56495 #ifdef __cplusplus
56496 extern "C"
56497 #endif
56498 char remove ();
56499 int
56500 main ()
56501 {
56502 return remove ();
56503   ;
56504   return 0;
56505 }
56506 _ACEOF
56507 if ac_fn_cxx_try_link "$LINENO"; then :
56508   ac_cv_lib_posix_remove=yes
56509 else
56510   ac_cv_lib_posix_remove=no
56511 fi
56512 rm -f core conftest.err conftest.$ac_objext \
56513     conftest$ac_exeext conftest.$ac_ext
56514 LIBS=$ac_check_lib_save_LIBS
56515 fi
56516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56517 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56518 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56519   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56520 fi
56521 
56522     fi
56523 
56524     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56525     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56526 if test "x$ac_cv_func_shmat" = xyes; then :
56527 
56528 fi
56529 
56530     if test $ac_cv_func_shmat = no; then
56531       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56532 $as_echo_n "checking for shmat in -lipc... " >&6; }
56533 if ${ac_cv_lib_ipc_shmat+:} false; then :
56534   $as_echo_n "(cached) " >&6
56535 else
56536   ac_check_lib_save_LIBS=$LIBS
56537 LIBS="-lipc  $LIBS"
56538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56539 /* end confdefs.h.  */
56540 
56541 /* Override any GCC internal prototype to avoid an error.
56542    Use char because int might match the return type of a GCC
56543    builtin and then its argument prototype would still apply.  */
56544 #ifdef __cplusplus
56545 extern "C"
56546 #endif
56547 char shmat ();
56548 int
56549 main ()
56550 {
56551 return shmat ();
56552   ;
56553   return 0;
56554 }
56555 _ACEOF
56556 if ac_fn_cxx_try_link "$LINENO"; then :
56557   ac_cv_lib_ipc_shmat=yes
56558 else
56559   ac_cv_lib_ipc_shmat=no
56560 fi
56561 rm -f core conftest.err conftest.$ac_objext \
56562     conftest$ac_exeext conftest.$ac_ext
56563 LIBS=$ac_check_lib_save_LIBS
56564 fi
56565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56566 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56567 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56568   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56569 fi
56570 
56571     fi
56572   fi
56573 
56574   # Check for libraries that X11R6 Xt/Xaw programs need.
56575   ac_save_LDFLAGS=$LDFLAGS
56576   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56577   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56578   # check for ICE first), but we must link in the order -lSM -lICE or
56579   # we get undefined symbols.  So assume we have SM if we have ICE.
56580   # These have to be linked with before -lX11, unlike the other
56581   # libraries we check for below, so use a different variable.
56582   # John Interrante, Karl Berry
56583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56584 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56585 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56586   $as_echo_n "(cached) " >&6
56587 else
56588   ac_check_lib_save_LIBS=$LIBS
56589 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56591 /* end confdefs.h.  */
56592 
56593 /* Override any GCC internal prototype to avoid an error.
56594    Use char because int might match the return type of a GCC
56595    builtin and then its argument prototype would still apply.  */
56596 #ifdef __cplusplus
56597 extern "C"
56598 #endif
56599 char IceConnectionNumber ();
56600 int
56601 main ()
56602 {
56603 return IceConnectionNumber ();
56604   ;
56605   return 0;
56606 }
56607 _ACEOF
56608 if ac_fn_cxx_try_link "$LINENO"; then :
56609   ac_cv_lib_ICE_IceConnectionNumber=yes
56610 else
56611   ac_cv_lib_ICE_IceConnectionNumber=no
56612 fi
56613 rm -f core conftest.err conftest.$ac_objext \
56614     conftest$ac_exeext conftest.$ac_ext
56615 LIBS=$ac_check_lib_save_LIBS
56616 fi
56617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56618 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56619 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56620   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56621 fi
56622 
56623   LDFLAGS=$ac_save_LDFLAGS
56624 
56625 fi
56626 
56627 
56628     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56629     # this doesn't make sense so we remove it.
56630     if test "x$COMPILE_TYPE" = xcross; then
56631       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56632     fi
56633 
56634     if test "x$no_x" = xyes; then
56635 
56636   # Print a helpful message on how to acquire the necessary build dependency.
56637   # x11 is the help tag: freetype, cups, alsa etc
56638   MISSING_DEPENDENCY=x11
56639 
56640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56641     cygwin_help $MISSING_DEPENDENCY
56642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56643     msys_help $MISSING_DEPENDENCY
56644   else
56645     PKGHANDLER_COMMAND=
56646 
56647     case $PKGHANDLER in
56648       apt-get)
56649         apt_help     $MISSING_DEPENDENCY ;;
56650       yum)
56651         yum_help     $MISSING_DEPENDENCY ;;
56652       port)
56653         port_help    $MISSING_DEPENDENCY ;;
56654       pkgutil)
56655         pkgutil_help $MISSING_DEPENDENCY ;;
56656       pkgadd)
56657         pkgadd_help  $MISSING_DEPENDENCY ;;
56658     esac
56659 
56660     if test "x$PKGHANDLER_COMMAND" != x; then
56661       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56662     fi
56663   fi
56664 
56665       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56666     fi
56667 
56668     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56669       OPENWIN_HOME="/usr/openwin"
56670       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56671       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56672           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56673     fi
56674 
56675     ac_ext=c
56676 ac_cpp='$CPP $CPPFLAGS'
56677 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56678 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56680 
56681     OLD_CFLAGS="$CFLAGS"
56682     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56683 
56684     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56685     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56686 do :
56687   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56688 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56689           # include <X11/Xlib.h>
56690           # include <X11/Xutil.h>
56691 
56692 
56693 "
56694 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56695   cat >>confdefs.h <<_ACEOF
56696 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56697 _ACEOF
56698  X11_HEADERS_OK=yes
56699 else
56700   X11_HEADERS_OK=no; break
56701 fi
56702 
56703 done
56704 
56705 
56706     if test "x$X11_HEADERS_OK" = xno; then
56707 
56708   # Print a helpful message on how to acquire the necessary build dependency.
56709   # x11 is the help tag: freetype, cups, alsa etc
56710   MISSING_DEPENDENCY=x11
56711 
56712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56713     cygwin_help $MISSING_DEPENDENCY
56714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56715     msys_help $MISSING_DEPENDENCY
56716   else
56717     PKGHANDLER_COMMAND=
56718 
56719     case $PKGHANDLER in
56720       apt-get)
56721         apt_help     $MISSING_DEPENDENCY ;;
56722       yum)
56723         yum_help     $MISSING_DEPENDENCY ;;
56724       port)
56725         port_help    $MISSING_DEPENDENCY ;;
56726       pkgutil)
56727         pkgutil_help $MISSING_DEPENDENCY ;;
56728       pkgadd)
56729         pkgadd_help  $MISSING_DEPENDENCY ;;
56730     esac
56731 
56732     if test "x$PKGHANDLER_COMMAND" != x; then
56733       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56734     fi
56735   fi
56736 
56737       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56738     fi
56739 
56740     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56741     # defined in libawt_xawt.
56742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56743 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56744     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56745 /* end confdefs.h.  */
56746 #include <X11/extensions/Xrender.h>
56747 int
56748 main ()
56749 {
56750 XLinearGradient x;
56751   ;
56752   return 0;
56753 }
56754 _ACEOF
56755 if ac_fn_c_try_compile "$LINENO"; then :
56756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56757 $as_echo "yes" >&6; }
56758 else
56759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56760 $as_echo "no" >&6; }
56761          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56762 fi
56763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56764 
56765     CFLAGS="$OLD_CFLAGS"
56766     ac_ext=cpp
56767 ac_cpp='$CXXCPP $CPPFLAGS'
56768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56771 
56772   fi # NEEDS_LIB_X11
56773 
56774 
56775 
56776 
56777 
56778 
56779 # Check whether --with-cups was given.
56780 if test "${with_cups+set}" = set; then :
56781   withval=$with_cups;
56782 fi
56783 
56784 
56785 # Check whether --with-cups-include was given.
56786 if test "${with_cups_include+set}" = set; then :
56787   withval=$with_cups_include;
56788 fi
56789 
56790 
56791   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56792     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56793         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56794       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56795 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56796     fi
56797     CUPS_CFLAGS=
56798   else
56799     CUPS_FOUND=no
56800 
56801     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56802       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56803     fi
56804 
56805     if test "x${with_cups}" != x; then
56806       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56807 $as_echo_n "checking for cups headers... " >&6; }
56808       if test -s "${with_cups}/include/cups/cups.h"; then
56809         CUPS_CFLAGS="-I${with_cups}/include"
56810         CUPS_FOUND=yes
56811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56812 $as_echo "$CUPS_FOUND" >&6; }
56813       else
56814         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56815       fi
56816     fi
56817     if test "x${with_cups_include}" != x; then
56818       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56819 $as_echo_n "checking for cups headers... " >&6; }
56820       if test -s "${with_cups_include}/cups/cups.h"; then
56821         CUPS_CFLAGS="-I${with_cups_include}"
56822         CUPS_FOUND=yes
56823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56824 $as_echo "$CUPS_FOUND" >&6; }
56825       else
56826         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56827       fi
56828     fi
56829     if test "x$CUPS_FOUND" = xno; then
56830       # Are the cups headers installed in the default /usr/include location?
56831       for ac_header in cups/cups.h cups/ppd.h
56832 do :
56833   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56834 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56835 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56836   cat >>confdefs.h <<_ACEOF
56837 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56838 _ACEOF
56839 
56840           CUPS_FOUND=yes
56841           CUPS_CFLAGS=
56842           DEFAULT_CUPS=yes
56843 
56844 fi
56845 
56846 done
56847 
56848     fi
56849     if test "x$CUPS_FOUND" = xno; then
56850 
56851   # Print a helpful message on how to acquire the necessary build dependency.
56852   # cups is the help tag: freetype, cups, alsa etc
56853   MISSING_DEPENDENCY=cups
56854 
56855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56856     cygwin_help $MISSING_DEPENDENCY
56857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56858     msys_help $MISSING_DEPENDENCY
56859   else
56860     PKGHANDLER_COMMAND=
56861 
56862     case $PKGHANDLER in
56863       apt-get)
56864         apt_help     $MISSING_DEPENDENCY ;;
56865       yum)
56866         yum_help     $MISSING_DEPENDENCY ;;
56867       port)
56868         port_help    $MISSING_DEPENDENCY ;;
56869       pkgutil)
56870         pkgutil_help $MISSING_DEPENDENCY ;;
56871       pkgadd)
56872         pkgadd_help  $MISSING_DEPENDENCY ;;
56873     esac
56874 
56875     if test "x$PKGHANDLER_COMMAND" != x; then
56876       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56877     fi
56878   fi
56879 
56880       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56881     fi
56882   fi
56883 
56884 
56885 
56886 
56887 
56888 # Check whether --with-freetype was given.
56889 if test "${with_freetype+set}" = set; then :
56890   withval=$with_freetype;
56891 fi
56892 
56893 
56894 # Check whether --with-freetype-include was given.
56895 if test "${with_freetype_include+set}" = set; then :
56896   withval=$with_freetype_include;
56897 fi
56898 
56899 
56900 # Check whether --with-freetype-lib was given.
56901 if test "${with_freetype_lib+set}" = set; then :
56902   withval=$with_freetype_lib;
56903 fi
56904 
56905 
56906 # Check whether --with-freetype-src was given.
56907 if test "${with_freetype_src+set}" = set; then :
56908   withval=$with_freetype_src;
56909 fi
56910 
56911   # Check whether --enable-freetype-bundling was given.
56912 if test "${enable_freetype_bundling+set}" = set; then :
56913   enableval=$enable_freetype_bundling;
56914 fi
56915 
56916 
56917   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56918   FREETYPE_BASE_NAME=freetype
56919   FREETYPE_CFLAGS=
56920   FREETYPE_LIBS=
56921   FREETYPE_BUNDLE_LIB_PATH=
56922 
56923   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56924     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56925         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56926         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56927         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56928       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56929 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56930     fi
56931     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56932       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56933 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56934     fi
56935   else
56936     # freetype is needed to build; go get it!
56937 
56938     BUNDLE_FREETYPE="$enable_freetype_bundling"
56939 
56940     if  test "x$with_freetype_src" != x; then
56941       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56942         # Try to build freetype if --with-freetype-src was given on Windows
56943 
56944   FREETYPE_SRC_PATH="$with_freetype_src"
56945   BUILD_FREETYPE=yes
56946 
56947   # Check if the freetype sources are acessible..
56948   if ! test -d $FREETYPE_SRC_PATH; then
56949     { $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
56950 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56951     BUILD_FREETYPE=no
56952   fi
56953   # ..and contain a vc2010 project file
56954   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56955   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56956     { $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
56957 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56958     BUILD_FREETYPE=no
56959   fi
56960   # Now check if configure found a version of 'msbuild.exe'
56961   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56962     { $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
56963 $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;}
56964     BUILD_FREETYPE=no
56965   fi
56966 
56967   # Ready to go..
56968   if test "x$BUILD_FREETYPE" = xyes; then
56969     # msbuild requires trailing slashes for output directories
56970     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56971     freetype_lib_path_unix="$freetype_lib_path"
56972     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56973 
56974   unix_path="$vcxproj_path"
56975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56976     windows_path=`$CYGPATH -m "$unix_path"`
56977     vcxproj_path="$windows_path"
56978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56979     windows_path=`cmd //c echo $unix_path`
56980     vcxproj_path="$windows_path"
56981   fi
56982 
56983 
56984   unix_path="$freetype_lib_path"
56985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56986     windows_path=`$CYGPATH -m "$unix_path"`
56987     freetype_lib_path="$windows_path"
56988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56989     windows_path=`cmd //c echo $unix_path`
56990     freetype_lib_path="$windows_path"
56991   fi
56992 
56993 
56994   unix_path="$freetype_obj_path"
56995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56996     windows_path=`$CYGPATH -m "$unix_path"`
56997     freetype_obj_path="$windows_path"
56998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56999     windows_path=`cmd //c echo $unix_path`
57000     freetype_obj_path="$windows_path"
57001   fi
57002 
57003     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57004       freetype_platform=x64
57005     else
57006       freetype_platform=win32
57007     fi
57008 
57009     # The original freetype project file is for VS 2010 (i.e. 'v100'),
57010     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57011     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57012     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57013     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57014 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57015 
57016     # First we try to build the freetype.dll
57017     $ECHO -e "@echo off\n"\
57018         "$MSBUILD $vcxproj_path "\
57019         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57020         "/p:Configuration=\"Release Multithreaded\" "\
57021         "/p:Platform=$freetype_platform "\
57022         "/p:ConfigurationType=DynamicLibrary "\
57023         "/p:TargetName=freetype "\
57024         "/p:OutDir=\"$freetype_lib_path\" "\
57025         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57026     cmd /c freetype.bat
57027 
57028     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57029       # If that succeeds we also build freetype.lib
57030       $ECHO -e "@echo off\n"\
57031           "$MSBUILD $vcxproj_path "\
57032           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57033           "/p:Configuration=\"Release Multithreaded\" "\
57034           "/p:Platform=$freetype_platform "\
57035           "/p:ConfigurationType=StaticLibrary "\
57036           "/p:TargetName=freetype "\
57037           "/p:OutDir=\"$freetype_lib_path\" "\
57038           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57039       cmd /c freetype.bat
57040 
57041       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57042         # Once we build both, lib and dll, set freetype lib and include path appropriately
57043         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57044         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57045         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57046 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57047       else
57048         BUILD_FREETYPE=no
57049       fi
57050     else
57051       BUILD_FREETYPE=no
57052     fi
57053   fi
57054 
57055         if test "x$BUILD_FREETYPE" = xyes; then
57056           # Okay, we built it. Check that it works.
57057 
57058   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57059   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57060   METHOD="--with-freetype-src"
57061 
57062   # Let's start with an optimistic view of the world :-)
57063   FOUND_FREETYPE=yes
57064 
57065   # First look for the canonical freetype main include file ft2build.h.
57066   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57067     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57068     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57069     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57070       # Fail.
57071       FOUND_FREETYPE=no
57072     fi
57073   fi
57074 
57075   if test "x$FOUND_FREETYPE" = xyes; then
57076     # Include file found, let's continue the sanity check.
57077     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57078 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57079 
57080     # Reset to default value
57081     FREETYPE_BASE_NAME=freetype
57082     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57083     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57084       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57085           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57086         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57087         # for the .6 version explicitly.
57088         FREETYPE_BASE_NAME=freetype.6
57089         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57090         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57091 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57092       else
57093         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57094 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57095         FOUND_FREETYPE=no
57096       fi
57097     else
57098       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57099         # On Windows, we will need both .lib and .dll file.
57100         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57101           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57102 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57103           FOUND_FREETYPE=no
57104         fi
57105       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57106           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57107         # Found lib in isa dir, use that instead.
57108         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57109         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57110 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57111       fi
57112     fi
57113   fi
57114 
57115   if test "x$FOUND_FREETYPE" = xyes; then
57116 
57117   # Only process if variable expands to non-empty
57118 
57119   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57121 
57122   # Input might be given as Windows format, start by converting to
57123   # unix format.
57124   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57125   new_path=`$CYGPATH -u "$path"`
57126 
57127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57130   # "foo.exe" is OK but "foo" is an error.
57131   #
57132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57133   # It is also a way to make sure we got the proper file name for the real test later on.
57134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57135   if test "x$test_shortpath" = x; then
57136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57137 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57138     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57139   fi
57140 
57141   # Call helper function which possibly converts this using DOS-style short mode.
57142   # If so, the updated path is stored in $new_path.
57143 
57144   input_path="$new_path"
57145   # Check if we need to convert this using DOS-style short mode. If the path
57146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57147   # take no chances and rewrite it.
57148   # Note: m4 eats our [], so we need to use [ and ] instead.
57149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57150   if test "x$has_forbidden_chars" != x; then
57151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57155       # Going to short mode and back again did indeed matter. Since short mode is
57156       # case insensitive, let's make it lowercase to improve readability.
57157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57158       # Now convert it back to Unix-style (cygpath)
57159       input_path=`$CYGPATH -u "$shortmode_path"`
57160       new_path="$input_path"
57161     fi
57162   fi
57163 
57164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57165   if test "x$test_cygdrive_prefix" = x; then
57166     # As a simple fix, exclude /usr/bin since it's not a real path.
57167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57169       # a path prefixed by /cygdrive for fixpath to work.
57170       new_path="$CYGWIN_ROOT_PATH$input_path"
57171     fi
57172   fi
57173 
57174 
57175   if test "x$path" != "x$new_path"; then
57176     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57178 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57179   fi
57180 
57181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57182 
57183   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57184   has_colon=`$ECHO $path | $GREP ^.:`
57185   new_path="$path"
57186   if test "x$has_colon" = x; then
57187     # Not in mixed or Windows style, start by that.
57188     new_path=`cmd //c echo $path`
57189   fi
57190 
57191 
57192   input_path="$new_path"
57193   # Check if we need to convert this using DOS-style short mode. If the path
57194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57195   # take no chances and rewrite it.
57196   # Note: m4 eats our [], so we need to use [ and ] instead.
57197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57198   if test "x$has_forbidden_chars" != x; then
57199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57201   fi
57202 
57203 
57204   windows_path="$new_path"
57205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57206     unix_path=`$CYGPATH -u "$windows_path"`
57207     new_path="$unix_path"
57208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57210     new_path="$unix_path"
57211   fi
57212 
57213   if test "x$path" != "x$new_path"; then
57214     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57216 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57217   fi
57218 
57219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57221 
57222     else
57223       # We're on a unix platform. Hooray! :)
57224       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57225       has_space=`$ECHO "$path" | $GREP " "`
57226       if test "x$has_space" != x; then
57227         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57228 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57229         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57230       fi
57231 
57232       # Use eval to expand a potential ~
57233       eval path="$path"
57234       if test ! -f "$path" && test ! -d "$path"; then
57235         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57236       fi
57237 
57238       if test -d "$path"; then
57239         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57240       else
57241         dir="`$DIRNAME "$path"`"
57242         base="`$BASENAME "$path"`"
57243         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57244       fi
57245     fi
57246   fi
57247 
57248 
57249   # Only process if variable expands to non-empty
57250 
57251   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57252     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57253 
57254   # Input might be given as Windows format, start by converting to
57255   # unix format.
57256   path="$POTENTIAL_FREETYPE_LIB_PATH"
57257   new_path=`$CYGPATH -u "$path"`
57258 
57259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57262   # "foo.exe" is OK but "foo" is an error.
57263   #
57264   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57265   # It is also a way to make sure we got the proper file name for the real test later on.
57266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57267   if test "x$test_shortpath" = x; then
57268     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57269 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57270     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57271   fi
57272 
57273   # Call helper function which possibly converts this using DOS-style short mode.
57274   # If so, the updated path is stored in $new_path.
57275 
57276   input_path="$new_path"
57277   # Check if we need to convert this using DOS-style short mode. If the path
57278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57279   # take no chances and rewrite it.
57280   # Note: m4 eats our [], so we need to use [ and ] instead.
57281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57282   if test "x$has_forbidden_chars" != x; then
57283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57284     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57285     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57286     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57287       # Going to short mode and back again did indeed matter. Since short mode is
57288       # case insensitive, let's make it lowercase to improve readability.
57289       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57290       # Now convert it back to Unix-style (cygpath)
57291       input_path=`$CYGPATH -u "$shortmode_path"`
57292       new_path="$input_path"
57293     fi
57294   fi
57295 
57296   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57297   if test "x$test_cygdrive_prefix" = x; then
57298     # As a simple fix, exclude /usr/bin since it's not a real path.
57299     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57300       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57301       # a path prefixed by /cygdrive for fixpath to work.
57302       new_path="$CYGWIN_ROOT_PATH$input_path"
57303     fi
57304   fi
57305 
57306 
57307   if test "x$path" != "x$new_path"; then
57308     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57310 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57311   fi
57312 
57313     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57314 
57315   path="$POTENTIAL_FREETYPE_LIB_PATH"
57316   has_colon=`$ECHO $path | $GREP ^.:`
57317   new_path="$path"
57318   if test "x$has_colon" = x; then
57319     # Not in mixed or Windows style, start by that.
57320     new_path=`cmd //c echo $path`
57321   fi
57322 
57323 
57324   input_path="$new_path"
57325   # Check if we need to convert this using DOS-style short mode. If the path
57326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57327   # take no chances and rewrite it.
57328   # Note: m4 eats our [], so we need to use [ and ] instead.
57329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57330   if test "x$has_forbidden_chars" != x; then
57331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57332     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57333   fi
57334 
57335 
57336   windows_path="$new_path"
57337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57338     unix_path=`$CYGPATH -u "$windows_path"`
57339     new_path="$unix_path"
57340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57342     new_path="$unix_path"
57343   fi
57344 
57345   if test "x$path" != "x$new_path"; then
57346     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57348 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57349   fi
57350 
57351   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57352   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57353 
57354     else
57355       # We're on a unix platform. Hooray! :)
57356       path="$POTENTIAL_FREETYPE_LIB_PATH"
57357       has_space=`$ECHO "$path" | $GREP " "`
57358       if test "x$has_space" != x; then
57359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57360 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57361         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57362       fi
57363 
57364       # Use eval to expand a potential ~
57365       eval path="$path"
57366       if test ! -f "$path" && test ! -d "$path"; then
57367         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57368       fi
57369 
57370       if test -d "$path"; then
57371         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57372       else
57373         dir="`$DIRNAME "$path"`"
57374         base="`$BASENAME "$path"`"
57375         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57376       fi
57377     fi
57378   fi
57379 
57380 
57381     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57383 $as_echo_n "checking for freetype includes... " >&6; }
57384     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57385 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57386     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57388 $as_echo_n "checking for freetype libraries... " >&6; }
57389     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57390 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57391   fi
57392 
57393           if test "x$FOUND_FREETYPE" != xyes; then
57394             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57395           fi
57396         else
57397           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57398 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57399           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57400         fi
57401       else
57402         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57403 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57404       fi
57405     fi
57406 
57407     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57408       # User has specified settings
57409 
57410       if test "x$BUNDLE_FREETYPE" = x; then
57411         # If not specified, default is to bundle freetype
57412         BUNDLE_FREETYPE=yes
57413       fi
57414 
57415       if test "x$with_freetype" != x; then
57416         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57417         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57418       fi
57419 
57420       # Allow --with-freetype-lib and --with-freetype-include to override
57421       if test "x$with_freetype_include" != x; then
57422         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57423       fi
57424       if test "x$with_freetype_lib" != x; then
57425         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57426       fi
57427 
57428       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57429         # Okay, we got it. Check that it works.
57430 
57431   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57432   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57433   METHOD="--with-freetype"
57434 
57435   # Let's start with an optimistic view of the world :-)
57436   FOUND_FREETYPE=yes
57437 
57438   # First look for the canonical freetype main include file ft2build.h.
57439   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57440     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57441     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57442     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57443       # Fail.
57444       FOUND_FREETYPE=no
57445     fi
57446   fi
57447 
57448   if test "x$FOUND_FREETYPE" = xyes; then
57449     # Include file found, let's continue the sanity check.
57450     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57451 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57452 
57453     # Reset to default value
57454     FREETYPE_BASE_NAME=freetype
57455     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57456     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57457       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57458           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57459         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57460         # for the .6 version explicitly.
57461         FREETYPE_BASE_NAME=freetype.6
57462         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57463         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57464 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57465       else
57466         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57467 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57468         FOUND_FREETYPE=no
57469       fi
57470     else
57471       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57472         # On Windows, we will need both .lib and .dll file.
57473         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57474           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57475 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57476           FOUND_FREETYPE=no
57477         fi
57478       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57479           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57480         # Found lib in isa dir, use that instead.
57481         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57482         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57483 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57484       fi
57485     fi
57486   fi
57487 
57488   if test "x$FOUND_FREETYPE" = xyes; then
57489 
57490   # Only process if variable expands to non-empty
57491 
57492   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57493     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57494 
57495   # Input might be given as Windows format, start by converting to
57496   # unix format.
57497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57498   new_path=`$CYGPATH -u "$path"`
57499 
57500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57503   # "foo.exe" is OK but "foo" is an error.
57504   #
57505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57506   # It is also a way to make sure we got the proper file name for the real test later on.
57507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57508   if test "x$test_shortpath" = x; then
57509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57510 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57511     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57512   fi
57513 
57514   # Call helper function which possibly converts this using DOS-style short mode.
57515   # If so, the updated path is stored in $new_path.
57516 
57517   input_path="$new_path"
57518   # Check if we need to convert this using DOS-style short mode. If the path
57519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57520   # take no chances and rewrite it.
57521   # Note: m4 eats our [], so we need to use [ and ] instead.
57522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57523   if test "x$has_forbidden_chars" != x; then
57524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57528       # Going to short mode and back again did indeed matter. Since short mode is
57529       # case insensitive, let's make it lowercase to improve readability.
57530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57531       # Now convert it back to Unix-style (cygpath)
57532       input_path=`$CYGPATH -u "$shortmode_path"`
57533       new_path="$input_path"
57534     fi
57535   fi
57536 
57537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57538   if test "x$test_cygdrive_prefix" = x; then
57539     # As a simple fix, exclude /usr/bin since it's not a real path.
57540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57542       # a path prefixed by /cygdrive for fixpath to work.
57543       new_path="$CYGWIN_ROOT_PATH$input_path"
57544     fi
57545   fi
57546 
57547 
57548   if test "x$path" != "x$new_path"; then
57549     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57552   fi
57553 
57554     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57555 
57556   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57557   has_colon=`$ECHO $path | $GREP ^.:`
57558   new_path="$path"
57559   if test "x$has_colon" = x; then
57560     # Not in mixed or Windows style, start by that.
57561     new_path=`cmd //c echo $path`
57562   fi
57563 
57564 
57565   input_path="$new_path"
57566   # Check if we need to convert this using DOS-style short mode. If the path
57567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57568   # take no chances and rewrite it.
57569   # Note: m4 eats our [], so we need to use [ and ] instead.
57570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57571   if test "x$has_forbidden_chars" != x; then
57572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57574   fi
57575 
57576 
57577   windows_path="$new_path"
57578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57579     unix_path=`$CYGPATH -u "$windows_path"`
57580     new_path="$unix_path"
57581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57583     new_path="$unix_path"
57584   fi
57585 
57586   if test "x$path" != "x$new_path"; then
57587     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57589 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57590   fi
57591 
57592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57594 
57595     else
57596       # We're on a unix platform. Hooray! :)
57597       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57598       has_space=`$ECHO "$path" | $GREP " "`
57599       if test "x$has_space" != x; then
57600         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57601 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57602         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57603       fi
57604 
57605       # Use eval to expand a potential ~
57606       eval path="$path"
57607       if test ! -f "$path" && test ! -d "$path"; then
57608         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57609       fi
57610 
57611       if test -d "$path"; then
57612         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57613       else
57614         dir="`$DIRNAME "$path"`"
57615         base="`$BASENAME "$path"`"
57616         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57617       fi
57618     fi
57619   fi
57620 
57621 
57622   # Only process if variable expands to non-empty
57623 
57624   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57625     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57626 
57627   # Input might be given as Windows format, start by converting to
57628   # unix format.
57629   path="$POTENTIAL_FREETYPE_LIB_PATH"
57630   new_path=`$CYGPATH -u "$path"`
57631 
57632   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57633   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57634   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57635   # "foo.exe" is OK but "foo" is an error.
57636   #
57637   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57638   # It is also a way to make sure we got the proper file name for the real test later on.
57639   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57640   if test "x$test_shortpath" = x; then
57641     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57642 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57643     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57644   fi
57645 
57646   # Call helper function which possibly converts this using DOS-style short mode.
57647   # If so, the updated path is stored in $new_path.
57648 
57649   input_path="$new_path"
57650   # Check if we need to convert this using DOS-style short mode. If the path
57651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57652   # take no chances and rewrite it.
57653   # Note: m4 eats our [], so we need to use [ and ] instead.
57654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57655   if test "x$has_forbidden_chars" != x; then
57656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57660       # Going to short mode and back again did indeed matter. Since short mode is
57661       # case insensitive, let's make it lowercase to improve readability.
57662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57663       # Now convert it back to Unix-style (cygpath)
57664       input_path=`$CYGPATH -u "$shortmode_path"`
57665       new_path="$input_path"
57666     fi
57667   fi
57668 
57669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57670   if test "x$test_cygdrive_prefix" = x; then
57671     # As a simple fix, exclude /usr/bin since it's not a real path.
57672     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57674       # a path prefixed by /cygdrive for fixpath to work.
57675       new_path="$CYGWIN_ROOT_PATH$input_path"
57676     fi
57677   fi
57678 
57679 
57680   if test "x$path" != "x$new_path"; then
57681     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57683 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57684   fi
57685 
57686     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57687 
57688   path="$POTENTIAL_FREETYPE_LIB_PATH"
57689   has_colon=`$ECHO $path | $GREP ^.:`
57690   new_path="$path"
57691   if test "x$has_colon" = x; then
57692     # Not in mixed or Windows style, start by that.
57693     new_path=`cmd //c echo $path`
57694   fi
57695 
57696 
57697   input_path="$new_path"
57698   # Check if we need to convert this using DOS-style short mode. If the path
57699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57700   # take no chances and rewrite it.
57701   # Note: m4 eats our [], so we need to use [ and ] instead.
57702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57703   if test "x$has_forbidden_chars" != x; then
57704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57705     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57706   fi
57707 
57708 
57709   windows_path="$new_path"
57710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57711     unix_path=`$CYGPATH -u "$windows_path"`
57712     new_path="$unix_path"
57713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57715     new_path="$unix_path"
57716   fi
57717 
57718   if test "x$path" != "x$new_path"; then
57719     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57721 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57722   fi
57723 
57724   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57725   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57726 
57727     else
57728       # We're on a unix platform. Hooray! :)
57729       path="$POTENTIAL_FREETYPE_LIB_PATH"
57730       has_space=`$ECHO "$path" | $GREP " "`
57731       if test "x$has_space" != x; then
57732         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57733 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57734         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57735       fi
57736 
57737       # Use eval to expand a potential ~
57738       eval path="$path"
57739       if test ! -f "$path" && test ! -d "$path"; then
57740         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57741       fi
57742 
57743       if test -d "$path"; then
57744         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57745       else
57746         dir="`$DIRNAME "$path"`"
57747         base="`$BASENAME "$path"`"
57748         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57749       fi
57750     fi
57751   fi
57752 
57753 
57754     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57756 $as_echo_n "checking for freetype includes... " >&6; }
57757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57758 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57759     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57761 $as_echo_n "checking for freetype libraries... " >&6; }
57762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57763 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57764   fi
57765 
57766         if test "x$FOUND_FREETYPE" != xyes; then
57767           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57768         fi
57769       else
57770         # User specified only one of lib or include. This is an error.
57771         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57772           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57773 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57774           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57775         else
57776           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57777 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57778           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57779         fi
57780       fi
57781     else
57782       # User did not specify settings, but we need freetype. Try to locate it.
57783 
57784       if test "x$BUNDLE_FREETYPE" = x; then
57785         # If not specified, default is to bundle freetype only on windows
57786         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57787           BUNDLE_FREETYPE=yes
57788         else
57789           BUNDLE_FREETYPE=no
57790         fi
57791       fi
57792 
57793       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57794       if test "x$SYSROOT" = x; then
57795         if test "x$FOUND_FREETYPE" != xyes; then
57796           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57797           if test "x$PKG_CONFIG" != x; then
57798 
57799 pkg_failed=no
57800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57801 $as_echo_n "checking for FREETYPE... " >&6; }
57802 
57803 if test -n "$FREETYPE_CFLAGS"; then
57804     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57805  elif test -n "$PKG_CONFIG"; then
57806     if test -n "$PKG_CONFIG" && \
57807     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57808   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57809   ac_status=$?
57810   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57811   test $ac_status = 0; }; then
57812   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57813 else
57814   pkg_failed=yes
57815 fi
57816  else
57817     pkg_failed=untried
57818 fi
57819 if test -n "$FREETYPE_LIBS"; then
57820     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57821  elif test -n "$PKG_CONFIG"; then
57822     if test -n "$PKG_CONFIG" && \
57823     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57824   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57825   ac_status=$?
57826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57827   test $ac_status = 0; }; then
57828   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57829 else
57830   pkg_failed=yes
57831 fi
57832  else
57833     pkg_failed=untried
57834 fi
57835 
57836 
57837 
57838 if test $pkg_failed = yes; then
57839 
57840 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57841         _pkg_short_errors_supported=yes
57842 else
57843         _pkg_short_errors_supported=no
57844 fi
57845         if test $_pkg_short_errors_supported = yes; then
57846                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57847         else
57848                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57849         fi
57850         # Put the nasty error message in config.log where it belongs
57851         echo "$FREETYPE_PKG_ERRORS" >&5
57852 
57853         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57854 $as_echo "no" >&6; }
57855                 FOUND_FREETYPE=no
57856 elif test $pkg_failed = untried; then
57857         FOUND_FREETYPE=no
57858 else
57859         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57860         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57862 $as_echo "yes" >&6; }
57863         FOUND_FREETYPE=yes
57864 fi
57865             if test "x$FOUND_FREETYPE" = xyes; then
57866               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57867               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57868               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57869               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57870                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57871               fi
57872               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57873               if test "x$BUNDLE_FREETYPE" = xyes; then
57874                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57875 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57876                 FOUND_FREETYPE=no
57877               else
57878                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57879 $as_echo_n "checking for freetype... " >&6; }
57880                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57881 $as_echo "yes (using pkg-config)" >&6; }
57882               fi
57883             fi
57884           fi
57885         fi
57886       fi
57887 
57888       if test "x$FOUND_FREETYPE" != xyes; then
57889         # Check in well-known locations
57890         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57891           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57892 
57893   windows_path="$FREETYPE_BASE_DIR"
57894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57895     unix_path=`$CYGPATH -u "$windows_path"`
57896     FREETYPE_BASE_DIR="$unix_path"
57897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57899     FREETYPE_BASE_DIR="$unix_path"
57900   fi
57901 
57902 
57903   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57904   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57905   METHOD="well-known location"
57906 
57907   # Let's start with an optimistic view of the world :-)
57908   FOUND_FREETYPE=yes
57909 
57910   # First look for the canonical freetype main include file ft2build.h.
57911   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57912     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57913     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57914     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57915       # Fail.
57916       FOUND_FREETYPE=no
57917     fi
57918   fi
57919 
57920   if test "x$FOUND_FREETYPE" = xyes; then
57921     # Include file found, let's continue the sanity check.
57922     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57923 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57924 
57925     # Reset to default value
57926     FREETYPE_BASE_NAME=freetype
57927     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57928     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57929       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57930           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57931         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57932         # for the .6 version explicitly.
57933         FREETYPE_BASE_NAME=freetype.6
57934         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57935         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57936 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57937       else
57938         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57939 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57940         FOUND_FREETYPE=no
57941       fi
57942     else
57943       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57944         # On Windows, we will need both .lib and .dll file.
57945         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57946           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57947 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57948           FOUND_FREETYPE=no
57949         fi
57950       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57951           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57952         # Found lib in isa dir, use that instead.
57953         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57954         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57955 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57956       fi
57957     fi
57958   fi
57959 
57960   if test "x$FOUND_FREETYPE" = xyes; then
57961 
57962   # Only process if variable expands to non-empty
57963 
57964   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57965     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57966 
57967   # Input might be given as Windows format, start by converting to
57968   # unix format.
57969   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57970   new_path=`$CYGPATH -u "$path"`
57971 
57972   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57973   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57974   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57975   # "foo.exe" is OK but "foo" is an error.
57976   #
57977   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57978   # It is also a way to make sure we got the proper file name for the real test later on.
57979   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57980   if test "x$test_shortpath" = x; then
57981     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57982 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57983     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57984   fi
57985 
57986   # Call helper function which possibly converts this using DOS-style short mode.
57987   # If so, the updated path is stored in $new_path.
57988 
57989   input_path="$new_path"
57990   # Check if we need to convert this using DOS-style short mode. If the path
57991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57992   # take no chances and rewrite it.
57993   # Note: m4 eats our [], so we need to use [ and ] instead.
57994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57995   if test "x$has_forbidden_chars" != x; then
57996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57997     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57998     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57999     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58000       # Going to short mode and back again did indeed matter. Since short mode is
58001       # case insensitive, let's make it lowercase to improve readability.
58002       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58003       # Now convert it back to Unix-style (cygpath)
58004       input_path=`$CYGPATH -u "$shortmode_path"`
58005       new_path="$input_path"
58006     fi
58007   fi
58008 
58009   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58010   if test "x$test_cygdrive_prefix" = x; then
58011     # As a simple fix, exclude /usr/bin since it's not a real path.
58012     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58013       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58014       # a path prefixed by /cygdrive for fixpath to work.
58015       new_path="$CYGWIN_ROOT_PATH$input_path"
58016     fi
58017   fi
58018 
58019 
58020   if test "x$path" != "x$new_path"; then
58021     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58023 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58024   fi
58025 
58026     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58027 
58028   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58029   has_colon=`$ECHO $path | $GREP ^.:`
58030   new_path="$path"
58031   if test "x$has_colon" = x; then
58032     # Not in mixed or Windows style, start by that.
58033     new_path=`cmd //c echo $path`
58034   fi
58035 
58036 
58037   input_path="$new_path"
58038   # Check if we need to convert this using DOS-style short mode. If the path
58039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58040   # take no chances and rewrite it.
58041   # Note: m4 eats our [], so we need to use [ and ] instead.
58042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58043   if test "x$has_forbidden_chars" != x; then
58044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58045     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58046   fi
58047 
58048 
58049   windows_path="$new_path"
58050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58051     unix_path=`$CYGPATH -u "$windows_path"`
58052     new_path="$unix_path"
58053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58055     new_path="$unix_path"
58056   fi
58057 
58058   if test "x$path" != "x$new_path"; then
58059     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58061 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58062   fi
58063 
58064   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58065   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58066 
58067     else
58068       # We're on a unix platform. Hooray! :)
58069       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58070       has_space=`$ECHO "$path" | $GREP " "`
58071       if test "x$has_space" != x; then
58072         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58073 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58074         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58075       fi
58076 
58077       # Use eval to expand a potential ~
58078       eval path="$path"
58079       if test ! -f "$path" && test ! -d "$path"; then
58080         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58081       fi
58082 
58083       if test -d "$path"; then
58084         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58085       else
58086         dir="`$DIRNAME "$path"`"
58087         base="`$BASENAME "$path"`"
58088         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58089       fi
58090     fi
58091   fi
58092 
58093 
58094   # Only process if variable expands to non-empty
58095 
58096   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58097     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58098 
58099   # Input might be given as Windows format, start by converting to
58100   # unix format.
58101   path="$POTENTIAL_FREETYPE_LIB_PATH"
58102   new_path=`$CYGPATH -u "$path"`
58103 
58104   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58105   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58106   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58107   # "foo.exe" is OK but "foo" is an error.
58108   #
58109   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58110   # It is also a way to make sure we got the proper file name for the real test later on.
58111   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58112   if test "x$test_shortpath" = x; then
58113     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58114 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58115     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58116   fi
58117 
58118   # Call helper function which possibly converts this using DOS-style short mode.
58119   # If so, the updated path is stored in $new_path.
58120 
58121   input_path="$new_path"
58122   # Check if we need to convert this using DOS-style short mode. If the path
58123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58124   # take no chances and rewrite it.
58125   # Note: m4 eats our [], so we need to use [ and ] instead.
58126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58127   if test "x$has_forbidden_chars" != x; then
58128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58129     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58130     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58131     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58132       # Going to short mode and back again did indeed matter. Since short mode is
58133       # case insensitive, let's make it lowercase to improve readability.
58134       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58135       # Now convert it back to Unix-style (cygpath)
58136       input_path=`$CYGPATH -u "$shortmode_path"`
58137       new_path="$input_path"
58138     fi
58139   fi
58140 
58141   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58142   if test "x$test_cygdrive_prefix" = x; then
58143     # As a simple fix, exclude /usr/bin since it's not a real path.
58144     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58145       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58146       # a path prefixed by /cygdrive for fixpath to work.
58147       new_path="$CYGWIN_ROOT_PATH$input_path"
58148     fi
58149   fi
58150 
58151 
58152   if test "x$path" != "x$new_path"; then
58153     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58154     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58155 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58156   fi
58157 
58158     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58159 
58160   path="$POTENTIAL_FREETYPE_LIB_PATH"
58161   has_colon=`$ECHO $path | $GREP ^.:`
58162   new_path="$path"
58163   if test "x$has_colon" = x; then
58164     # Not in mixed or Windows style, start by that.
58165     new_path=`cmd //c echo $path`
58166   fi
58167 
58168 
58169   input_path="$new_path"
58170   # Check if we need to convert this using DOS-style short mode. If the path
58171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58172   # take no chances and rewrite it.
58173   # Note: m4 eats our [], so we need to use [ and ] instead.
58174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58175   if test "x$has_forbidden_chars" != x; then
58176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58177     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58178   fi
58179 
58180 
58181   windows_path="$new_path"
58182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58183     unix_path=`$CYGPATH -u "$windows_path"`
58184     new_path="$unix_path"
58185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58187     new_path="$unix_path"
58188   fi
58189 
58190   if test "x$path" != "x$new_path"; then
58191     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58192     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58193 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58194   fi
58195 
58196   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58197   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58198 
58199     else
58200       # We're on a unix platform. Hooray! :)
58201       path="$POTENTIAL_FREETYPE_LIB_PATH"
58202       has_space=`$ECHO "$path" | $GREP " "`
58203       if test "x$has_space" != x; then
58204         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58205 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58206         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58207       fi
58208 
58209       # Use eval to expand a potential ~
58210       eval path="$path"
58211       if test ! -f "$path" && test ! -d "$path"; then
58212         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58213       fi
58214 
58215       if test -d "$path"; then
58216         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58217       else
58218         dir="`$DIRNAME "$path"`"
58219         base="`$BASENAME "$path"`"
58220         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58221       fi
58222     fi
58223   fi
58224 
58225 
58226     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58228 $as_echo_n "checking for freetype includes... " >&6; }
58229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58230 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58231     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58233 $as_echo_n "checking for freetype libraries... " >&6; }
58234     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58235 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58236   fi
58237 
58238           if test "x$FOUND_FREETYPE" != xyes; then
58239             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58240 
58241   windows_path="$FREETYPE_BASE_DIR"
58242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58243     unix_path=`$CYGPATH -u "$windows_path"`
58244     FREETYPE_BASE_DIR="$unix_path"
58245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58247     FREETYPE_BASE_DIR="$unix_path"
58248   fi
58249 
58250 
58251   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58252   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58253   METHOD="well-known location"
58254 
58255   # Let's start with an optimistic view of the world :-)
58256   FOUND_FREETYPE=yes
58257 
58258   # First look for the canonical freetype main include file ft2build.h.
58259   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58260     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58261     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58262     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58263       # Fail.
58264       FOUND_FREETYPE=no
58265     fi
58266   fi
58267 
58268   if test "x$FOUND_FREETYPE" = xyes; then
58269     # Include file found, let's continue the sanity check.
58270     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58271 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58272 
58273     # Reset to default value
58274     FREETYPE_BASE_NAME=freetype
58275     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58276     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58277       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58278           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58279         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58280         # for the .6 version explicitly.
58281         FREETYPE_BASE_NAME=freetype.6
58282         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58283         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58284 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58285       else
58286         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58287 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58288         FOUND_FREETYPE=no
58289       fi
58290     else
58291       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58292         # On Windows, we will need both .lib and .dll file.
58293         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58294           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58295 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58296           FOUND_FREETYPE=no
58297         fi
58298       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58299           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58300         # Found lib in isa dir, use that instead.
58301         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58302         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58303 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58304       fi
58305     fi
58306   fi
58307 
58308   if test "x$FOUND_FREETYPE" = xyes; then
58309 
58310   # Only process if variable expands to non-empty
58311 
58312   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58313     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58314 
58315   # Input might be given as Windows format, start by converting to
58316   # unix format.
58317   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58318   new_path=`$CYGPATH -u "$path"`
58319 
58320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58323   # "foo.exe" is OK but "foo" is an error.
58324   #
58325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58326   # It is also a way to make sure we got the proper file name for the real test later on.
58327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58328   if test "x$test_shortpath" = x; then
58329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58330 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58331     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58332   fi
58333 
58334   # Call helper function which possibly converts this using DOS-style short mode.
58335   # If so, the updated path is stored in $new_path.
58336 
58337   input_path="$new_path"
58338   # Check if we need to convert this using DOS-style short mode. If the path
58339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58340   # take no chances and rewrite it.
58341   # Note: m4 eats our [], so we need to use [ and ] instead.
58342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58343   if test "x$has_forbidden_chars" != x; then
58344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58348       # Going to short mode and back again did indeed matter. Since short mode is
58349       # case insensitive, let's make it lowercase to improve readability.
58350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58351       # Now convert it back to Unix-style (cygpath)
58352       input_path=`$CYGPATH -u "$shortmode_path"`
58353       new_path="$input_path"
58354     fi
58355   fi
58356 
58357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58358   if test "x$test_cygdrive_prefix" = x; then
58359     # As a simple fix, exclude /usr/bin since it's not a real path.
58360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58362       # a path prefixed by /cygdrive for fixpath to work.
58363       new_path="$CYGWIN_ROOT_PATH$input_path"
58364     fi
58365   fi
58366 
58367 
58368   if test "x$path" != "x$new_path"; then
58369     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58371 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58372   fi
58373 
58374     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58375 
58376   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58377   has_colon=`$ECHO $path | $GREP ^.:`
58378   new_path="$path"
58379   if test "x$has_colon" = x; then
58380     # Not in mixed or Windows style, start by that.
58381     new_path=`cmd //c echo $path`
58382   fi
58383 
58384 
58385   input_path="$new_path"
58386   # Check if we need to convert this using DOS-style short mode. If the path
58387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58388   # take no chances and rewrite it.
58389   # Note: m4 eats our [], so we need to use [ and ] instead.
58390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58391   if test "x$has_forbidden_chars" != x; then
58392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58394   fi
58395 
58396 
58397   windows_path="$new_path"
58398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58399     unix_path=`$CYGPATH -u "$windows_path"`
58400     new_path="$unix_path"
58401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58403     new_path="$unix_path"
58404   fi
58405 
58406   if test "x$path" != "x$new_path"; then
58407     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58409 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58410   fi
58411 
58412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58414 
58415     else
58416       # We're on a unix platform. Hooray! :)
58417       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58418       has_space=`$ECHO "$path" | $GREP " "`
58419       if test "x$has_space" != x; then
58420         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58421 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58422         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58423       fi
58424 
58425       # Use eval to expand a potential ~
58426       eval path="$path"
58427       if test ! -f "$path" && test ! -d "$path"; then
58428         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58429       fi
58430 
58431       if test -d "$path"; then
58432         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58433       else
58434         dir="`$DIRNAME "$path"`"
58435         base="`$BASENAME "$path"`"
58436         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58437       fi
58438     fi
58439   fi
58440 
58441 
58442   # Only process if variable expands to non-empty
58443 
58444   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58445     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58446 
58447   # Input might be given as Windows format, start by converting to
58448   # unix format.
58449   path="$POTENTIAL_FREETYPE_LIB_PATH"
58450   new_path=`$CYGPATH -u "$path"`
58451 
58452   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58453   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58454   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58455   # "foo.exe" is OK but "foo" is an error.
58456   #
58457   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58458   # It is also a way to make sure we got the proper file name for the real test later on.
58459   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58460   if test "x$test_shortpath" = x; then
58461     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58462 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58463     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58464   fi
58465 
58466   # Call helper function which possibly converts this using DOS-style short mode.
58467   # If so, the updated path is stored in $new_path.
58468 
58469   input_path="$new_path"
58470   # Check if we need to convert this using DOS-style short mode. If the path
58471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58472   # take no chances and rewrite it.
58473   # Note: m4 eats our [], so we need to use [ and ] instead.
58474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58475   if test "x$has_forbidden_chars" != x; then
58476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58480       # Going to short mode and back again did indeed matter. Since short mode is
58481       # case insensitive, let's make it lowercase to improve readability.
58482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58483       # Now convert it back to Unix-style (cygpath)
58484       input_path=`$CYGPATH -u "$shortmode_path"`
58485       new_path="$input_path"
58486     fi
58487   fi
58488 
58489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58490   if test "x$test_cygdrive_prefix" = x; then
58491     # As a simple fix, exclude /usr/bin since it's not a real path.
58492     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58494       # a path prefixed by /cygdrive for fixpath to work.
58495       new_path="$CYGWIN_ROOT_PATH$input_path"
58496     fi
58497   fi
58498 
58499 
58500   if test "x$path" != "x$new_path"; then
58501     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58503 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58504   fi
58505 
58506     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58507 
58508   path="$POTENTIAL_FREETYPE_LIB_PATH"
58509   has_colon=`$ECHO $path | $GREP ^.:`
58510   new_path="$path"
58511   if test "x$has_colon" = x; then
58512     # Not in mixed or Windows style, start by that.
58513     new_path=`cmd //c echo $path`
58514   fi
58515 
58516 
58517   input_path="$new_path"
58518   # Check if we need to convert this using DOS-style short mode. If the path
58519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58520   # take no chances and rewrite it.
58521   # Note: m4 eats our [], so we need to use [ and ] instead.
58522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58523   if test "x$has_forbidden_chars" != x; then
58524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58525     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58526   fi
58527 
58528 
58529   windows_path="$new_path"
58530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58531     unix_path=`$CYGPATH -u "$windows_path"`
58532     new_path="$unix_path"
58533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58535     new_path="$unix_path"
58536   fi
58537 
58538   if test "x$path" != "x$new_path"; then
58539     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58541 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58542   fi
58543 
58544   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58545   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58546 
58547     else
58548       # We're on a unix platform. Hooray! :)
58549       path="$POTENTIAL_FREETYPE_LIB_PATH"
58550       has_space=`$ECHO "$path" | $GREP " "`
58551       if test "x$has_space" != x; then
58552         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58553 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58554         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58555       fi
58556 
58557       # Use eval to expand a potential ~
58558       eval path="$path"
58559       if test ! -f "$path" && test ! -d "$path"; then
58560         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58561       fi
58562 
58563       if test -d "$path"; then
58564         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58565       else
58566         dir="`$DIRNAME "$path"`"
58567         base="`$BASENAME "$path"`"
58568         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58569       fi
58570     fi
58571   fi
58572 
58573 
58574     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58576 $as_echo_n "checking for freetype includes... " >&6; }
58577     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58578 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58579     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58581 $as_echo_n "checking for freetype libraries... " >&6; }
58582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58583 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58584   fi
58585 
58586           fi
58587           if test "x$FOUND_FREETYPE" != xyes; then
58588             FREETYPE_BASE_DIR="$HOME/freetype"
58589 
58590   windows_path="$FREETYPE_BASE_DIR"
58591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58592     unix_path=`$CYGPATH -u "$windows_path"`
58593     FREETYPE_BASE_DIR="$unix_path"
58594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58596     FREETYPE_BASE_DIR="$unix_path"
58597   fi
58598 
58599             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58600 
58601   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58602   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58603   METHOD="well-known location"
58604 
58605   # Let's start with an optimistic view of the world :-)
58606   FOUND_FREETYPE=yes
58607 
58608   # First look for the canonical freetype main include file ft2build.h.
58609   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58610     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58611     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58612     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58613       # Fail.
58614       FOUND_FREETYPE=no
58615     fi
58616   fi
58617 
58618   if test "x$FOUND_FREETYPE" = xyes; then
58619     # Include file found, let's continue the sanity check.
58620     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58621 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58622 
58623     # Reset to default value
58624     FREETYPE_BASE_NAME=freetype
58625     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58626     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58627       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58628           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58629         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58630         # for the .6 version explicitly.
58631         FREETYPE_BASE_NAME=freetype.6
58632         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58633         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58634 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58635       else
58636         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58637 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58638         FOUND_FREETYPE=no
58639       fi
58640     else
58641       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58642         # On Windows, we will need both .lib and .dll file.
58643         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58644           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58645 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58646           FOUND_FREETYPE=no
58647         fi
58648       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58649           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58650         # Found lib in isa dir, use that instead.
58651         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58652         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58653 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58654       fi
58655     fi
58656   fi
58657 
58658   if test "x$FOUND_FREETYPE" = xyes; then
58659 
58660   # Only process if variable expands to non-empty
58661 
58662   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58663     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58664 
58665   # Input might be given as Windows format, start by converting to
58666   # unix format.
58667   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58668   new_path=`$CYGPATH -u "$path"`
58669 
58670   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58671   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58672   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58673   # "foo.exe" is OK but "foo" is an error.
58674   #
58675   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58676   # It is also a way to make sure we got the proper file name for the real test later on.
58677   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58678   if test "x$test_shortpath" = x; then
58679     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58680 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58681     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58682   fi
58683 
58684   # Call helper function which possibly converts this using DOS-style short mode.
58685   # If so, the updated path is stored in $new_path.
58686 
58687   input_path="$new_path"
58688   # Check if we need to convert this using DOS-style short mode. If the path
58689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58690   # take no chances and rewrite it.
58691   # Note: m4 eats our [], so we need to use [ and ] instead.
58692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58693   if test "x$has_forbidden_chars" != x; then
58694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58695     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58696     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58697     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58698       # Going to short mode and back again did indeed matter. Since short mode is
58699       # case insensitive, let's make it lowercase to improve readability.
58700       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58701       # Now convert it back to Unix-style (cygpath)
58702       input_path=`$CYGPATH -u "$shortmode_path"`
58703       new_path="$input_path"
58704     fi
58705   fi
58706 
58707   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58708   if test "x$test_cygdrive_prefix" = x; then
58709     # As a simple fix, exclude /usr/bin since it's not a real path.
58710     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58711       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58712       # a path prefixed by /cygdrive for fixpath to work.
58713       new_path="$CYGWIN_ROOT_PATH$input_path"
58714     fi
58715   fi
58716 
58717 
58718   if test "x$path" != "x$new_path"; then
58719     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58721 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58722   fi
58723 
58724     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58725 
58726   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58727   has_colon=`$ECHO $path | $GREP ^.:`
58728   new_path="$path"
58729   if test "x$has_colon" = x; then
58730     # Not in mixed or Windows style, start by that.
58731     new_path=`cmd //c echo $path`
58732   fi
58733 
58734 
58735   input_path="$new_path"
58736   # Check if we need to convert this using DOS-style short mode. If the path
58737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58738   # take no chances and rewrite it.
58739   # Note: m4 eats our [], so we need to use [ and ] instead.
58740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58741   if test "x$has_forbidden_chars" != x; then
58742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58743     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58744   fi
58745 
58746 
58747   windows_path="$new_path"
58748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58749     unix_path=`$CYGPATH -u "$windows_path"`
58750     new_path="$unix_path"
58751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58753     new_path="$unix_path"
58754   fi
58755 
58756   if test "x$path" != "x$new_path"; then
58757     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58758     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58759 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58760   fi
58761 
58762   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58763   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58764 
58765     else
58766       # We're on a unix platform. Hooray! :)
58767       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58768       has_space=`$ECHO "$path" | $GREP " "`
58769       if test "x$has_space" != x; then
58770         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58771 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58772         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58773       fi
58774 
58775       # Use eval to expand a potential ~
58776       eval path="$path"
58777       if test ! -f "$path" && test ! -d "$path"; then
58778         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58779       fi
58780 
58781       if test -d "$path"; then
58782         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58783       else
58784         dir="`$DIRNAME "$path"`"
58785         base="`$BASENAME "$path"`"
58786         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58787       fi
58788     fi
58789   fi
58790 
58791 
58792   # Only process if variable expands to non-empty
58793 
58794   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58795     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58796 
58797   # Input might be given as Windows format, start by converting to
58798   # unix format.
58799   path="$POTENTIAL_FREETYPE_LIB_PATH"
58800   new_path=`$CYGPATH -u "$path"`
58801 
58802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58805   # "foo.exe" is OK but "foo" is an error.
58806   #
58807   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58808   # It is also a way to make sure we got the proper file name for the real test later on.
58809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58810   if test "x$test_shortpath" = x; then
58811     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58812 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58813     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58814   fi
58815 
58816   # Call helper function which possibly converts this using DOS-style short mode.
58817   # If so, the updated path is stored in $new_path.
58818 
58819   input_path="$new_path"
58820   # Check if we need to convert this using DOS-style short mode. If the path
58821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58822   # take no chances and rewrite it.
58823   # Note: m4 eats our [], so we need to use [ and ] instead.
58824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58825   if test "x$has_forbidden_chars" != x; then
58826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58827     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58828     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58829     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58830       # Going to short mode and back again did indeed matter. Since short mode is
58831       # case insensitive, let's make it lowercase to improve readability.
58832       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58833       # Now convert it back to Unix-style (cygpath)
58834       input_path=`$CYGPATH -u "$shortmode_path"`
58835       new_path="$input_path"
58836     fi
58837   fi
58838 
58839   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58840   if test "x$test_cygdrive_prefix" = x; then
58841     # As a simple fix, exclude /usr/bin since it's not a real path.
58842     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58843       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58844       # a path prefixed by /cygdrive for fixpath to work.
58845       new_path="$CYGWIN_ROOT_PATH$input_path"
58846     fi
58847   fi
58848 
58849 
58850   if test "x$path" != "x$new_path"; then
58851     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58854   fi
58855 
58856     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58857 
58858   path="$POTENTIAL_FREETYPE_LIB_PATH"
58859   has_colon=`$ECHO $path | $GREP ^.:`
58860   new_path="$path"
58861   if test "x$has_colon" = x; then
58862     # Not in mixed or Windows style, start by that.
58863     new_path=`cmd //c echo $path`
58864   fi
58865 
58866 
58867   input_path="$new_path"
58868   # Check if we need to convert this using DOS-style short mode. If the path
58869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58870   # take no chances and rewrite it.
58871   # Note: m4 eats our [], so we need to use [ and ] instead.
58872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58873   if test "x$has_forbidden_chars" != x; then
58874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58876   fi
58877 
58878 
58879   windows_path="$new_path"
58880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58881     unix_path=`$CYGPATH -u "$windows_path"`
58882     new_path="$unix_path"
58883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58885     new_path="$unix_path"
58886   fi
58887 
58888   if test "x$path" != "x$new_path"; then
58889     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58891 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58892   fi
58893 
58894   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58895   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58896 
58897     else
58898       # We're on a unix platform. Hooray! :)
58899       path="$POTENTIAL_FREETYPE_LIB_PATH"
58900       has_space=`$ECHO "$path" | $GREP " "`
58901       if test "x$has_space" != x; then
58902         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58903 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58904         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58905       fi
58906 
58907       # Use eval to expand a potential ~
58908       eval path="$path"
58909       if test ! -f "$path" && test ! -d "$path"; then
58910         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58911       fi
58912 
58913       if test -d "$path"; then
58914         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58915       else
58916         dir="`$DIRNAME "$path"`"
58917         base="`$BASENAME "$path"`"
58918         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58919       fi
58920     fi
58921   fi
58922 
58923 
58924     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58926 $as_echo_n "checking for freetype includes... " >&6; }
58927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58928 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58929     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58931 $as_echo_n "checking for freetype libraries... " >&6; }
58932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58933 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58934   fi
58935 
58936             else
58937 
58938   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58939   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58940   METHOD="well-known location"
58941 
58942   # Let's start with an optimistic view of the world :-)
58943   FOUND_FREETYPE=yes
58944 
58945   # First look for the canonical freetype main include file ft2build.h.
58946   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58947     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58948     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58949     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58950       # Fail.
58951       FOUND_FREETYPE=no
58952     fi
58953   fi
58954 
58955   if test "x$FOUND_FREETYPE" = xyes; then
58956     # Include file found, let's continue the sanity check.
58957     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58958 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58959 
58960     # Reset to default value
58961     FREETYPE_BASE_NAME=freetype
58962     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58963     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58964       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58965           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58966         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58967         # for the .6 version explicitly.
58968         FREETYPE_BASE_NAME=freetype.6
58969         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58970         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58971 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58972       else
58973         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58974 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58975         FOUND_FREETYPE=no
58976       fi
58977     else
58978       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58979         # On Windows, we will need both .lib and .dll file.
58980         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58981           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58982 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58983           FOUND_FREETYPE=no
58984         fi
58985       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58986           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58987         # Found lib in isa dir, use that instead.
58988         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58989         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58990 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58991       fi
58992     fi
58993   fi
58994 
58995   if test "x$FOUND_FREETYPE" = xyes; then
58996 
58997   # Only process if variable expands to non-empty
58998 
58999   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59000     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59001 
59002   # Input might be given as Windows format, start by converting to
59003   # unix format.
59004   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59005   new_path=`$CYGPATH -u "$path"`
59006 
59007   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59008   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59009   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59010   # "foo.exe" is OK but "foo" is an error.
59011   #
59012   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59013   # It is also a way to make sure we got the proper file name for the real test later on.
59014   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59015   if test "x$test_shortpath" = x; then
59016     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59017 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59018     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59019   fi
59020 
59021   # Call helper function which possibly converts this using DOS-style short mode.
59022   # If so, the updated path is stored in $new_path.
59023 
59024   input_path="$new_path"
59025   # Check if we need to convert this using DOS-style short mode. If the path
59026   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59027   # take no chances and rewrite it.
59028   # Note: m4 eats our [], so we need to use [ and ] instead.
59029   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59030   if test "x$has_forbidden_chars" != x; then
59031     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59032     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59033     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59034     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59035       # Going to short mode and back again did indeed matter. Since short mode is
59036       # case insensitive, let's make it lowercase to improve readability.
59037       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59038       # Now convert it back to Unix-style (cygpath)
59039       input_path=`$CYGPATH -u "$shortmode_path"`
59040       new_path="$input_path"
59041     fi
59042   fi
59043 
59044   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59045   if test "x$test_cygdrive_prefix" = x; then
59046     # As a simple fix, exclude /usr/bin since it's not a real path.
59047     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59048       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59049       # a path prefixed by /cygdrive for fixpath to work.
59050       new_path="$CYGWIN_ROOT_PATH$input_path"
59051     fi
59052   fi
59053 
59054 
59055   if test "x$path" != "x$new_path"; then
59056     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59058 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59059   fi
59060 
59061     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59062 
59063   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59064   has_colon=`$ECHO $path | $GREP ^.:`
59065   new_path="$path"
59066   if test "x$has_colon" = x; then
59067     # Not in mixed or Windows style, start by that.
59068     new_path=`cmd //c echo $path`
59069   fi
59070 
59071 
59072   input_path="$new_path"
59073   # Check if we need to convert this using DOS-style short mode. If the path
59074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59075   # take no chances and rewrite it.
59076   # Note: m4 eats our [], so we need to use [ and ] instead.
59077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59078   if test "x$has_forbidden_chars" != x; then
59079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59080     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59081   fi
59082 
59083 
59084   windows_path="$new_path"
59085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59086     unix_path=`$CYGPATH -u "$windows_path"`
59087     new_path="$unix_path"
59088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59090     new_path="$unix_path"
59091   fi
59092 
59093   if test "x$path" != "x$new_path"; then
59094     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59096 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59097   fi
59098 
59099   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59100   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59101 
59102     else
59103       # We're on a unix platform. Hooray! :)
59104       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59105       has_space=`$ECHO "$path" | $GREP " "`
59106       if test "x$has_space" != x; then
59107         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59108 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59109         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59110       fi
59111 
59112       # Use eval to expand a potential ~
59113       eval path="$path"
59114       if test ! -f "$path" && test ! -d "$path"; then
59115         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59116       fi
59117 
59118       if test -d "$path"; then
59119         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59120       else
59121         dir="`$DIRNAME "$path"`"
59122         base="`$BASENAME "$path"`"
59123         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59124       fi
59125     fi
59126   fi
59127 
59128 
59129   # Only process if variable expands to non-empty
59130 
59131   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59132     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59133 
59134   # Input might be given as Windows format, start by converting to
59135   # unix format.
59136   path="$POTENTIAL_FREETYPE_LIB_PATH"
59137   new_path=`$CYGPATH -u "$path"`
59138 
59139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59142   # "foo.exe" is OK but "foo" is an error.
59143   #
59144   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59145   # It is also a way to make sure we got the proper file name for the real test later on.
59146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59147   if test "x$test_shortpath" = x; then
59148     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59149 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59150     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59151   fi
59152 
59153   # Call helper function which possibly converts this using DOS-style short mode.
59154   # If so, the updated path is stored in $new_path.
59155 
59156   input_path="$new_path"
59157   # Check if we need to convert this using DOS-style short mode. If the path
59158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59159   # take no chances and rewrite it.
59160   # Note: m4 eats our [], so we need to use [ and ] instead.
59161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59162   if test "x$has_forbidden_chars" != x; then
59163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59167       # Going to short mode and back again did indeed matter. Since short mode is
59168       # case insensitive, let's make it lowercase to improve readability.
59169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59170       # Now convert it back to Unix-style (cygpath)
59171       input_path=`$CYGPATH -u "$shortmode_path"`
59172       new_path="$input_path"
59173     fi
59174   fi
59175 
59176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59177   if test "x$test_cygdrive_prefix" = x; then
59178     # As a simple fix, exclude /usr/bin since it's not a real path.
59179     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59181       # a path prefixed by /cygdrive for fixpath to work.
59182       new_path="$CYGWIN_ROOT_PATH$input_path"
59183     fi
59184   fi
59185 
59186 
59187   if test "x$path" != "x$new_path"; then
59188     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59190 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59191   fi
59192 
59193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59194 
59195   path="$POTENTIAL_FREETYPE_LIB_PATH"
59196   has_colon=`$ECHO $path | $GREP ^.:`
59197   new_path="$path"
59198   if test "x$has_colon" = x; then
59199     # Not in mixed or Windows style, start by that.
59200     new_path=`cmd //c echo $path`
59201   fi
59202 
59203 
59204   input_path="$new_path"
59205   # Check if we need to convert this using DOS-style short mode. If the path
59206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59207   # take no chances and rewrite it.
59208   # Note: m4 eats our [], so we need to use [ and ] instead.
59209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59210   if test "x$has_forbidden_chars" != x; then
59211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59213   fi
59214 
59215 
59216   windows_path="$new_path"
59217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59218     unix_path=`$CYGPATH -u "$windows_path"`
59219     new_path="$unix_path"
59220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59222     new_path="$unix_path"
59223   fi
59224 
59225   if test "x$path" != "x$new_path"; then
59226     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59228 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59229   fi
59230 
59231   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59232   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59233 
59234     else
59235       # We're on a unix platform. Hooray! :)
59236       path="$POTENTIAL_FREETYPE_LIB_PATH"
59237       has_space=`$ECHO "$path" | $GREP " "`
59238       if test "x$has_space" != x; then
59239         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59240 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59241         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59242       fi
59243 
59244       # Use eval to expand a potential ~
59245       eval path="$path"
59246       if test ! -f "$path" && test ! -d "$path"; then
59247         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59248       fi
59249 
59250       if test -d "$path"; then
59251         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59252       else
59253         dir="`$DIRNAME "$path"`"
59254         base="`$BASENAME "$path"`"
59255         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59256       fi
59257     fi
59258   fi
59259 
59260 
59261     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59263 $as_echo_n "checking for freetype includes... " >&6; }
59264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59265 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59266     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59268 $as_echo_n "checking for freetype libraries... " >&6; }
59269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59270 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59271   fi
59272 
59273             fi
59274             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59275                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59276               # Source is available, as a last resort try to build freetype in default location
59277 
59278   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59279   BUILD_FREETYPE=yes
59280 
59281   # Check if the freetype sources are acessible..
59282   if ! test -d $FREETYPE_SRC_PATH; then
59283     { $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
59284 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59285     BUILD_FREETYPE=no
59286   fi
59287   # ..and contain a vc2010 project file
59288   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59289   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59290     { $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
59291 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59292     BUILD_FREETYPE=no
59293   fi
59294   # Now check if configure found a version of 'msbuild.exe'
59295   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59296     { $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
59297 $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;}
59298     BUILD_FREETYPE=no
59299   fi
59300 
59301   # Ready to go..
59302   if test "x$BUILD_FREETYPE" = xyes; then
59303     # msbuild requires trailing slashes for output directories
59304     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59305     freetype_lib_path_unix="$freetype_lib_path"
59306     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59307 
59308   unix_path="$vcxproj_path"
59309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59310     windows_path=`$CYGPATH -m "$unix_path"`
59311     vcxproj_path="$windows_path"
59312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59313     windows_path=`cmd //c echo $unix_path`
59314     vcxproj_path="$windows_path"
59315   fi
59316 
59317 
59318   unix_path="$freetype_lib_path"
59319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59320     windows_path=`$CYGPATH -m "$unix_path"`
59321     freetype_lib_path="$windows_path"
59322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59323     windows_path=`cmd //c echo $unix_path`
59324     freetype_lib_path="$windows_path"
59325   fi
59326 
59327 
59328   unix_path="$freetype_obj_path"
59329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59330     windows_path=`$CYGPATH -m "$unix_path"`
59331     freetype_obj_path="$windows_path"
59332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59333     windows_path=`cmd //c echo $unix_path`
59334     freetype_obj_path="$windows_path"
59335   fi
59336 
59337     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59338       freetype_platform=x64
59339     else
59340       freetype_platform=win32
59341     fi
59342 
59343     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59344     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59345     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59346     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59347     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59348 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59349 
59350     # First we try to build the freetype.dll
59351     $ECHO -e "@echo off\n"\
59352         "$MSBUILD $vcxproj_path "\
59353         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59354         "/p:Configuration=\"Release Multithreaded\" "\
59355         "/p:Platform=$freetype_platform "\
59356         "/p:ConfigurationType=DynamicLibrary "\
59357         "/p:TargetName=freetype "\
59358         "/p:OutDir=\"$freetype_lib_path\" "\
59359         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59360     cmd /c freetype.bat
59361 
59362     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59363       # If that succeeds we also build freetype.lib
59364       $ECHO -e "@echo off\n"\
59365           "$MSBUILD $vcxproj_path "\
59366           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59367           "/p:Configuration=\"Release Multithreaded\" "\
59368           "/p:Platform=$freetype_platform "\
59369           "/p:ConfigurationType=StaticLibrary "\
59370           "/p:TargetName=freetype "\
59371           "/p:OutDir=\"$freetype_lib_path\" "\
59372           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59373       cmd /c freetype.bat
59374 
59375       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59376         # Once we build both, lib and dll, set freetype lib and include path appropriately
59377         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59378         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59379         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59380 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59381       else
59382         BUILD_FREETYPE=no
59383       fi
59384     else
59385       BUILD_FREETYPE=no
59386     fi
59387   fi
59388 
59389               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59390 
59391   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59392   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59393   METHOD="well-known location"
59394 
59395   # Let's start with an optimistic view of the world :-)
59396   FOUND_FREETYPE=yes
59397 
59398   # First look for the canonical freetype main include file ft2build.h.
59399   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59400     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59401     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59402     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59403       # Fail.
59404       FOUND_FREETYPE=no
59405     fi
59406   fi
59407 
59408   if test "x$FOUND_FREETYPE" = xyes; then
59409     # Include file found, let's continue the sanity check.
59410     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59411 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59412 
59413     # Reset to default value
59414     FREETYPE_BASE_NAME=freetype
59415     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59416     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59417       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59418           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59419         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59420         # for the .6 version explicitly.
59421         FREETYPE_BASE_NAME=freetype.6
59422         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59423         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59424 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59425       else
59426         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59427 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59428         FOUND_FREETYPE=no
59429       fi
59430     else
59431       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59432         # On Windows, we will need both .lib and .dll file.
59433         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59434           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59435 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59436           FOUND_FREETYPE=no
59437         fi
59438       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59439           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59440         # Found lib in isa dir, use that instead.
59441         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59442         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59443 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59444       fi
59445     fi
59446   fi
59447 
59448   if test "x$FOUND_FREETYPE" = xyes; then
59449 
59450   # Only process if variable expands to non-empty
59451 
59452   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59454 
59455   # Input might be given as Windows format, start by converting to
59456   # unix format.
59457   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59458   new_path=`$CYGPATH -u "$path"`
59459 
59460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59463   # "foo.exe" is OK but "foo" is an error.
59464   #
59465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59466   # It is also a way to make sure we got the proper file name for the real test later on.
59467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59468   if test "x$test_shortpath" = x; then
59469     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59470 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59471     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59472   fi
59473 
59474   # Call helper function which possibly converts this using DOS-style short mode.
59475   # If so, the updated path is stored in $new_path.
59476 
59477   input_path="$new_path"
59478   # Check if we need to convert this using DOS-style short mode. If the path
59479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59480   # take no chances and rewrite it.
59481   # Note: m4 eats our [], so we need to use [ and ] instead.
59482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59483   if test "x$has_forbidden_chars" != x; then
59484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59488       # Going to short mode and back again did indeed matter. Since short mode is
59489       # case insensitive, let's make it lowercase to improve readability.
59490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59491       # Now convert it back to Unix-style (cygpath)
59492       input_path=`$CYGPATH -u "$shortmode_path"`
59493       new_path="$input_path"
59494     fi
59495   fi
59496 
59497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59498   if test "x$test_cygdrive_prefix" = x; then
59499     # As a simple fix, exclude /usr/bin since it's not a real path.
59500     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59502       # a path prefixed by /cygdrive for fixpath to work.
59503       new_path="$CYGWIN_ROOT_PATH$input_path"
59504     fi
59505   fi
59506 
59507 
59508   if test "x$path" != "x$new_path"; then
59509     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59511 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59512   fi
59513 
59514     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59515 
59516   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59517   has_colon=`$ECHO $path | $GREP ^.:`
59518   new_path="$path"
59519   if test "x$has_colon" = x; then
59520     # Not in mixed or Windows style, start by that.
59521     new_path=`cmd //c echo $path`
59522   fi
59523 
59524 
59525   input_path="$new_path"
59526   # Check if we need to convert this using DOS-style short mode. If the path
59527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59528   # take no chances and rewrite it.
59529   # Note: m4 eats our [], so we need to use [ and ] instead.
59530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59531   if test "x$has_forbidden_chars" != x; then
59532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59533     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59534   fi
59535 
59536 
59537   windows_path="$new_path"
59538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59539     unix_path=`$CYGPATH -u "$windows_path"`
59540     new_path="$unix_path"
59541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59543     new_path="$unix_path"
59544   fi
59545 
59546   if test "x$path" != "x$new_path"; then
59547     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59549 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59550   fi
59551 
59552   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59553   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59554 
59555     else
59556       # We're on a unix platform. Hooray! :)
59557       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59558       has_space=`$ECHO "$path" | $GREP " "`
59559       if test "x$has_space" != x; then
59560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59561 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59562         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59563       fi
59564 
59565       # Use eval to expand a potential ~
59566       eval path="$path"
59567       if test ! -f "$path" && test ! -d "$path"; then
59568         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59569       fi
59570 
59571       if test -d "$path"; then
59572         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59573       else
59574         dir="`$DIRNAME "$path"`"
59575         base="`$BASENAME "$path"`"
59576         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59577       fi
59578     fi
59579   fi
59580 
59581 
59582   # Only process if variable expands to non-empty
59583 
59584   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59586 
59587   # Input might be given as Windows format, start by converting to
59588   # unix format.
59589   path="$POTENTIAL_FREETYPE_LIB_PATH"
59590   new_path=`$CYGPATH -u "$path"`
59591 
59592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59595   # "foo.exe" is OK but "foo" is an error.
59596   #
59597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59598   # It is also a way to make sure we got the proper file name for the real test later on.
59599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59600   if test "x$test_shortpath" = x; then
59601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59602 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59603     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59604   fi
59605 
59606   # Call helper function which possibly converts this using DOS-style short mode.
59607   # If so, the updated path is stored in $new_path.
59608 
59609   input_path="$new_path"
59610   # Check if we need to convert this using DOS-style short mode. If the path
59611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59612   # take no chances and rewrite it.
59613   # Note: m4 eats our [], so we need to use [ and ] instead.
59614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59615   if test "x$has_forbidden_chars" != x; then
59616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59620       # Going to short mode and back again did indeed matter. Since short mode is
59621       # case insensitive, let's make it lowercase to improve readability.
59622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59623       # Now convert it back to Unix-style (cygpath)
59624       input_path=`$CYGPATH -u "$shortmode_path"`
59625       new_path="$input_path"
59626     fi
59627   fi
59628 
59629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59630   if test "x$test_cygdrive_prefix" = x; then
59631     # As a simple fix, exclude /usr/bin since it's not a real path.
59632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59634       # a path prefixed by /cygdrive for fixpath to work.
59635       new_path="$CYGWIN_ROOT_PATH$input_path"
59636     fi
59637   fi
59638 
59639 
59640   if test "x$path" != "x$new_path"; then
59641     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59643 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59644   fi
59645 
59646     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59647 
59648   path="$POTENTIAL_FREETYPE_LIB_PATH"
59649   has_colon=`$ECHO $path | $GREP ^.:`
59650   new_path="$path"
59651   if test "x$has_colon" = x; then
59652     # Not in mixed or Windows style, start by that.
59653     new_path=`cmd //c echo $path`
59654   fi
59655 
59656 
59657   input_path="$new_path"
59658   # Check if we need to convert this using DOS-style short mode. If the path
59659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59660   # take no chances and rewrite it.
59661   # Note: m4 eats our [], so we need to use [ and ] instead.
59662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59663   if test "x$has_forbidden_chars" != x; then
59664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59666   fi
59667 
59668 
59669   windows_path="$new_path"
59670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59671     unix_path=`$CYGPATH -u "$windows_path"`
59672     new_path="$unix_path"
59673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59675     new_path="$unix_path"
59676   fi
59677 
59678   if test "x$path" != "x$new_path"; then
59679     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59681 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59682   fi
59683 
59684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59686 
59687     else
59688       # We're on a unix platform. Hooray! :)
59689       path="$POTENTIAL_FREETYPE_LIB_PATH"
59690       has_space=`$ECHO "$path" | $GREP " "`
59691       if test "x$has_space" != x; then
59692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59693 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59694         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59695       fi
59696 
59697       # Use eval to expand a potential ~
59698       eval path="$path"
59699       if test ! -f "$path" && test ! -d "$path"; then
59700         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59701       fi
59702 
59703       if test -d "$path"; then
59704         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59705       else
59706         dir="`$DIRNAME "$path"`"
59707         base="`$BASENAME "$path"`"
59708         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59709       fi
59710     fi
59711   fi
59712 
59713 
59714     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59716 $as_echo_n "checking for freetype includes... " >&6; }
59717     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59718 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59719     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59721 $as_echo_n "checking for freetype libraries... " >&6; }
59722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59723 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59724   fi
59725 
59726               else
59727 
59728   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59729   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59730   METHOD="well-known location"
59731 
59732   # Let's start with an optimistic view of the world :-)
59733   FOUND_FREETYPE=yes
59734 
59735   # First look for the canonical freetype main include file ft2build.h.
59736   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59737     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59738     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59739     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59740       # Fail.
59741       FOUND_FREETYPE=no
59742     fi
59743   fi
59744 
59745   if test "x$FOUND_FREETYPE" = xyes; then
59746     # Include file found, let's continue the sanity check.
59747     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59748 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59749 
59750     # Reset to default value
59751     FREETYPE_BASE_NAME=freetype
59752     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59753     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59754       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59755           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59756         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59757         # for the .6 version explicitly.
59758         FREETYPE_BASE_NAME=freetype.6
59759         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59760         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59761 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59762       else
59763         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59764 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59765         FOUND_FREETYPE=no
59766       fi
59767     else
59768       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59769         # On Windows, we will need both .lib and .dll file.
59770         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59771           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59772 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59773           FOUND_FREETYPE=no
59774         fi
59775       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59776           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59777         # Found lib in isa dir, use that instead.
59778         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59779         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59780 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59781       fi
59782     fi
59783   fi
59784 
59785   if test "x$FOUND_FREETYPE" = xyes; then
59786 
59787   # Only process if variable expands to non-empty
59788 
59789   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59791 
59792   # Input might be given as Windows format, start by converting to
59793   # unix format.
59794   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59795   new_path=`$CYGPATH -u "$path"`
59796 
59797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59800   # "foo.exe" is OK but "foo" is an error.
59801   #
59802   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59803   # It is also a way to make sure we got the proper file name for the real test later on.
59804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59805   if test "x$test_shortpath" = x; then
59806     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59807 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59808     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59809   fi
59810 
59811   # Call helper function which possibly converts this using DOS-style short mode.
59812   # If so, the updated path is stored in $new_path.
59813 
59814   input_path="$new_path"
59815   # Check if we need to convert this using DOS-style short mode. If the path
59816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59817   # take no chances and rewrite it.
59818   # Note: m4 eats our [], so we need to use [ and ] instead.
59819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59820   if test "x$has_forbidden_chars" != x; then
59821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59825       # Going to short mode and back again did indeed matter. Since short mode is
59826       # case insensitive, let's make it lowercase to improve readability.
59827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59828       # Now convert it back to Unix-style (cygpath)
59829       input_path=`$CYGPATH -u "$shortmode_path"`
59830       new_path="$input_path"
59831     fi
59832   fi
59833 
59834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59835   if test "x$test_cygdrive_prefix" = x; then
59836     # As a simple fix, exclude /usr/bin since it's not a real path.
59837     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59839       # a path prefixed by /cygdrive for fixpath to work.
59840       new_path="$CYGWIN_ROOT_PATH$input_path"
59841     fi
59842   fi
59843 
59844 
59845   if test "x$path" != "x$new_path"; then
59846     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59848 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59849   fi
59850 
59851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59852 
59853   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59854   has_colon=`$ECHO $path | $GREP ^.:`
59855   new_path="$path"
59856   if test "x$has_colon" = x; then
59857     # Not in mixed or Windows style, start by that.
59858     new_path=`cmd //c echo $path`
59859   fi
59860 
59861 
59862   input_path="$new_path"
59863   # Check if we need to convert this using DOS-style short mode. If the path
59864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59865   # take no chances and rewrite it.
59866   # Note: m4 eats our [], so we need to use [ and ] instead.
59867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59868   if test "x$has_forbidden_chars" != x; then
59869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59871   fi
59872 
59873 
59874   windows_path="$new_path"
59875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59876     unix_path=`$CYGPATH -u "$windows_path"`
59877     new_path="$unix_path"
59878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59880     new_path="$unix_path"
59881   fi
59882 
59883   if test "x$path" != "x$new_path"; then
59884     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59886 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59887   fi
59888 
59889   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59890   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59891 
59892     else
59893       # We're on a unix platform. Hooray! :)
59894       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59895       has_space=`$ECHO "$path" | $GREP " "`
59896       if test "x$has_space" != x; then
59897         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59898 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59899         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59900       fi
59901 
59902       # Use eval to expand a potential ~
59903       eval path="$path"
59904       if test ! -f "$path" && test ! -d "$path"; then
59905         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59906       fi
59907 
59908       if test -d "$path"; then
59909         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59910       else
59911         dir="`$DIRNAME "$path"`"
59912         base="`$BASENAME "$path"`"
59913         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59914       fi
59915     fi
59916   fi
59917 
59918 
59919   # Only process if variable expands to non-empty
59920 
59921   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59923 
59924   # Input might be given as Windows format, start by converting to
59925   # unix format.
59926   path="$POTENTIAL_FREETYPE_LIB_PATH"
59927   new_path=`$CYGPATH -u "$path"`
59928 
59929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59932   # "foo.exe" is OK but "foo" is an error.
59933   #
59934   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59935   # It is also a way to make sure we got the proper file name for the real test later on.
59936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59937   if test "x$test_shortpath" = x; then
59938     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59939 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59940     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59941   fi
59942 
59943   # Call helper function which possibly converts this using DOS-style short mode.
59944   # If so, the updated path is stored in $new_path.
59945 
59946   input_path="$new_path"
59947   # Check if we need to convert this using DOS-style short mode. If the path
59948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59949   # take no chances and rewrite it.
59950   # Note: m4 eats our [], so we need to use [ and ] instead.
59951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59952   if test "x$has_forbidden_chars" != x; then
59953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59954     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59955     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59956     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59957       # Going to short mode and back again did indeed matter. Since short mode is
59958       # case insensitive, let's make it lowercase to improve readability.
59959       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59960       # Now convert it back to Unix-style (cygpath)
59961       input_path=`$CYGPATH -u "$shortmode_path"`
59962       new_path="$input_path"
59963     fi
59964   fi
59965 
59966   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59967   if test "x$test_cygdrive_prefix" = x; then
59968     # As a simple fix, exclude /usr/bin since it's not a real path.
59969     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59970       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59971       # a path prefixed by /cygdrive for fixpath to work.
59972       new_path="$CYGWIN_ROOT_PATH$input_path"
59973     fi
59974   fi
59975 
59976 
59977   if test "x$path" != "x$new_path"; then
59978     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59980 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59981   fi
59982 
59983     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59984 
59985   path="$POTENTIAL_FREETYPE_LIB_PATH"
59986   has_colon=`$ECHO $path | $GREP ^.:`
59987   new_path="$path"
59988   if test "x$has_colon" = x; then
59989     # Not in mixed or Windows style, start by that.
59990     new_path=`cmd //c echo $path`
59991   fi
59992 
59993 
59994   input_path="$new_path"
59995   # Check if we need to convert this using DOS-style short mode. If the path
59996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59997   # take no chances and rewrite it.
59998   # Note: m4 eats our [], so we need to use [ and ] instead.
59999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60000   if test "x$has_forbidden_chars" != x; then
60001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60003   fi
60004 
60005 
60006   windows_path="$new_path"
60007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60008     unix_path=`$CYGPATH -u "$windows_path"`
60009     new_path="$unix_path"
60010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60012     new_path="$unix_path"
60013   fi
60014 
60015   if test "x$path" != "x$new_path"; then
60016     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60018 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60019   fi
60020 
60021   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60022   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60023 
60024     else
60025       # We're on a unix platform. Hooray! :)
60026       path="$POTENTIAL_FREETYPE_LIB_PATH"
60027       has_space=`$ECHO "$path" | $GREP " "`
60028       if test "x$has_space" != x; then
60029         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60030 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60031         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60032       fi
60033 
60034       # Use eval to expand a potential ~
60035       eval path="$path"
60036       if test ! -f "$path" && test ! -d "$path"; then
60037         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60038       fi
60039 
60040       if test -d "$path"; then
60041         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60042       else
60043         dir="`$DIRNAME "$path"`"
60044         base="`$BASENAME "$path"`"
60045         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60046       fi
60047     fi
60048   fi
60049 
60050 
60051     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60053 $as_echo_n "checking for freetype includes... " >&6; }
60054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60055 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60056     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60058 $as_echo_n "checking for freetype libraries... " >&6; }
60059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60060 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60061   fi
60062 
60063               fi
60064             fi
60065           fi
60066         else
60067           FREETYPE_BASE_DIR="$SYSROOT/usr"
60068 
60069   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60070   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60071   METHOD="well-known location"
60072 
60073   # Let's start with an optimistic view of the world :-)
60074   FOUND_FREETYPE=yes
60075 
60076   # First look for the canonical freetype main include file ft2build.h.
60077   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60078     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60079     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60080     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60081       # Fail.
60082       FOUND_FREETYPE=no
60083     fi
60084   fi
60085 
60086   if test "x$FOUND_FREETYPE" = xyes; then
60087     # Include file found, let's continue the sanity check.
60088     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60089 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60090 
60091     # Reset to default value
60092     FREETYPE_BASE_NAME=freetype
60093     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60094     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60095       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60096           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60097         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60098         # for the .6 version explicitly.
60099         FREETYPE_BASE_NAME=freetype.6
60100         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60101         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60102 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60103       else
60104         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60105 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60106         FOUND_FREETYPE=no
60107       fi
60108     else
60109       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60110         # On Windows, we will need both .lib and .dll file.
60111         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60112           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60113 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60114           FOUND_FREETYPE=no
60115         fi
60116       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60117           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60118         # Found lib in isa dir, use that instead.
60119         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60120         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60121 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60122       fi
60123     fi
60124   fi
60125 
60126   if test "x$FOUND_FREETYPE" = xyes; then
60127 
60128   # Only process if variable expands to non-empty
60129 
60130   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60131     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60132 
60133   # Input might be given as Windows format, start by converting to
60134   # unix format.
60135   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60136   new_path=`$CYGPATH -u "$path"`
60137 
60138   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60139   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60140   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60141   # "foo.exe" is OK but "foo" is an error.
60142   #
60143   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60144   # It is also a way to make sure we got the proper file name for the real test later on.
60145   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60146   if test "x$test_shortpath" = x; then
60147     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60148 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60149     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60150   fi
60151 
60152   # Call helper function which possibly converts this using DOS-style short mode.
60153   # If so, the updated path is stored in $new_path.
60154 
60155   input_path="$new_path"
60156   # Check if we need to convert this using DOS-style short mode. If the path
60157   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60158   # take no chances and rewrite it.
60159   # Note: m4 eats our [], so we need to use [ and ] instead.
60160   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60161   if test "x$has_forbidden_chars" != x; then
60162     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60163     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60164     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60165     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60166       # Going to short mode and back again did indeed matter. Since short mode is
60167       # case insensitive, let's make it lowercase to improve readability.
60168       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60169       # Now convert it back to Unix-style (cygpath)
60170       input_path=`$CYGPATH -u "$shortmode_path"`
60171       new_path="$input_path"
60172     fi
60173   fi
60174 
60175   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60176   if test "x$test_cygdrive_prefix" = x; then
60177     # As a simple fix, exclude /usr/bin since it's not a real path.
60178     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60179       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60180       # a path prefixed by /cygdrive for fixpath to work.
60181       new_path="$CYGWIN_ROOT_PATH$input_path"
60182     fi
60183   fi
60184 
60185 
60186   if test "x$path" != "x$new_path"; then
60187     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60189 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60190   fi
60191 
60192     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60193 
60194   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60195   has_colon=`$ECHO $path | $GREP ^.:`
60196   new_path="$path"
60197   if test "x$has_colon" = x; then
60198     # Not in mixed or Windows style, start by that.
60199     new_path=`cmd //c echo $path`
60200   fi
60201 
60202 
60203   input_path="$new_path"
60204   # Check if we need to convert this using DOS-style short mode. If the path
60205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60206   # take no chances and rewrite it.
60207   # Note: m4 eats our [], so we need to use [ and ] instead.
60208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60209   if test "x$has_forbidden_chars" != x; then
60210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60211     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60212   fi
60213 
60214 
60215   windows_path="$new_path"
60216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60217     unix_path=`$CYGPATH -u "$windows_path"`
60218     new_path="$unix_path"
60219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60221     new_path="$unix_path"
60222   fi
60223 
60224   if test "x$path" != "x$new_path"; then
60225     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60227 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60228   fi
60229 
60230   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60231   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60232 
60233     else
60234       # We're on a unix platform. Hooray! :)
60235       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60236       has_space=`$ECHO "$path" | $GREP " "`
60237       if test "x$has_space" != x; then
60238         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60239 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60240         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60241       fi
60242 
60243       # Use eval to expand a potential ~
60244       eval path="$path"
60245       if test ! -f "$path" && test ! -d "$path"; then
60246         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60247       fi
60248 
60249       if test -d "$path"; then
60250         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60251       else
60252         dir="`$DIRNAME "$path"`"
60253         base="`$BASENAME "$path"`"
60254         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60255       fi
60256     fi
60257   fi
60258 
60259 
60260   # Only process if variable expands to non-empty
60261 
60262   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60263     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60264 
60265   # Input might be given as Windows format, start by converting to
60266   # unix format.
60267   path="$POTENTIAL_FREETYPE_LIB_PATH"
60268   new_path=`$CYGPATH -u "$path"`
60269 
60270   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60271   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60272   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60273   # "foo.exe" is OK but "foo" is an error.
60274   #
60275   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60276   # It is also a way to make sure we got the proper file name for the real test later on.
60277   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60278   if test "x$test_shortpath" = x; then
60279     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60280 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60281     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60282   fi
60283 
60284   # Call helper function which possibly converts this using DOS-style short mode.
60285   # If so, the updated path is stored in $new_path.
60286 
60287   input_path="$new_path"
60288   # Check if we need to convert this using DOS-style short mode. If the path
60289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60290   # take no chances and rewrite it.
60291   # Note: m4 eats our [], so we need to use [ and ] instead.
60292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60293   if test "x$has_forbidden_chars" != x; then
60294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60295     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60296     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60297     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60298       # Going to short mode and back again did indeed matter. Since short mode is
60299       # case insensitive, let's make it lowercase to improve readability.
60300       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60301       # Now convert it back to Unix-style (cygpath)
60302       input_path=`$CYGPATH -u "$shortmode_path"`
60303       new_path="$input_path"
60304     fi
60305   fi
60306 
60307   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60308   if test "x$test_cygdrive_prefix" = x; then
60309     # As a simple fix, exclude /usr/bin since it's not a real path.
60310     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60311       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60312       # a path prefixed by /cygdrive for fixpath to work.
60313       new_path="$CYGWIN_ROOT_PATH$input_path"
60314     fi
60315   fi
60316 
60317 
60318   if test "x$path" != "x$new_path"; then
60319     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60321 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60322   fi
60323 
60324     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60325 
60326   path="$POTENTIAL_FREETYPE_LIB_PATH"
60327   has_colon=`$ECHO $path | $GREP ^.:`
60328   new_path="$path"
60329   if test "x$has_colon" = x; then
60330     # Not in mixed or Windows style, start by that.
60331     new_path=`cmd //c echo $path`
60332   fi
60333 
60334 
60335   input_path="$new_path"
60336   # Check if we need to convert this using DOS-style short mode. If the path
60337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60338   # take no chances and rewrite it.
60339   # Note: m4 eats our [], so we need to use [ and ] instead.
60340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60341   if test "x$has_forbidden_chars" != x; then
60342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60343     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60344   fi
60345 
60346 
60347   windows_path="$new_path"
60348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60349     unix_path=`$CYGPATH -u "$windows_path"`
60350     new_path="$unix_path"
60351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60353     new_path="$unix_path"
60354   fi
60355 
60356   if test "x$path" != "x$new_path"; then
60357     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60359 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60360   fi
60361 
60362   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60363   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60364 
60365     else
60366       # We're on a unix platform. Hooray! :)
60367       path="$POTENTIAL_FREETYPE_LIB_PATH"
60368       has_space=`$ECHO "$path" | $GREP " "`
60369       if test "x$has_space" != x; then
60370         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60371 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60372         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60373       fi
60374 
60375       # Use eval to expand a potential ~
60376       eval path="$path"
60377       if test ! -f "$path" && test ! -d "$path"; then
60378         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60379       fi
60380 
60381       if test -d "$path"; then
60382         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60383       else
60384         dir="`$DIRNAME "$path"`"
60385         base="`$BASENAME "$path"`"
60386         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60387       fi
60388     fi
60389   fi
60390 
60391 
60392     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60394 $as_echo_n "checking for freetype includes... " >&6; }
60395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60396 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60397     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60399 $as_echo_n "checking for freetype libraries... " >&6; }
60400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60401 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60402   fi
60403 
60404 
60405           if test "x$FOUND_FREETYPE" != xyes; then
60406             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60407 
60408   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60409   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60410   METHOD="well-known location"
60411 
60412   # Let's start with an optimistic view of the world :-)
60413   FOUND_FREETYPE=yes
60414 
60415   # First look for the canonical freetype main include file ft2build.h.
60416   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60417     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60418     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60419     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60420       # Fail.
60421       FOUND_FREETYPE=no
60422     fi
60423   fi
60424 
60425   if test "x$FOUND_FREETYPE" = xyes; then
60426     # Include file found, let's continue the sanity check.
60427     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60428 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60429 
60430     # Reset to default value
60431     FREETYPE_BASE_NAME=freetype
60432     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60433     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60434       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60435           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60436         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60437         # for the .6 version explicitly.
60438         FREETYPE_BASE_NAME=freetype.6
60439         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60440         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60441 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60442       else
60443         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60444 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60445         FOUND_FREETYPE=no
60446       fi
60447     else
60448       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60449         # On Windows, we will need both .lib and .dll file.
60450         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60451           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60452 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60453           FOUND_FREETYPE=no
60454         fi
60455       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60456           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60457         # Found lib in isa dir, use that instead.
60458         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60459         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60460 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60461       fi
60462     fi
60463   fi
60464 
60465   if test "x$FOUND_FREETYPE" = xyes; then
60466 
60467   # Only process if variable expands to non-empty
60468 
60469   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60471 
60472   # Input might be given as Windows format, start by converting to
60473   # unix format.
60474   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60475   new_path=`$CYGPATH -u "$path"`
60476 
60477   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60478   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60479   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60480   # "foo.exe" is OK but "foo" is an error.
60481   #
60482   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60483   # It is also a way to make sure we got the proper file name for the real test later on.
60484   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60485   if test "x$test_shortpath" = x; then
60486     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60487 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60488     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60489   fi
60490 
60491   # Call helper function which possibly converts this using DOS-style short mode.
60492   # If so, the updated path is stored in $new_path.
60493 
60494   input_path="$new_path"
60495   # Check if we need to convert this using DOS-style short mode. If the path
60496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60497   # take no chances and rewrite it.
60498   # Note: m4 eats our [], so we need to use [ and ] instead.
60499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60500   if test "x$has_forbidden_chars" != x; then
60501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60505       # Going to short mode and back again did indeed matter. Since short mode is
60506       # case insensitive, let's make it lowercase to improve readability.
60507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60508       # Now convert it back to Unix-style (cygpath)
60509       input_path=`$CYGPATH -u "$shortmode_path"`
60510       new_path="$input_path"
60511     fi
60512   fi
60513 
60514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60515   if test "x$test_cygdrive_prefix" = x; then
60516     # As a simple fix, exclude /usr/bin since it's not a real path.
60517     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60519       # a path prefixed by /cygdrive for fixpath to work.
60520       new_path="$CYGWIN_ROOT_PATH$input_path"
60521     fi
60522   fi
60523 
60524 
60525   if test "x$path" != "x$new_path"; then
60526     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60528 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60529   fi
60530 
60531     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60532 
60533   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60534   has_colon=`$ECHO $path | $GREP ^.:`
60535   new_path="$path"
60536   if test "x$has_colon" = x; then
60537     # Not in mixed or Windows style, start by that.
60538     new_path=`cmd //c echo $path`
60539   fi
60540 
60541 
60542   input_path="$new_path"
60543   # Check if we need to convert this using DOS-style short mode. If the path
60544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60545   # take no chances and rewrite it.
60546   # Note: m4 eats our [], so we need to use [ and ] instead.
60547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60548   if test "x$has_forbidden_chars" != x; then
60549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60550     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60551   fi
60552 
60553 
60554   windows_path="$new_path"
60555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60556     unix_path=`$CYGPATH -u "$windows_path"`
60557     new_path="$unix_path"
60558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60560     new_path="$unix_path"
60561   fi
60562 
60563   if test "x$path" != "x$new_path"; then
60564     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60566 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60567   fi
60568 
60569   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60570   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60571 
60572     else
60573       # We're on a unix platform. Hooray! :)
60574       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60575       has_space=`$ECHO "$path" | $GREP " "`
60576       if test "x$has_space" != x; then
60577         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60578 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60579         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60580       fi
60581 
60582       # Use eval to expand a potential ~
60583       eval path="$path"
60584       if test ! -f "$path" && test ! -d "$path"; then
60585         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60586       fi
60587 
60588       if test -d "$path"; then
60589         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60590       else
60591         dir="`$DIRNAME "$path"`"
60592         base="`$BASENAME "$path"`"
60593         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60594       fi
60595     fi
60596   fi
60597 
60598 
60599   # Only process if variable expands to non-empty
60600 
60601   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60602     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60603 
60604   # Input might be given as Windows format, start by converting to
60605   # unix format.
60606   path="$POTENTIAL_FREETYPE_LIB_PATH"
60607   new_path=`$CYGPATH -u "$path"`
60608 
60609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60612   # "foo.exe" is OK but "foo" is an error.
60613   #
60614   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60615   # It is also a way to make sure we got the proper file name for the real test later on.
60616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60617   if test "x$test_shortpath" = x; then
60618     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60619 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60620     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60621   fi
60622 
60623   # Call helper function which possibly converts this using DOS-style short mode.
60624   # If so, the updated path is stored in $new_path.
60625 
60626   input_path="$new_path"
60627   # Check if we need to convert this using DOS-style short mode. If the path
60628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60629   # take no chances and rewrite it.
60630   # Note: m4 eats our [], so we need to use [ and ] instead.
60631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60632   if test "x$has_forbidden_chars" != x; then
60633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60637       # Going to short mode and back again did indeed matter. Since short mode is
60638       # case insensitive, let's make it lowercase to improve readability.
60639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60640       # Now convert it back to Unix-style (cygpath)
60641       input_path=`$CYGPATH -u "$shortmode_path"`
60642       new_path="$input_path"
60643     fi
60644   fi
60645 
60646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60647   if test "x$test_cygdrive_prefix" = x; then
60648     # As a simple fix, exclude /usr/bin since it's not a real path.
60649     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60651       # a path prefixed by /cygdrive for fixpath to work.
60652       new_path="$CYGWIN_ROOT_PATH$input_path"
60653     fi
60654   fi
60655 
60656 
60657   if test "x$path" != "x$new_path"; then
60658     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60660 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60661   fi
60662 
60663     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60664 
60665   path="$POTENTIAL_FREETYPE_LIB_PATH"
60666   has_colon=`$ECHO $path | $GREP ^.:`
60667   new_path="$path"
60668   if test "x$has_colon" = x; then
60669     # Not in mixed or Windows style, start by that.
60670     new_path=`cmd //c echo $path`
60671   fi
60672 
60673 
60674   input_path="$new_path"
60675   # Check if we need to convert this using DOS-style short mode. If the path
60676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60677   # take no chances and rewrite it.
60678   # Note: m4 eats our [], so we need to use [ and ] instead.
60679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60680   if test "x$has_forbidden_chars" != x; then
60681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60682     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60683   fi
60684 
60685 
60686   windows_path="$new_path"
60687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60688     unix_path=`$CYGPATH -u "$windows_path"`
60689     new_path="$unix_path"
60690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60692     new_path="$unix_path"
60693   fi
60694 
60695   if test "x$path" != "x$new_path"; then
60696     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60698 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60699   fi
60700 
60701   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60702   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60703 
60704     else
60705       # We're on a unix platform. Hooray! :)
60706       path="$POTENTIAL_FREETYPE_LIB_PATH"
60707       has_space=`$ECHO "$path" | $GREP " "`
60708       if test "x$has_space" != x; then
60709         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60710 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60711         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60712       fi
60713 
60714       # Use eval to expand a potential ~
60715       eval path="$path"
60716       if test ! -f "$path" && test ! -d "$path"; then
60717         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60718       fi
60719 
60720       if test -d "$path"; then
60721         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60722       else
60723         dir="`$DIRNAME "$path"`"
60724         base="`$BASENAME "$path"`"
60725         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60726       fi
60727     fi
60728   fi
60729 
60730 
60731     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60733 $as_echo_n "checking for freetype includes... " >&6; }
60734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60735 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60736     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60738 $as_echo_n "checking for freetype libraries... " >&6; }
60739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60740 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60741   fi
60742 
60743           fi
60744 
60745           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60746             if test "x$FOUND_FREETYPE" != xyes; then
60747               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60748               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60749 
60750   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60751   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60752   METHOD="well-known location"
60753 
60754   # Let's start with an optimistic view of the world :-)
60755   FOUND_FREETYPE=yes
60756 
60757   # First look for the canonical freetype main include file ft2build.h.
60758   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60759     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60760     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60761     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60762       # Fail.
60763       FOUND_FREETYPE=no
60764     fi
60765   fi
60766 
60767   if test "x$FOUND_FREETYPE" = xyes; then
60768     # Include file found, let's continue the sanity check.
60769     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60770 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60771 
60772     # Reset to default value
60773     FREETYPE_BASE_NAME=freetype
60774     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60775     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60776       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60777           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60778         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60779         # for the .6 version explicitly.
60780         FREETYPE_BASE_NAME=freetype.6
60781         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60782         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60783 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60784       else
60785         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60786 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60787         FOUND_FREETYPE=no
60788       fi
60789     else
60790       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60791         # On Windows, we will need both .lib and .dll file.
60792         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60793           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60794 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60795           FOUND_FREETYPE=no
60796         fi
60797       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60798           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60799         # Found lib in isa dir, use that instead.
60800         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60801         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60802 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60803       fi
60804     fi
60805   fi
60806 
60807   if test "x$FOUND_FREETYPE" = xyes; then
60808 
60809   # Only process if variable expands to non-empty
60810 
60811   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60812     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60813 
60814   # Input might be given as Windows format, start by converting to
60815   # unix format.
60816   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60817   new_path=`$CYGPATH -u "$path"`
60818 
60819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60822   # "foo.exe" is OK but "foo" is an error.
60823   #
60824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60825   # It is also a way to make sure we got the proper file name for the real test later on.
60826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60827   if test "x$test_shortpath" = x; then
60828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60829 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60830     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60831   fi
60832 
60833   # Call helper function which possibly converts this using DOS-style short mode.
60834   # If so, the updated path is stored in $new_path.
60835 
60836   input_path="$new_path"
60837   # Check if we need to convert this using DOS-style short mode. If the path
60838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60839   # take no chances and rewrite it.
60840   # Note: m4 eats our [], so we need to use [ and ] instead.
60841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60842   if test "x$has_forbidden_chars" != x; then
60843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60847       # Going to short mode and back again did indeed matter. Since short mode is
60848       # case insensitive, let's make it lowercase to improve readability.
60849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60850       # Now convert it back to Unix-style (cygpath)
60851       input_path=`$CYGPATH -u "$shortmode_path"`
60852       new_path="$input_path"
60853     fi
60854   fi
60855 
60856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60857   if test "x$test_cygdrive_prefix" = x; then
60858     # As a simple fix, exclude /usr/bin since it's not a real path.
60859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60861       # a path prefixed by /cygdrive for fixpath to work.
60862       new_path="$CYGWIN_ROOT_PATH$input_path"
60863     fi
60864   fi
60865 
60866 
60867   if test "x$path" != "x$new_path"; then
60868     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60870 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60871   fi
60872 
60873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60874 
60875   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60876   has_colon=`$ECHO $path | $GREP ^.:`
60877   new_path="$path"
60878   if test "x$has_colon" = x; then
60879     # Not in mixed or Windows style, start by that.
60880     new_path=`cmd //c echo $path`
60881   fi
60882 
60883 
60884   input_path="$new_path"
60885   # Check if we need to convert this using DOS-style short mode. If the path
60886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60887   # take no chances and rewrite it.
60888   # Note: m4 eats our [], so we need to use [ and ] instead.
60889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60890   if test "x$has_forbidden_chars" != x; then
60891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60893   fi
60894 
60895 
60896   windows_path="$new_path"
60897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60898     unix_path=`$CYGPATH -u "$windows_path"`
60899     new_path="$unix_path"
60900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60902     new_path="$unix_path"
60903   fi
60904 
60905   if test "x$path" != "x$new_path"; then
60906     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60908 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60909   fi
60910 
60911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60913 
60914     else
60915       # We're on a unix platform. Hooray! :)
60916       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60917       has_space=`$ECHO "$path" | $GREP " "`
60918       if test "x$has_space" != x; then
60919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60920 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60921         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60922       fi
60923 
60924       # Use eval to expand a potential ~
60925       eval path="$path"
60926       if test ! -f "$path" && test ! -d "$path"; then
60927         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60928       fi
60929 
60930       if test -d "$path"; then
60931         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60932       else
60933         dir="`$DIRNAME "$path"`"
60934         base="`$BASENAME "$path"`"
60935         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60936       fi
60937     fi
60938   fi
60939 
60940 
60941   # Only process if variable expands to non-empty
60942 
60943   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60944     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60945 
60946   # Input might be given as Windows format, start by converting to
60947   # unix format.
60948   path="$POTENTIAL_FREETYPE_LIB_PATH"
60949   new_path=`$CYGPATH -u "$path"`
60950 
60951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60954   # "foo.exe" is OK but "foo" is an error.
60955   #
60956   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60957   # It is also a way to make sure we got the proper file name for the real test later on.
60958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60959   if test "x$test_shortpath" = x; then
60960     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60961 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60962     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60963   fi
60964 
60965   # Call helper function which possibly converts this using DOS-style short mode.
60966   # If so, the updated path is stored in $new_path.
60967 
60968   input_path="$new_path"
60969   # Check if we need to convert this using DOS-style short mode. If the path
60970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60971   # take no chances and rewrite it.
60972   # Note: m4 eats our [], so we need to use [ and ] instead.
60973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60974   if test "x$has_forbidden_chars" != x; then
60975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60979       # Going to short mode and back again did indeed matter. Since short mode is
60980       # case insensitive, let's make it lowercase to improve readability.
60981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60982       # Now convert it back to Unix-style (cygpath)
60983       input_path=`$CYGPATH -u "$shortmode_path"`
60984       new_path="$input_path"
60985     fi
60986   fi
60987 
60988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60989   if test "x$test_cygdrive_prefix" = x; then
60990     # As a simple fix, exclude /usr/bin since it's not a real path.
60991     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60993       # a path prefixed by /cygdrive for fixpath to work.
60994       new_path="$CYGWIN_ROOT_PATH$input_path"
60995     fi
60996   fi
60997 
60998 
60999   if test "x$path" != "x$new_path"; then
61000     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61002 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61003   fi
61004 
61005     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61006 
61007   path="$POTENTIAL_FREETYPE_LIB_PATH"
61008   has_colon=`$ECHO $path | $GREP ^.:`
61009   new_path="$path"
61010   if test "x$has_colon" = x; then
61011     # Not in mixed or Windows style, start by that.
61012     new_path=`cmd //c echo $path`
61013   fi
61014 
61015 
61016   input_path="$new_path"
61017   # Check if we need to convert this using DOS-style short mode. If the path
61018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61019   # take no chances and rewrite it.
61020   # Note: m4 eats our [], so we need to use [ and ] instead.
61021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61022   if test "x$has_forbidden_chars" != x; then
61023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61024     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61025   fi
61026 
61027 
61028   windows_path="$new_path"
61029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61030     unix_path=`$CYGPATH -u "$windows_path"`
61031     new_path="$unix_path"
61032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61034     new_path="$unix_path"
61035   fi
61036 
61037   if test "x$path" != "x$new_path"; then
61038     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61040 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61041   fi
61042 
61043   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61044   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61045 
61046     else
61047       # We're on a unix platform. Hooray! :)
61048       path="$POTENTIAL_FREETYPE_LIB_PATH"
61049       has_space=`$ECHO "$path" | $GREP " "`
61050       if test "x$has_space" != x; then
61051         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61052 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61053         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61054       fi
61055 
61056       # Use eval to expand a potential ~
61057       eval path="$path"
61058       if test ! -f "$path" && test ! -d "$path"; then
61059         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61060       fi
61061 
61062       if test -d "$path"; then
61063         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61064       else
61065         dir="`$DIRNAME "$path"`"
61066         base="`$BASENAME "$path"`"
61067         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61068       fi
61069     fi
61070   fi
61071 
61072 
61073     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61075 $as_echo_n "checking for freetype includes... " >&6; }
61076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61077 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61078     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61080 $as_echo_n "checking for freetype libraries... " >&6; }
61081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61082 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61083   fi
61084 
61085             fi
61086           fi
61087 
61088           if test "x$FOUND_FREETYPE" != xyes; then
61089             FREETYPE_BASE_DIR="$SYSROOT/usr"
61090             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61091 
61092   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61093   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61094   METHOD="well-known location"
61095 
61096   # Let's start with an optimistic view of the world :-)
61097   FOUND_FREETYPE=yes
61098 
61099   # First look for the canonical freetype main include file ft2build.h.
61100   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61101     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61102     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61103     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61104       # Fail.
61105       FOUND_FREETYPE=no
61106     fi
61107   fi
61108 
61109   if test "x$FOUND_FREETYPE" = xyes; then
61110     # Include file found, let's continue the sanity check.
61111     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61112 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61113 
61114     # Reset to default value
61115     FREETYPE_BASE_NAME=freetype
61116     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61117     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61118       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61119           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61120         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61121         # for the .6 version explicitly.
61122         FREETYPE_BASE_NAME=freetype.6
61123         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61124         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61125 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61126       else
61127         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61128 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61129         FOUND_FREETYPE=no
61130       fi
61131     else
61132       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61133         # On Windows, we will need both .lib and .dll file.
61134         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61135           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61136 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61137           FOUND_FREETYPE=no
61138         fi
61139       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61140           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61141         # Found lib in isa dir, use that instead.
61142         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61143         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61144 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61145       fi
61146     fi
61147   fi
61148 
61149   if test "x$FOUND_FREETYPE" = xyes; then
61150 
61151   # Only process if variable expands to non-empty
61152 
61153   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61154     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61155 
61156   # Input might be given as Windows format, start by converting to
61157   # unix format.
61158   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61159   new_path=`$CYGPATH -u "$path"`
61160 
61161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61164   # "foo.exe" is OK but "foo" is an error.
61165   #
61166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61167   # It is also a way to make sure we got the proper file name for the real test later on.
61168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61169   if test "x$test_shortpath" = x; then
61170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61171 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61172     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61173   fi
61174 
61175   # Call helper function which possibly converts this using DOS-style short mode.
61176   # If so, the updated path is stored in $new_path.
61177 
61178   input_path="$new_path"
61179   # Check if we need to convert this using DOS-style short mode. If the path
61180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61181   # take no chances and rewrite it.
61182   # Note: m4 eats our [], so we need to use [ and ] instead.
61183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61184   if test "x$has_forbidden_chars" != x; then
61185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61189       # Going to short mode and back again did indeed matter. Since short mode is
61190       # case insensitive, let's make it lowercase to improve readability.
61191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61192       # Now convert it back to Unix-style (cygpath)
61193       input_path=`$CYGPATH -u "$shortmode_path"`
61194       new_path="$input_path"
61195     fi
61196   fi
61197 
61198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61199   if test "x$test_cygdrive_prefix" = x; then
61200     # As a simple fix, exclude /usr/bin since it's not a real path.
61201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61203       # a path prefixed by /cygdrive for fixpath to work.
61204       new_path="$CYGWIN_ROOT_PATH$input_path"
61205     fi
61206   fi
61207 
61208 
61209   if test "x$path" != "x$new_path"; then
61210     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61212 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61213   fi
61214 
61215     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61216 
61217   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61218   has_colon=`$ECHO $path | $GREP ^.:`
61219   new_path="$path"
61220   if test "x$has_colon" = x; then
61221     # Not in mixed or Windows style, start by that.
61222     new_path=`cmd //c echo $path`
61223   fi
61224 
61225 
61226   input_path="$new_path"
61227   # Check if we need to convert this using DOS-style short mode. If the path
61228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61229   # take no chances and rewrite it.
61230   # Note: m4 eats our [], so we need to use [ and ] instead.
61231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61232   if test "x$has_forbidden_chars" != x; then
61233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61235   fi
61236 
61237 
61238   windows_path="$new_path"
61239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61240     unix_path=`$CYGPATH -u "$windows_path"`
61241     new_path="$unix_path"
61242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61244     new_path="$unix_path"
61245   fi
61246 
61247   if test "x$path" != "x$new_path"; then
61248     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61250 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61251   fi
61252 
61253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61255 
61256     else
61257       # We're on a unix platform. Hooray! :)
61258       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61259       has_space=`$ECHO "$path" | $GREP " "`
61260       if test "x$has_space" != x; then
61261         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61262 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61263         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61264       fi
61265 
61266       # Use eval to expand a potential ~
61267       eval path="$path"
61268       if test ! -f "$path" && test ! -d "$path"; then
61269         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61270       fi
61271 
61272       if test -d "$path"; then
61273         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61274       else
61275         dir="`$DIRNAME "$path"`"
61276         base="`$BASENAME "$path"`"
61277         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61278       fi
61279     fi
61280   fi
61281 
61282 
61283   # Only process if variable expands to non-empty
61284 
61285   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61286     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61287 
61288   # Input might be given as Windows format, start by converting to
61289   # unix format.
61290   path="$POTENTIAL_FREETYPE_LIB_PATH"
61291   new_path=`$CYGPATH -u "$path"`
61292 
61293   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61294   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61295   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61296   # "foo.exe" is OK but "foo" is an error.
61297   #
61298   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61299   # It is also a way to make sure we got the proper file name for the real test later on.
61300   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61301   if test "x$test_shortpath" = x; then
61302     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61303 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61304     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61305   fi
61306 
61307   # Call helper function which possibly converts this using DOS-style short mode.
61308   # If so, the updated path is stored in $new_path.
61309 
61310   input_path="$new_path"
61311   # Check if we need to convert this using DOS-style short mode. If the path
61312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61313   # take no chances and rewrite it.
61314   # Note: m4 eats our [], so we need to use [ and ] instead.
61315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61316   if test "x$has_forbidden_chars" != x; then
61317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61321       # Going to short mode and back again did indeed matter. Since short mode is
61322       # case insensitive, let's make it lowercase to improve readability.
61323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61324       # Now convert it back to Unix-style (cygpath)
61325       input_path=`$CYGPATH -u "$shortmode_path"`
61326       new_path="$input_path"
61327     fi
61328   fi
61329 
61330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61331   if test "x$test_cygdrive_prefix" = x; then
61332     # As a simple fix, exclude /usr/bin since it's not a real path.
61333     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61335       # a path prefixed by /cygdrive for fixpath to work.
61336       new_path="$CYGWIN_ROOT_PATH$input_path"
61337     fi
61338   fi
61339 
61340 
61341   if test "x$path" != "x$new_path"; then
61342     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61343     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61344 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61345   fi
61346 
61347     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61348 
61349   path="$POTENTIAL_FREETYPE_LIB_PATH"
61350   has_colon=`$ECHO $path | $GREP ^.:`
61351   new_path="$path"
61352   if test "x$has_colon" = x; then
61353     # Not in mixed or Windows style, start by that.
61354     new_path=`cmd //c echo $path`
61355   fi
61356 
61357 
61358   input_path="$new_path"
61359   # Check if we need to convert this using DOS-style short mode. If the path
61360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61361   # take no chances and rewrite it.
61362   # Note: m4 eats our [], so we need to use [ and ] instead.
61363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61364   if test "x$has_forbidden_chars" != x; then
61365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61367   fi
61368 
61369 
61370   windows_path="$new_path"
61371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61372     unix_path=`$CYGPATH -u "$windows_path"`
61373     new_path="$unix_path"
61374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61376     new_path="$unix_path"
61377   fi
61378 
61379   if test "x$path" != "x$new_path"; then
61380     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61382 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61383   fi
61384 
61385   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61386   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61387 
61388     else
61389       # We're on a unix platform. Hooray! :)
61390       path="$POTENTIAL_FREETYPE_LIB_PATH"
61391       has_space=`$ECHO "$path" | $GREP " "`
61392       if test "x$has_space" != x; then
61393         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61394 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61395         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61396       fi
61397 
61398       # Use eval to expand a potential ~
61399       eval path="$path"
61400       if test ! -f "$path" && test ! -d "$path"; then
61401         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61402       fi
61403 
61404       if test -d "$path"; then
61405         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61406       else
61407         dir="`$DIRNAME "$path"`"
61408         base="`$BASENAME "$path"`"
61409         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61410       fi
61411     fi
61412   fi
61413 
61414 
61415     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61417 $as_echo_n "checking for freetype includes... " >&6; }
61418     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61419 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61420     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61421     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61422 $as_echo_n "checking for freetype libraries... " >&6; }
61423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61424 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61425   fi
61426 
61427             else
61428 
61429   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61430   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61431   METHOD="well-known location"
61432 
61433   # Let's start with an optimistic view of the world :-)
61434   FOUND_FREETYPE=yes
61435 
61436   # First look for the canonical freetype main include file ft2build.h.
61437   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61438     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61439     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61440     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61441       # Fail.
61442       FOUND_FREETYPE=no
61443     fi
61444   fi
61445 
61446   if test "x$FOUND_FREETYPE" = xyes; then
61447     # Include file found, let's continue the sanity check.
61448     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61449 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61450 
61451     # Reset to default value
61452     FREETYPE_BASE_NAME=freetype
61453     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61454     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61455       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61456           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61457         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61458         # for the .6 version explicitly.
61459         FREETYPE_BASE_NAME=freetype.6
61460         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61461         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61462 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61463       else
61464         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61465 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61466         FOUND_FREETYPE=no
61467       fi
61468     else
61469       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61470         # On Windows, we will need both .lib and .dll file.
61471         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61472           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61473 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61474           FOUND_FREETYPE=no
61475         fi
61476       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61477           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61478         # Found lib in isa dir, use that instead.
61479         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61480         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61481 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61482       fi
61483     fi
61484   fi
61485 
61486   if test "x$FOUND_FREETYPE" = xyes; then
61487 
61488   # Only process if variable expands to non-empty
61489 
61490   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61491     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61492 
61493   # Input might be given as Windows format, start by converting to
61494   # unix format.
61495   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61496   new_path=`$CYGPATH -u "$path"`
61497 
61498   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61499   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61500   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61501   # "foo.exe" is OK but "foo" is an error.
61502   #
61503   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61504   # It is also a way to make sure we got the proper file name for the real test later on.
61505   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61506   if test "x$test_shortpath" = x; then
61507     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61508 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61509     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61510   fi
61511 
61512   # Call helper function which possibly converts this using DOS-style short mode.
61513   # If so, the updated path is stored in $new_path.
61514 
61515   input_path="$new_path"
61516   # Check if we need to convert this using DOS-style short mode. If the path
61517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61518   # take no chances and rewrite it.
61519   # Note: m4 eats our [], so we need to use [ and ] instead.
61520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61521   if test "x$has_forbidden_chars" != x; then
61522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61523     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61524     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61525     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61526       # Going to short mode and back again did indeed matter. Since short mode is
61527       # case insensitive, let's make it lowercase to improve readability.
61528       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61529       # Now convert it back to Unix-style (cygpath)
61530       input_path=`$CYGPATH -u "$shortmode_path"`
61531       new_path="$input_path"
61532     fi
61533   fi
61534 
61535   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61536   if test "x$test_cygdrive_prefix" = x; then
61537     # As a simple fix, exclude /usr/bin since it's not a real path.
61538     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61539       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61540       # a path prefixed by /cygdrive for fixpath to work.
61541       new_path="$CYGWIN_ROOT_PATH$input_path"
61542     fi
61543   fi
61544 
61545 
61546   if test "x$path" != "x$new_path"; then
61547     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61549 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61550   fi
61551 
61552     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61553 
61554   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61555   has_colon=`$ECHO $path | $GREP ^.:`
61556   new_path="$path"
61557   if test "x$has_colon" = x; then
61558     # Not in mixed or Windows style, start by that.
61559     new_path=`cmd //c echo $path`
61560   fi
61561 
61562 
61563   input_path="$new_path"
61564   # Check if we need to convert this using DOS-style short mode. If the path
61565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61566   # take no chances and rewrite it.
61567   # Note: m4 eats our [], so we need to use [ and ] instead.
61568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61569   if test "x$has_forbidden_chars" != x; then
61570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61572   fi
61573 
61574 
61575   windows_path="$new_path"
61576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61577     unix_path=`$CYGPATH -u "$windows_path"`
61578     new_path="$unix_path"
61579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61581     new_path="$unix_path"
61582   fi
61583 
61584   if test "x$path" != "x$new_path"; then
61585     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61587 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61588   fi
61589 
61590   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61591   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61592 
61593     else
61594       # We're on a unix platform. Hooray! :)
61595       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61596       has_space=`$ECHO "$path" | $GREP " "`
61597       if test "x$has_space" != x; then
61598         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61599 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61600         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61601       fi
61602 
61603       # Use eval to expand a potential ~
61604       eval path="$path"
61605       if test ! -f "$path" && test ! -d "$path"; then
61606         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61607       fi
61608 
61609       if test -d "$path"; then
61610         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61611       else
61612         dir="`$DIRNAME "$path"`"
61613         base="`$BASENAME "$path"`"
61614         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61615       fi
61616     fi
61617   fi
61618 
61619 
61620   # Only process if variable expands to non-empty
61621 
61622   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61623     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61624 
61625   # Input might be given as Windows format, start by converting to
61626   # unix format.
61627   path="$POTENTIAL_FREETYPE_LIB_PATH"
61628   new_path=`$CYGPATH -u "$path"`
61629 
61630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61633   # "foo.exe" is OK but "foo" is an error.
61634   #
61635   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61636   # It is also a way to make sure we got the proper file name for the real test later on.
61637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61638   if test "x$test_shortpath" = x; then
61639     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61640 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61641     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61642   fi
61643 
61644   # Call helper function which possibly converts this using DOS-style short mode.
61645   # If so, the updated path is stored in $new_path.
61646 
61647   input_path="$new_path"
61648   # Check if we need to convert this using DOS-style short mode. If the path
61649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61650   # take no chances and rewrite it.
61651   # Note: m4 eats our [], so we need to use [ and ] instead.
61652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61653   if test "x$has_forbidden_chars" != x; then
61654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61658       # Going to short mode and back again did indeed matter. Since short mode is
61659       # case insensitive, let's make it lowercase to improve readability.
61660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61661       # Now convert it back to Unix-style (cygpath)
61662       input_path=`$CYGPATH -u "$shortmode_path"`
61663       new_path="$input_path"
61664     fi
61665   fi
61666 
61667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61668   if test "x$test_cygdrive_prefix" = x; then
61669     # As a simple fix, exclude /usr/bin since it's not a real path.
61670     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61672       # a path prefixed by /cygdrive for fixpath to work.
61673       new_path="$CYGWIN_ROOT_PATH$input_path"
61674     fi
61675   fi
61676 
61677 
61678   if test "x$path" != "x$new_path"; then
61679     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61681 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61682   fi
61683 
61684     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61685 
61686   path="$POTENTIAL_FREETYPE_LIB_PATH"
61687   has_colon=`$ECHO $path | $GREP ^.:`
61688   new_path="$path"
61689   if test "x$has_colon" = x; then
61690     # Not in mixed or Windows style, start by that.
61691     new_path=`cmd //c echo $path`
61692   fi
61693 
61694 
61695   input_path="$new_path"
61696   # Check if we need to convert this using DOS-style short mode. If the path
61697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61698   # take no chances and rewrite it.
61699   # Note: m4 eats our [], so we need to use [ and ] instead.
61700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61701   if test "x$has_forbidden_chars" != x; then
61702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61703     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61704   fi
61705 
61706 
61707   windows_path="$new_path"
61708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61709     unix_path=`$CYGPATH -u "$windows_path"`
61710     new_path="$unix_path"
61711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61713     new_path="$unix_path"
61714   fi
61715 
61716   if test "x$path" != "x$new_path"; then
61717     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61719 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61720   fi
61721 
61722   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61723   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61724 
61725     else
61726       # We're on a unix platform. Hooray! :)
61727       path="$POTENTIAL_FREETYPE_LIB_PATH"
61728       has_space=`$ECHO "$path" | $GREP " "`
61729       if test "x$has_space" != x; then
61730         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61731 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61732         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61733       fi
61734 
61735       # Use eval to expand a potential ~
61736       eval path="$path"
61737       if test ! -f "$path" && test ! -d "$path"; then
61738         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61739       fi
61740 
61741       if test -d "$path"; then
61742         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61743       else
61744         dir="`$DIRNAME "$path"`"
61745         base="`$BASENAME "$path"`"
61746         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61747       fi
61748     fi
61749   fi
61750 
61751 
61752     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61753     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61754 $as_echo_n "checking for freetype includes... " >&6; }
61755     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61756 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61757     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61758     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61759 $as_echo_n "checking for freetype libraries... " >&6; }
61760     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61761 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61762   fi
61763 
61764               if test "x$FOUND_FREETYPE" != xyes; then
61765 
61766   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61767   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61768   METHOD="well-known location"
61769 
61770   # Let's start with an optimistic view of the world :-)
61771   FOUND_FREETYPE=yes
61772 
61773   # First look for the canonical freetype main include file ft2build.h.
61774   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61775     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61776     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61777     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61778       # Fail.
61779       FOUND_FREETYPE=no
61780     fi
61781   fi
61782 
61783   if test "x$FOUND_FREETYPE" = xyes; then
61784     # Include file found, let's continue the sanity check.
61785     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61786 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61787 
61788     # Reset to default value
61789     FREETYPE_BASE_NAME=freetype
61790     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61791     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61792       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61793           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61794         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61795         # for the .6 version explicitly.
61796         FREETYPE_BASE_NAME=freetype.6
61797         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61798         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61799 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61800       else
61801         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61802 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61803         FOUND_FREETYPE=no
61804       fi
61805     else
61806       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61807         # On Windows, we will need both .lib and .dll file.
61808         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61809           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61810 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61811           FOUND_FREETYPE=no
61812         fi
61813       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61814           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61815         # Found lib in isa dir, use that instead.
61816         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61817         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61818 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61819       fi
61820     fi
61821   fi
61822 
61823   if test "x$FOUND_FREETYPE" = xyes; then
61824 
61825   # Only process if variable expands to non-empty
61826 
61827   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61828     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61829 
61830   # Input might be given as Windows format, start by converting to
61831   # unix format.
61832   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61833   new_path=`$CYGPATH -u "$path"`
61834 
61835   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61836   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61837   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61838   # "foo.exe" is OK but "foo" is an error.
61839   #
61840   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61841   # It is also a way to make sure we got the proper file name for the real test later on.
61842   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61843   if test "x$test_shortpath" = x; then
61844     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61845 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61846     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61847   fi
61848 
61849   # Call helper function which possibly converts this using DOS-style short mode.
61850   # If so, the updated path is stored in $new_path.
61851 
61852   input_path="$new_path"
61853   # Check if we need to convert this using DOS-style short mode. If the path
61854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61855   # take no chances and rewrite it.
61856   # Note: m4 eats our [], so we need to use [ and ] instead.
61857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61858   if test "x$has_forbidden_chars" != x; then
61859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61860     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61861     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61862     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61863       # Going to short mode and back again did indeed matter. Since short mode is
61864       # case insensitive, let's make it lowercase to improve readability.
61865       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61866       # Now convert it back to Unix-style (cygpath)
61867       input_path=`$CYGPATH -u "$shortmode_path"`
61868       new_path="$input_path"
61869     fi
61870   fi
61871 
61872   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61873   if test "x$test_cygdrive_prefix" = x; then
61874     # As a simple fix, exclude /usr/bin since it's not a real path.
61875     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61876       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61877       # a path prefixed by /cygdrive for fixpath to work.
61878       new_path="$CYGWIN_ROOT_PATH$input_path"
61879     fi
61880   fi
61881 
61882 
61883   if test "x$path" != "x$new_path"; then
61884     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61886 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61887   fi
61888 
61889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61890 
61891   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61892   has_colon=`$ECHO $path | $GREP ^.:`
61893   new_path="$path"
61894   if test "x$has_colon" = x; then
61895     # Not in mixed or Windows style, start by that.
61896     new_path=`cmd //c echo $path`
61897   fi
61898 
61899 
61900   input_path="$new_path"
61901   # Check if we need to convert this using DOS-style short mode. If the path
61902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61903   # take no chances and rewrite it.
61904   # Note: m4 eats our [], so we need to use [ and ] instead.
61905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61906   if test "x$has_forbidden_chars" != x; then
61907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61908     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61909   fi
61910 
61911 
61912   windows_path="$new_path"
61913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61914     unix_path=`$CYGPATH -u "$windows_path"`
61915     new_path="$unix_path"
61916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61918     new_path="$unix_path"
61919   fi
61920 
61921   if test "x$path" != "x$new_path"; then
61922     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61924 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61925   fi
61926 
61927   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61928   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61929 
61930     else
61931       # We're on a unix platform. Hooray! :)
61932       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61933       has_space=`$ECHO "$path" | $GREP " "`
61934       if test "x$has_space" != x; then
61935         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61936 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61937         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61938       fi
61939 
61940       # Use eval to expand a potential ~
61941       eval path="$path"
61942       if test ! -f "$path" && test ! -d "$path"; then
61943         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61944       fi
61945 
61946       if test -d "$path"; then
61947         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61948       else
61949         dir="`$DIRNAME "$path"`"
61950         base="`$BASENAME "$path"`"
61951         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61952       fi
61953     fi
61954   fi
61955 
61956 
61957   # Only process if variable expands to non-empty
61958 
61959   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61960     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61961 
61962   # Input might be given as Windows format, start by converting to
61963   # unix format.
61964   path="$POTENTIAL_FREETYPE_LIB_PATH"
61965   new_path=`$CYGPATH -u "$path"`
61966 
61967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61970   # "foo.exe" is OK but "foo" is an error.
61971   #
61972   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61973   # It is also a way to make sure we got the proper file name for the real test later on.
61974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61975   if test "x$test_shortpath" = x; then
61976     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61977 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61978     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61979   fi
61980 
61981   # Call helper function which possibly converts this using DOS-style short mode.
61982   # If so, the updated path is stored in $new_path.
61983 
61984   input_path="$new_path"
61985   # Check if we need to convert this using DOS-style short mode. If the path
61986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61987   # take no chances and rewrite it.
61988   # Note: m4 eats our [], so we need to use [ and ] instead.
61989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61990   if test "x$has_forbidden_chars" != x; then
61991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61995       # Going to short mode and back again did indeed matter. Since short mode is
61996       # case insensitive, let's make it lowercase to improve readability.
61997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61998       # Now convert it back to Unix-style (cygpath)
61999       input_path=`$CYGPATH -u "$shortmode_path"`
62000       new_path="$input_path"
62001     fi
62002   fi
62003 
62004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62005   if test "x$test_cygdrive_prefix" = x; then
62006     # As a simple fix, exclude /usr/bin since it's not a real path.
62007     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62009       # a path prefixed by /cygdrive for fixpath to work.
62010       new_path="$CYGWIN_ROOT_PATH$input_path"
62011     fi
62012   fi
62013 
62014 
62015   if test "x$path" != "x$new_path"; then
62016     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62018 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62019   fi
62020 
62021     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62022 
62023   path="$POTENTIAL_FREETYPE_LIB_PATH"
62024   has_colon=`$ECHO $path | $GREP ^.:`
62025   new_path="$path"
62026   if test "x$has_colon" = x; then
62027     # Not in mixed or Windows style, start by that.
62028     new_path=`cmd //c echo $path`
62029   fi
62030 
62031 
62032   input_path="$new_path"
62033   # Check if we need to convert this using DOS-style short mode. If the path
62034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62035   # take no chances and rewrite it.
62036   # Note: m4 eats our [], so we need to use [ and ] instead.
62037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62038   if test "x$has_forbidden_chars" != x; then
62039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62041   fi
62042 
62043 
62044   windows_path="$new_path"
62045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62046     unix_path=`$CYGPATH -u "$windows_path"`
62047     new_path="$unix_path"
62048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62050     new_path="$unix_path"
62051   fi
62052 
62053   if test "x$path" != "x$new_path"; then
62054     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62056 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62057   fi
62058 
62059   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62060   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62061 
62062     else
62063       # We're on a unix platform. Hooray! :)
62064       path="$POTENTIAL_FREETYPE_LIB_PATH"
62065       has_space=`$ECHO "$path" | $GREP " "`
62066       if test "x$has_space" != x; then
62067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62068 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62069         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62070       fi
62071 
62072       # Use eval to expand a potential ~
62073       eval path="$path"
62074       if test ! -f "$path" && test ! -d "$path"; then
62075         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62076       fi
62077 
62078       if test -d "$path"; then
62079         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62080       else
62081         dir="`$DIRNAME "$path"`"
62082         base="`$BASENAME "$path"`"
62083         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62084       fi
62085     fi
62086   fi
62087 
62088 
62089     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62091 $as_echo_n "checking for freetype includes... " >&6; }
62092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62093 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62094     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62096 $as_echo_n "checking for freetype libraries... " >&6; }
62097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62098 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62099   fi
62100 
62101               fi
62102             fi
62103           fi
62104         fi
62105       fi # end check in well-known locations
62106 
62107       if test "x$FOUND_FREETYPE" != xyes; then
62108 
62109   # Print a helpful message on how to acquire the necessary build dependency.
62110   # freetype is the help tag: freetype, cups, alsa etc
62111   MISSING_DEPENDENCY=freetype
62112 
62113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62114     cygwin_help $MISSING_DEPENDENCY
62115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62116     msys_help $MISSING_DEPENDENCY
62117   else
62118     PKGHANDLER_COMMAND=
62119 
62120     case $PKGHANDLER in
62121       apt-get)
62122         apt_help     $MISSING_DEPENDENCY ;;
62123       yum)
62124         yum_help     $MISSING_DEPENDENCY ;;
62125       port)
62126         port_help    $MISSING_DEPENDENCY ;;
62127       pkgutil)
62128         pkgutil_help $MISSING_DEPENDENCY ;;
62129       pkgadd)
62130         pkgadd_help  $MISSING_DEPENDENCY ;;
62131     esac
62132 
62133     if test "x$PKGHANDLER_COMMAND" != x; then
62134       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62135     fi
62136   fi
62137 
62138         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62139       fi
62140     fi # end user specified settings
62141 
62142     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62143     if test "x$FREETYPE_CFLAGS" = x; then
62144 
62145   # Only process if variable expands to non-empty
62146 
62147   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62148     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62149 
62150   # Input might be given as Windows format, start by converting to
62151   # unix format.
62152   path="$FREETYPE_INCLUDE_PATH"
62153   new_path=`$CYGPATH -u "$path"`
62154 
62155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62158   # "foo.exe" is OK but "foo" is an error.
62159   #
62160   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62161   # It is also a way to make sure we got the proper file name for the real test later on.
62162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62163   if test "x$test_shortpath" = x; then
62164     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62165 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62166     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62167   fi
62168 
62169   # Call helper function which possibly converts this using DOS-style short mode.
62170   # If so, the updated path is stored in $new_path.
62171 
62172   input_path="$new_path"
62173   # Check if we need to convert this using DOS-style short mode. If the path
62174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62175   # take no chances and rewrite it.
62176   # Note: m4 eats our [], so we need to use [ and ] instead.
62177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62178   if test "x$has_forbidden_chars" != x; then
62179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62183       # Going to short mode and back again did indeed matter. Since short mode is
62184       # case insensitive, let's make it lowercase to improve readability.
62185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62186       # Now convert it back to Unix-style (cygpath)
62187       input_path=`$CYGPATH -u "$shortmode_path"`
62188       new_path="$input_path"
62189     fi
62190   fi
62191 
62192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62193   if test "x$test_cygdrive_prefix" = x; then
62194     # As a simple fix, exclude /usr/bin since it's not a real path.
62195     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62197       # a path prefixed by /cygdrive for fixpath to work.
62198       new_path="$CYGWIN_ROOT_PATH$input_path"
62199     fi
62200   fi
62201 
62202 
62203   if test "x$path" != "x$new_path"; then
62204     FREETYPE_INCLUDE_PATH="$new_path"
62205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62206 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62207   fi
62208 
62209     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62210 
62211   path="$FREETYPE_INCLUDE_PATH"
62212   has_colon=`$ECHO $path | $GREP ^.:`
62213   new_path="$path"
62214   if test "x$has_colon" = x; then
62215     # Not in mixed or Windows style, start by that.
62216     new_path=`cmd //c echo $path`
62217   fi
62218 
62219 
62220   input_path="$new_path"
62221   # Check if we need to convert this using DOS-style short mode. If the path
62222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62223   # take no chances and rewrite it.
62224   # Note: m4 eats our [], so we need to use [ and ] instead.
62225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62226   if test "x$has_forbidden_chars" != x; then
62227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62229   fi
62230 
62231 
62232   windows_path="$new_path"
62233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62234     unix_path=`$CYGPATH -u "$windows_path"`
62235     new_path="$unix_path"
62236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62238     new_path="$unix_path"
62239   fi
62240 
62241   if test "x$path" != "x$new_path"; then
62242     FREETYPE_INCLUDE_PATH="$new_path"
62243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62244 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62245   fi
62246 
62247   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62248   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62249 
62250     else
62251       # We're on a unix platform. Hooray! :)
62252       path="$FREETYPE_INCLUDE_PATH"
62253       has_space=`$ECHO "$path" | $GREP " "`
62254       if test "x$has_space" != x; then
62255         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62256 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62257         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62258       fi
62259 
62260       # Use eval to expand a potential ~
62261       eval path="$path"
62262       if test ! -f "$path" && test ! -d "$path"; then
62263         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62264       fi
62265 
62266       if test -d "$path"; then
62267         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62268       else
62269         dir="`$DIRNAME "$path"`"
62270         base="`$BASENAME "$path"`"
62271         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62272       fi
62273     fi
62274   fi
62275 
62276       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62277         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62278       else
62279         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62280       fi
62281     fi
62282 
62283     if test "x$FREETYPE_LIBS" = x; then
62284 
62285   # Only process if variable expands to non-empty
62286 
62287   if test "x$FREETYPE_LIB_PATH" != x; then
62288     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62289 
62290   # Input might be given as Windows format, start by converting to
62291   # unix format.
62292   path="$FREETYPE_LIB_PATH"
62293   new_path=`$CYGPATH -u "$path"`
62294 
62295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62298   # "foo.exe" is OK but "foo" is an error.
62299   #
62300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62301   # It is also a way to make sure we got the proper file name for the real test later on.
62302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62303   if test "x$test_shortpath" = x; then
62304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62305 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62306     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62307   fi
62308 
62309   # Call helper function which possibly converts this using DOS-style short mode.
62310   # If so, the updated path is stored in $new_path.
62311 
62312   input_path="$new_path"
62313   # Check if we need to convert this using DOS-style short mode. If the path
62314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62315   # take no chances and rewrite it.
62316   # Note: m4 eats our [], so we need to use [ and ] instead.
62317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62318   if test "x$has_forbidden_chars" != x; then
62319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62323       # Going to short mode and back again did indeed matter. Since short mode is
62324       # case insensitive, let's make it lowercase to improve readability.
62325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62326       # Now convert it back to Unix-style (cygpath)
62327       input_path=`$CYGPATH -u "$shortmode_path"`
62328       new_path="$input_path"
62329     fi
62330   fi
62331 
62332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62333   if test "x$test_cygdrive_prefix" = x; then
62334     # As a simple fix, exclude /usr/bin since it's not a real path.
62335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62337       # a path prefixed by /cygdrive for fixpath to work.
62338       new_path="$CYGWIN_ROOT_PATH$input_path"
62339     fi
62340   fi
62341 
62342 
62343   if test "x$path" != "x$new_path"; then
62344     FREETYPE_LIB_PATH="$new_path"
62345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62346 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62347   fi
62348 
62349     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62350 
62351   path="$FREETYPE_LIB_PATH"
62352   has_colon=`$ECHO $path | $GREP ^.:`
62353   new_path="$path"
62354   if test "x$has_colon" = x; then
62355     # Not in mixed or Windows style, start by that.
62356     new_path=`cmd //c echo $path`
62357   fi
62358 
62359 
62360   input_path="$new_path"
62361   # Check if we need to convert this using DOS-style short mode. If the path
62362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62363   # take no chances and rewrite it.
62364   # Note: m4 eats our [], so we need to use [ and ] instead.
62365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62366   if test "x$has_forbidden_chars" != x; then
62367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62369   fi
62370 
62371 
62372   windows_path="$new_path"
62373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62374     unix_path=`$CYGPATH -u "$windows_path"`
62375     new_path="$unix_path"
62376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62378     new_path="$unix_path"
62379   fi
62380 
62381   if test "x$path" != "x$new_path"; then
62382     FREETYPE_LIB_PATH="$new_path"
62383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62384 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62385   fi
62386 
62387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62389 
62390     else
62391       # We're on a unix platform. Hooray! :)
62392       path="$FREETYPE_LIB_PATH"
62393       has_space=`$ECHO "$path" | $GREP " "`
62394       if test "x$has_space" != x; then
62395         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62396 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62397         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62398       fi
62399 
62400       # Use eval to expand a potential ~
62401       eval path="$path"
62402       if test ! -f "$path" && test ! -d "$path"; then
62403         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62404       fi
62405 
62406       if test -d "$path"; then
62407         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62408       else
62409         dir="`$DIRNAME "$path"`"
62410         base="`$BASENAME "$path"`"
62411         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62412       fi
62413     fi
62414   fi
62415 
62416       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62417         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62418       else
62419         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62420       fi
62421     fi
62422 
62423     # Try to compile it
62424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62425 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62426     ac_ext=cpp
62427 ac_cpp='$CXXCPP $CPPFLAGS'
62428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62431 
62432     PREV_CXXCFLAGS="$CXXFLAGS"
62433     PREV_LIBS="$LIBS"
62434     PREV_CXX="$CXX"
62435     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62436     LIBS="$LIBS $FREETYPE_LIBS"
62437     CXX="$FIXPATH $CXX"
62438     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62439 /* end confdefs.h.  */
62440 
62441           #include<ft2build.h>
62442           #include FT_FREETYPE_H
62443           int main () {
62444             FT_Init_FreeType(NULL);
62445             return 0;
62446           }
62447 
62448 _ACEOF
62449 if ac_fn_cxx_try_link "$LINENO"; then :
62450 
62451           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62452 $as_echo "yes" >&6; }
62453 
62454 else
62455 
62456           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62457 $as_echo "no" >&6; }
62458           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62459 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62460           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62461 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62462 
62463 
62464   # Print a helpful message on how to acquire the necessary build dependency.
62465   # freetype is the help tag: freetype, cups, alsa etc
62466   MISSING_DEPENDENCY=freetype
62467 
62468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62469     cygwin_help $MISSING_DEPENDENCY
62470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62471     msys_help $MISSING_DEPENDENCY
62472   else
62473     PKGHANDLER_COMMAND=
62474 
62475     case $PKGHANDLER in
62476       apt-get)
62477         apt_help     $MISSING_DEPENDENCY ;;
62478       yum)
62479         yum_help     $MISSING_DEPENDENCY ;;
62480       port)
62481         port_help    $MISSING_DEPENDENCY ;;
62482       pkgutil)
62483         pkgutil_help $MISSING_DEPENDENCY ;;
62484       pkgadd)
62485         pkgadd_help  $MISSING_DEPENDENCY ;;
62486     esac
62487 
62488     if test "x$PKGHANDLER_COMMAND" != x; then
62489       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62490     fi
62491   fi
62492 
62493 
62494           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62495 
62496 
62497 fi
62498 rm -f core conftest.err conftest.$ac_objext \
62499     conftest$ac_exeext conftest.$ac_ext
62500     CXXCFLAGS="$PREV_CXXFLAGS"
62501     LIBS="$PREV_LIBS"
62502     CXX="$PREV_CXX"
62503     ac_ext=cpp
62504 ac_cpp='$CXXCPP $CPPFLAGS'
62505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62508 
62509 
62510     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62511 $as_echo_n "checking if we should bundle freetype... " >&6; }
62512     if test "x$BUNDLE_FREETYPE" = xyes; then
62513       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62514     fi
62515     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62516 $as_echo "$BUNDLE_FREETYPE" >&6; }
62517 
62518   fi # end freetype needed
62519 
62520 
62521 
62522 
62523 
62524 
62525 
62526 # Check whether --with-alsa was given.
62527 if test "${with_alsa+set}" = set; then :
62528   withval=$with_alsa;
62529 fi
62530 
62531 
62532 # Check whether --with-alsa-include was given.
62533 if test "${with_alsa_include+set}" = set; then :
62534   withval=$with_alsa_include;
62535 fi
62536 
62537 
62538 # Check whether --with-alsa-lib was given.
62539 if test "${with_alsa_lib+set}" = set; then :
62540   withval=$with_alsa_lib;
62541 fi
62542 
62543 
62544   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62545     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62546         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62547         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62548       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62549 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62550     fi
62551     ALSA_CFLAGS=
62552     ALSA_LIBS=
62553   else
62554     ALSA_FOUND=no
62555 
62556     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62557       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62558     fi
62559 
62560     if test "x${with_alsa}" != x; then
62561       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62562       ALSA_CFLAGS="-I${with_alsa}/include"
62563       ALSA_FOUND=yes
62564     fi
62565     if test "x${with_alsa_include}" != x; then
62566       ALSA_CFLAGS="-I${with_alsa_include}"
62567       ALSA_FOUND=yes
62568     fi
62569     if test "x${with_alsa_lib}" != x; then
62570       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62571       ALSA_FOUND=yes
62572     fi
62573     # Do not try pkg-config if we have a sysroot set.
62574     if test "x$SYSROOT" = x; then
62575       if test "x$ALSA_FOUND" = xno; then
62576 
62577 pkg_failed=no
62578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62579 $as_echo_n "checking for ALSA... " >&6; }
62580 
62581 if test -n "$ALSA_CFLAGS"; then
62582     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62583  elif test -n "$PKG_CONFIG"; then
62584     if test -n "$PKG_CONFIG" && \
62585     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62586   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62587   ac_status=$?
62588   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62589   test $ac_status = 0; }; then
62590   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62591 else
62592   pkg_failed=yes
62593 fi
62594  else
62595     pkg_failed=untried
62596 fi
62597 if test -n "$ALSA_LIBS"; then
62598     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62599  elif test -n "$PKG_CONFIG"; then
62600     if test -n "$PKG_CONFIG" && \
62601     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62602   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62603   ac_status=$?
62604   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62605   test $ac_status = 0; }; then
62606   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62607 else
62608   pkg_failed=yes
62609 fi
62610  else
62611     pkg_failed=untried
62612 fi
62613 
62614 
62615 
62616 if test $pkg_failed = yes; then
62617 
62618 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62619         _pkg_short_errors_supported=yes
62620 else
62621         _pkg_short_errors_supported=no
62622 fi
62623         if test $_pkg_short_errors_supported = yes; then
62624                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62625         else
62626                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62627         fi
62628         # Put the nasty error message in config.log where it belongs
62629         echo "$ALSA_PKG_ERRORS" >&5
62630 
62631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62632 $as_echo "no" >&6; }
62633                 ALSA_FOUND=no
62634 elif test $pkg_failed = untried; then
62635         ALSA_FOUND=no
62636 else
62637         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62638         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62640 $as_echo "yes" >&6; }
62641         ALSA_FOUND=yes
62642 fi
62643       fi
62644     fi
62645     if test "x$ALSA_FOUND" = xno; then
62646       for ac_header in alsa/asoundlib.h
62647 do :
62648   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62649 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62650   cat >>confdefs.h <<_ACEOF
62651 #define HAVE_ALSA_ASOUNDLIB_H 1
62652 _ACEOF
62653 
62654             ALSA_FOUND=yes
62655             ALSA_CFLAGS=-Iignoreme
62656             ALSA_LIBS=-lasound
62657             DEFAULT_ALSA=yes
62658 
62659 else
62660   ALSA_FOUND=no
62661 
62662 fi
62663 
62664 done
62665 
62666     fi
62667     if test "x$ALSA_FOUND" = xno; then
62668 
62669   # Print a helpful message on how to acquire the necessary build dependency.
62670   # alsa is the help tag: freetype, cups, alsa etc
62671   MISSING_DEPENDENCY=alsa
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 alsa! $HELP_MSG" "$LINENO" 5
62699     fi
62700   fi
62701 
62702 
62703 
62704 
62705 
62706 
62707 # Check whether --with-libffi was given.
62708 if test "${with_libffi+set}" = set; then :
62709   withval=$with_libffi;
62710 fi
62711 
62712 
62713 # Check whether --with-libffi-include was given.
62714 if test "${with_libffi_include+set}" = set; then :
62715   withval=$with_libffi_include;
62716 fi
62717 
62718 
62719 # Check whether --with-libffi-lib was given.
62720 if test "${with_libffi_lib+set}" = set; then :
62721   withval=$with_libffi_lib;
62722 fi
62723 
62724   # Check whether --enable-libffi-bundling was given.
62725 if test "${enable_libffi_bundling+set}" = set; then :
62726   enableval=$enable_libffi_bundling;
62727 fi
62728 
62729 
62730   if test "x$NEEDS_LIB_FFI" = xfalse; then
62731     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62732         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62733         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62734       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62735 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62736     fi
62737     LIBFFI_CFLAGS=
62738     LIBFFI_LIBS=
62739   else
62740     LIBFFI_FOUND=no
62741 
62742     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62743       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62744     fi
62745 
62746     if test "x${with_libffi}" != x; then
62747       LIBFFI_LIB_PATH="${with_libffi}/lib"
62748       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62749       LIBFFI_CFLAGS="-I${with_libffi}/include"
62750       LIBFFI_FOUND=yes
62751     fi
62752     if test "x${with_libffi_include}" != x; then
62753       LIBFFI_CFLAGS="-I${with_libffi_include}"
62754       LIBFFI_FOUND=yes
62755     fi
62756     if test "x${with_libffi_lib}" != x; then
62757       LIBFFI_LIB_PATH="${with_libffi_lib}"
62758       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62759       LIBFFI_FOUND=yes
62760     fi
62761     # Do not try pkg-config if we have a sysroot set.
62762     if test "x$SYSROOT" = x; then
62763       if test "x$LIBFFI_FOUND" = xno; then
62764         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62765 
62766 pkg_failed=no
62767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62768 $as_echo_n "checking for LIBFFI... " >&6; }
62769 
62770 if test -n "$LIBFFI_CFLAGS"; then
62771     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62772  elif test -n "$PKG_CONFIG"; then
62773     if test -n "$PKG_CONFIG" && \
62774     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62775   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62776   ac_status=$?
62777   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62778   test $ac_status = 0; }; then
62779   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62780 else
62781   pkg_failed=yes
62782 fi
62783  else
62784     pkg_failed=untried
62785 fi
62786 if test -n "$LIBFFI_LIBS"; then
62787     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62788  elif test -n "$PKG_CONFIG"; then
62789     if test -n "$PKG_CONFIG" && \
62790     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62791   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62792   ac_status=$?
62793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62794   test $ac_status = 0; }; then
62795   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62796 else
62797   pkg_failed=yes
62798 fi
62799  else
62800     pkg_failed=untried
62801 fi
62802 
62803 
62804 
62805 if test $pkg_failed = yes; then
62806 
62807 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62808         _pkg_short_errors_supported=yes
62809 else
62810         _pkg_short_errors_supported=no
62811 fi
62812         if test $_pkg_short_errors_supported = yes; then
62813                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62814         else
62815                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62816         fi
62817         # Put the nasty error message in config.log where it belongs
62818         echo "$LIBFFI_PKG_ERRORS" >&5
62819 
62820         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62821 $as_echo "no" >&6; }
62822                 LIBFFI_FOUND=no
62823 elif test $pkg_failed = untried; then
62824         LIBFFI_FOUND=no
62825 else
62826         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62827         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62828         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62829 $as_echo "yes" >&6; }
62830         LIBFFI_FOUND=yes
62831 fi
62832       fi
62833     fi
62834     if test "x$LIBFFI_FOUND" = xno; then
62835       for ac_header in ffi.h
62836 do :
62837   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62838 if test "x$ac_cv_header_ffi_h" = xyes; then :
62839   cat >>confdefs.h <<_ACEOF
62840 #define HAVE_FFI_H 1
62841 _ACEOF
62842 
62843             LIBFFI_FOUND=yes
62844             LIBFFI_CFLAGS=
62845             LIBFFI_LIBS=-lffi
62846 
62847 else
62848   LIBFFI_FOUND=no
62849 
62850 fi
62851 
62852 done
62853 
62854     fi
62855     if test "x$LIBFFI_FOUND" = xno; then
62856 
62857   # Print a helpful message on how to acquire the necessary build dependency.
62858   # ffi is the help tag: freetype, cups, alsa etc
62859   MISSING_DEPENDENCY=ffi
62860 
62861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62862     cygwin_help $MISSING_DEPENDENCY
62863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62864     msys_help $MISSING_DEPENDENCY
62865   else
62866     PKGHANDLER_COMMAND=
62867 
62868     case $PKGHANDLER in
62869       apt-get)
62870         apt_help     $MISSING_DEPENDENCY ;;
62871       yum)
62872         yum_help     $MISSING_DEPENDENCY ;;
62873       port)
62874         port_help    $MISSING_DEPENDENCY ;;
62875       pkgutil)
62876         pkgutil_help $MISSING_DEPENDENCY ;;
62877       pkgadd)
62878         pkgadd_help  $MISSING_DEPENDENCY ;;
62879     esac
62880 
62881     if test "x$PKGHANDLER_COMMAND" != x; then
62882       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62883     fi
62884   fi
62885 
62886       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62887     fi
62888 
62889     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62890 $as_echo_n "checking if libffi works... " >&6; }
62891     ac_ext=c
62892 ac_cpp='$CPP $CPPFLAGS'
62893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62896 
62897     OLD_CFLAGS="$CFLAGS"
62898     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62899     OLD_LIBS="$LIBS"
62900     LIBS="$LIBS $LIBFFI_LIBS"
62901     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62902 /* end confdefs.h.  */
62903 #include <ffi.h>
62904 int
62905 main ()
62906 {
62907 
62908           ffi_call(NULL, NULL, NULL, NULL);
62909           return 0;
62910 
62911   ;
62912   return 0;
62913 }
62914 _ACEOF
62915 if ac_fn_c_try_link "$LINENO"; then :
62916   LIBFFI_WORKS=yes
62917 else
62918   LIBFFI_WORKS=no
62919 
62920 fi
62921 rm -f core conftest.err conftest.$ac_objext \
62922     conftest$ac_exeext conftest.$ac_ext
62923     CFLAGS="$OLD_CFLAGS"
62924     LIBS="$OLD_LIBS"
62925     ac_ext=cpp
62926 ac_cpp='$CXXCPP $CPPFLAGS'
62927 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62928 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62929 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62930 
62931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62932 $as_echo "$LIBFFI_WORKS" >&6; }
62933 
62934     if test "x$LIBFFI_WORKS" = xno; then
62935 
62936   # Print a helpful message on how to acquire the necessary build dependency.
62937   # ffi is the help tag: freetype, cups, alsa etc
62938   MISSING_DEPENDENCY=ffi
62939 
62940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62941     cygwin_help $MISSING_DEPENDENCY
62942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62943     msys_help $MISSING_DEPENDENCY
62944   else
62945     PKGHANDLER_COMMAND=
62946 
62947     case $PKGHANDLER in
62948       apt-get)
62949         apt_help     $MISSING_DEPENDENCY ;;
62950       yum)
62951         yum_help     $MISSING_DEPENDENCY ;;
62952       port)
62953         port_help    $MISSING_DEPENDENCY ;;
62954       pkgutil)
62955         pkgutil_help $MISSING_DEPENDENCY ;;
62956       pkgadd)
62957         pkgadd_help  $MISSING_DEPENDENCY ;;
62958     esac
62959 
62960     if test "x$PKGHANDLER_COMMAND" != x; then
62961       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62962     fi
62963   fi
62964 
62965       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62966     fi
62967 
62968     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62969 $as_echo_n "checking if libffi should be bundled... " >&6; }
62970     if test "x$enable_libffi_bundling" = "x"; then
62971       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62972 $as_echo "no" >&6; }
62973       ENABLE_LIBFFI_BUNDLING=false
62974     elif  test "x$enable_libffi_bundling" = "xno"; then
62975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62976 $as_echo "no, forced" >&6; }
62977       ENABLE_LIBFFI_BUNDLING=false
62978     elif  test "x$enable_libffi_bundling" = "xyes"; then
62979       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62980 $as_echo "yes, forced" >&6; }
62981       ENABLE_LIBFFI_BUNDLING=true
62982     else
62983       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62984     fi
62985 
62986     # Find the libffi.so.X to bundle
62987     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62988       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62989 $as_echo_n "checking for libffi lib file location... " >&6; }
62990       if test "x${LIBFFI_LIB_PATH}" != x; then
62991         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62992           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62993         else
62994           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62995         fi
62996       else
62997         # If we don't have an explicit path, look in a few obvious places
62998         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62999           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63000             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63001           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63002             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63003           else
63004             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63005           fi
63006         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63007           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63008             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63009           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63010             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63011           else
63012             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63013           fi
63014         else
63015           # Fallback on the default /usr/lib dir
63016           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63017             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63018           else
63019             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63020           fi
63021         fi
63022       fi
63023       # Make sure the wildcard is evaluated
63024       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63025       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63026 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
63027     fi
63028   fi
63029 
63030 
63031 
63032 
63033 
63034 
63035 
63036   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63037     # Extract the first word of "llvm-config", so it can be a program name with args.
63038 set dummy llvm-config; ac_word=$2
63039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63040 $as_echo_n "checking for $ac_word... " >&6; }
63041 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63042   $as_echo_n "(cached) " >&6
63043 else
63044   if test -n "$LLVM_CONFIG"; then
63045   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63046 else
63047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63048 for as_dir in $PATH
63049 do
63050   IFS=$as_save_IFS
63051   test -z "$as_dir" && as_dir=.
63052     for ac_exec_ext in '' $ac_executable_extensions; do
63053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63054     ac_cv_prog_LLVM_CONFIG="llvm-config"
63055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63056     break 2
63057   fi
63058 done
63059   done
63060 IFS=$as_save_IFS
63061 
63062 fi
63063 fi
63064 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63065 if test -n "$LLVM_CONFIG"; then
63066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63067 $as_echo "$LLVM_CONFIG" >&6; }
63068 else
63069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63070 $as_echo "no" >&6; }
63071 fi
63072 
63073 
63074 
63075     if test "x$LLVM_CONFIG" != xllvm-config; then
63076       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63077     fi
63078 
63079     llvm_components="jit mcjit engine nativecodegen native"
63080     unset LLVM_CFLAGS
63081     for flag in $("$LLVM_CONFIG" --cxxflags); do
63082       if echo "${flag}" | grep -q '^-[ID]'; then
63083         if test "${flag}" != "-D_DEBUG" ; then
63084           if test "${LLVM_CFLAGS}" != "" ; then
63085             LLVM_CFLAGS="${LLVM_CFLAGS} "
63086           fi
63087           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63088         fi
63089       fi
63090     done
63091     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63092     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63093 
63094     unset LLVM_LDFLAGS
63095     for flag in $("${LLVM_CONFIG}" --ldflags); do
63096       if echo "${flag}" | grep -q '^-L'; then
63097         if test "${LLVM_LDFLAGS}" != ""; then
63098           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63099         fi
63100         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63101       fi
63102     done
63103 
63104     unset LLVM_LIBS
63105     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63106       if echo "${flag}" | grep -q '^-l'; then
63107         if test "${LLVM_LIBS}" != ""; then
63108           LLVM_LIBS="${LLVM_LIBS} "
63109         fi
63110         LLVM_LIBS="${LLVM_LIBS}${flag}"
63111       fi
63112     done
63113 
63114     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63115     # always properly detect -ltinfo
63116     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63117 
63118 
63119 
63120 
63121   fi
63122 
63123 
63124 
63125 # Check whether --with-libjpeg was given.
63126 if test "${with_libjpeg+set}" = set; then :
63127   withval=$with_libjpeg;
63128 fi
63129 
63130 
63131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63132 $as_echo_n "checking for which libjpeg to use... " >&6; }
63133   # default is bundled
63134   DEFAULT_LIBJPEG=bundled
63135   # if user didn't specify, use DEFAULT_LIBJPEG
63136   if test "x${with_libjpeg}" = "x"; then
63137     with_libjpeg=${DEFAULT_LIBJPEG}
63138   fi
63139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63140 $as_echo "${with_libjpeg}" >&6; }
63141 
63142   if test "x${with_libjpeg}" = "xbundled"; then
63143     USE_EXTERNAL_LIBJPEG=false
63144   elif test "x${with_libjpeg}" = "xsystem"; then
63145     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63146 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63147 
63148 else
63149    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63150 fi
63151 
63152 
63153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63154 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63155 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63156   $as_echo_n "(cached) " >&6
63157 else
63158   ac_check_lib_save_LIBS=$LIBS
63159 LIBS="-ljpeg  $LIBS"
63160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63161 /* end confdefs.h.  */
63162 
63163 /* Override any GCC internal prototype to avoid an error.
63164    Use char because int might match the return type of a GCC
63165    builtin and then its argument prototype would still apply.  */
63166 #ifdef __cplusplus
63167 extern "C"
63168 #endif
63169 char jpeg_CreateDecompress ();
63170 int
63171 main ()
63172 {
63173 return jpeg_CreateDecompress ();
63174   ;
63175   return 0;
63176 }
63177 _ACEOF
63178 if ac_fn_cxx_try_link "$LINENO"; then :
63179   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63180 else
63181   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63182 fi
63183 rm -f core conftest.err conftest.$ac_objext \
63184     conftest$ac_exeext conftest.$ac_ext
63185 LIBS=$ac_check_lib_save_LIBS
63186 fi
63187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63188 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63189 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63190   cat >>confdefs.h <<_ACEOF
63191 #define HAVE_LIBJPEG 1
63192 _ACEOF
63193 
63194   LIBS="-ljpeg $LIBS"
63195 
63196 else
63197    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63198 fi
63199 
63200 
63201     USE_EXTERNAL_LIBJPEG=true
63202   else
63203     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63204   fi
63205 
63206 
63207 
63208 
63209 
63210 # Check whether --with-giflib was given.
63211 if test "${with_giflib+set}" = set; then :
63212   withval=$with_giflib;
63213 fi
63214 
63215 
63216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63217 $as_echo_n "checking for which giflib to use... " >&6; }
63218   # default is bundled
63219   DEFAULT_GIFLIB=bundled
63220   # if user didn't specify, use DEFAULT_GIFLIB
63221   if test "x${with_giflib}" = "x"; then
63222     with_giflib=${DEFAULT_GIFLIB}
63223   fi
63224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63225 $as_echo "${with_giflib}" >&6; }
63226 
63227   if test "x${with_giflib}" = "xbundled"; then
63228     USE_EXTERNAL_LIBGIF=false
63229   elif test "x${with_giflib}" = "xsystem"; then
63230     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63231 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63232 
63233 else
63234    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63235 fi
63236 
63237 
63238     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63239 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63240 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63241   $as_echo_n "(cached) " >&6
63242 else
63243   ac_check_lib_save_LIBS=$LIBS
63244 LIBS="-lgif  $LIBS"
63245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63246 /* end confdefs.h.  */
63247 
63248 /* Override any GCC internal prototype to avoid an error.
63249    Use char because int might match the return type of a GCC
63250    builtin and then its argument prototype would still apply.  */
63251 #ifdef __cplusplus
63252 extern "C"
63253 #endif
63254 char DGifGetCode ();
63255 int
63256 main ()
63257 {
63258 return DGifGetCode ();
63259   ;
63260   return 0;
63261 }
63262 _ACEOF
63263 if ac_fn_cxx_try_link "$LINENO"; then :
63264   ac_cv_lib_gif_DGifGetCode=yes
63265 else
63266   ac_cv_lib_gif_DGifGetCode=no
63267 fi
63268 rm -f core conftest.err conftest.$ac_objext \
63269     conftest$ac_exeext conftest.$ac_ext
63270 LIBS=$ac_check_lib_save_LIBS
63271 fi
63272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63273 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63274 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63275   cat >>confdefs.h <<_ACEOF
63276 #define HAVE_LIBGIF 1
63277 _ACEOF
63278 
63279   LIBS="-lgif $LIBS"
63280 
63281 else
63282    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63283 fi
63284 
63285 
63286     USE_EXTERNAL_LIBGIF=true
63287   else
63288     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63289   fi
63290 
63291 
63292 
63293 
63294 
63295 # Check whether --with-libpng was given.
63296 if test "${with_libpng+set}" = set; then :
63297   withval=$with_libpng;
63298 fi
63299 
63300 
63301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63302 $as_echo_n "checking for which libpng to use... " >&6; }
63303 
63304   # default is bundled
63305   DEFAULT_LIBPNG=bundled
63306   # if user didn't specify, use DEFAULT_LIBPNG
63307   if test "x${with_libpng}" = "x"; then
63308       with_libpng=${DEFAULT_LIBPNG}
63309   fi
63310 
63311   if test "x${with_libpng}" = "xbundled"; then
63312       USE_EXTERNAL_LIBPNG=false
63313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63314 $as_echo "bundled" >&6; }
63315   elif test "x${with_libpng}" = "xsystem"; then
63316 
63317 pkg_failed=no
63318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63319 $as_echo_n "checking for PNG... " >&6; }
63320 
63321 if test -n "$PNG_CFLAGS"; then
63322     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63323  elif test -n "$PKG_CONFIG"; then
63324     if test -n "$PKG_CONFIG" && \
63325     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63326   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63327   ac_status=$?
63328   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63329   test $ac_status = 0; }; then
63330   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63331 else
63332   pkg_failed=yes
63333 fi
63334  else
63335     pkg_failed=untried
63336 fi
63337 if test -n "$PNG_LIBS"; then
63338     pkg_cv_PNG_LIBS="$PNG_LIBS"
63339  elif test -n "$PKG_CONFIG"; then
63340     if test -n "$PKG_CONFIG" && \
63341     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63342   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63343   ac_status=$?
63344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63345   test $ac_status = 0; }; then
63346   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63347 else
63348   pkg_failed=yes
63349 fi
63350  else
63351     pkg_failed=untried
63352 fi
63353 
63354 
63355 
63356 if test $pkg_failed = yes; then
63357 
63358 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63359         _pkg_short_errors_supported=yes
63360 else
63361         _pkg_short_errors_supported=no
63362 fi
63363         if test $_pkg_short_errors_supported = yes; then
63364                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63365         else
63366                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63367         fi
63368         # Put the nasty error message in config.log where it belongs
63369         echo "$PNG_PKG_ERRORS" >&5
63370 
63371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63372 $as_echo "no" >&6; }
63373                  LIBPNG_FOUND=no
63374 elif test $pkg_failed = untried; then
63375          LIBPNG_FOUND=no
63376 else
63377         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63378         PNG_LIBS=$pkg_cv_PNG_LIBS
63379         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63380 $as_echo "yes" >&6; }
63381          LIBPNG_FOUND=yes
63382 fi
63383       if test "x${LIBPNG_FOUND}" = "xyes"; then
63384           USE_EXTERNAL_LIBPNG=true
63385           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63386 $as_echo "system" >&6; }
63387       else
63388           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63389 $as_echo "system not found" >&6; }
63390           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63391       fi
63392   else
63393       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63394   fi
63395 
63396 
63397 
63398 
63399 
63400 # Check whether --with-zlib was given.
63401 if test "${with_zlib+set}" = set; then :
63402   withval=$with_zlib;
63403 fi
63404 
63405 
63406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63407 $as_echo_n "checking for compress in -lz... " >&6; }
63408 if ${ac_cv_lib_z_compress+:} false; then :
63409   $as_echo_n "(cached) " >&6
63410 else
63411   ac_check_lib_save_LIBS=$LIBS
63412 LIBS="-lz  $LIBS"
63413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63414 /* end confdefs.h.  */
63415 
63416 /* Override any GCC internal prototype to avoid an error.
63417    Use char because int might match the return type of a GCC
63418    builtin and then its argument prototype would still apply.  */
63419 #ifdef __cplusplus
63420 extern "C"
63421 #endif
63422 char compress ();
63423 int
63424 main ()
63425 {
63426 return compress ();
63427   ;
63428   return 0;
63429 }
63430 _ACEOF
63431 if ac_fn_cxx_try_link "$LINENO"; then :
63432   ac_cv_lib_z_compress=yes
63433 else
63434   ac_cv_lib_z_compress=no
63435 fi
63436 rm -f core conftest.err conftest.$ac_objext \
63437     conftest$ac_exeext conftest.$ac_ext
63438 LIBS=$ac_check_lib_save_LIBS
63439 fi
63440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63441 $as_echo "$ac_cv_lib_z_compress" >&6; }
63442 if test "x$ac_cv_lib_z_compress" = xyes; then :
63443    ZLIB_FOUND=yes
63444 else
63445    ZLIB_FOUND=no
63446 fi
63447 
63448 
63449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63450 $as_echo_n "checking for which zlib to use... " >&6; }
63451 
63452   DEFAULT_ZLIB=system
63453   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63454     # On windows default is bundled...on others default is system
63455     DEFAULT_ZLIB=bundled
63456   fi
63457 
63458   if test "x${ZLIB_FOUND}" != "xyes"; then
63459     # If we don't find any system...set default to bundled
63460     DEFAULT_ZLIB=bundled
63461   fi
63462 
63463   # If user didn't specify, use DEFAULT_ZLIB
63464   if test "x${with_zlib}" = "x"; then
63465     with_zlib=${DEFAULT_ZLIB}
63466   fi
63467 
63468   if test "x${with_zlib}" = "xbundled"; then
63469     USE_EXTERNAL_LIBZ=false
63470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63471 $as_echo "bundled" >&6; }
63472   elif test "x${with_zlib}" = "xsystem"; then
63473     if test "x${ZLIB_FOUND}" = "xyes"; then
63474       USE_EXTERNAL_LIBZ=true
63475       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63476 $as_echo "system" >&6; }
63477     else
63478       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63479 $as_echo "system not found" >&6; }
63480       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63481     fi
63482   else
63483     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63484   fi
63485 
63486 
63487 
63488 
63489 
63490 # Check whether --with-lcms was given.
63491 if test "${with_lcms+set}" = set; then :
63492   withval=$with_lcms;
63493 fi
63494 
63495 
63496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63497 $as_echo_n "checking for which lcms to use... " >&6; }
63498 
63499   DEFAULT_LCMS=bundled
63500   # If user didn't specify, use DEFAULT_LCMS
63501   if test "x${with_lcms}" = "x"; then
63502       with_lcms=${DEFAULT_LCMS}
63503   fi
63504 
63505   if test "x${with_lcms}" = "xbundled"; then
63506     USE_EXTERNAL_LCMS=false
63507     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63508 $as_echo "bundled" >&6; }
63509   elif test "x${with_lcms}" = "xsystem"; then
63510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63511 $as_echo "system" >&6; }
63512 
63513 pkg_failed=no
63514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63515 $as_echo_n "checking for LCMS... " >&6; }
63516 
63517 if test -n "$LCMS_CFLAGS"; then
63518     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63519  elif test -n "$PKG_CONFIG"; then
63520     if test -n "$PKG_CONFIG" && \
63521     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63522   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63523   ac_status=$?
63524   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63525   test $ac_status = 0; }; then
63526   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63527 else
63528   pkg_failed=yes
63529 fi
63530  else
63531     pkg_failed=untried
63532 fi
63533 if test -n "$LCMS_LIBS"; then
63534     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63535  elif test -n "$PKG_CONFIG"; then
63536     if test -n "$PKG_CONFIG" && \
63537     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63538   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63539   ac_status=$?
63540   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63541   test $ac_status = 0; }; then
63542   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63543 else
63544   pkg_failed=yes
63545 fi
63546  else
63547     pkg_failed=untried
63548 fi
63549 
63550 
63551 
63552 if test $pkg_failed = yes; then
63553 
63554 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63555         _pkg_short_errors_supported=yes
63556 else
63557         _pkg_short_errors_supported=no
63558 fi
63559         if test $_pkg_short_errors_supported = yes; then
63560                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63561         else
63562                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63563         fi
63564         # Put the nasty error message in config.log where it belongs
63565         echo "$LCMS_PKG_ERRORS" >&5
63566 
63567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63568 $as_echo "no" >&6; }
63569                 LCMS_FOUND=no
63570 elif test $pkg_failed = untried; then
63571         LCMS_FOUND=no
63572 else
63573         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63574         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63576 $as_echo "yes" >&6; }
63577         LCMS_FOUND=yes
63578 fi
63579     if test "x${LCMS_FOUND}" = "xyes"; then
63580       USE_EXTERNAL_LCMS=true
63581     else
63582       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63583     fi
63584   else
63585     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63586   fi
63587 
63588 
63589 
63590 
63591 
63592 
63593 
63594 
63595 
63596 
63597 
63598   # Setup libm (the maths library)
63599   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63601 $as_echo_n "checking for cos in -lm... " >&6; }
63602 if ${ac_cv_lib_m_cos+:} false; then :
63603   $as_echo_n "(cached) " >&6
63604 else
63605   ac_check_lib_save_LIBS=$LIBS
63606 LIBS="-lm  $LIBS"
63607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63608 /* end confdefs.h.  */
63609 
63610 /* Override any GCC internal prototype to avoid an error.
63611    Use char because int might match the return type of a GCC
63612    builtin and then its argument prototype would still apply.  */
63613 #ifdef __cplusplus
63614 extern "C"
63615 #endif
63616 char cos ();
63617 int
63618 main ()
63619 {
63620 return cos ();
63621   ;
63622   return 0;
63623 }
63624 _ACEOF
63625 if ac_fn_cxx_try_link "$LINENO"; then :
63626   ac_cv_lib_m_cos=yes
63627 else
63628   ac_cv_lib_m_cos=no
63629 fi
63630 rm -f core conftest.err conftest.$ac_objext \
63631     conftest$ac_exeext conftest.$ac_ext
63632 LIBS=$ac_check_lib_save_LIBS
63633 fi
63634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63635 $as_echo "$ac_cv_lib_m_cos" >&6; }
63636 if test "x$ac_cv_lib_m_cos" = xyes; then :
63637   cat >>confdefs.h <<_ACEOF
63638 #define HAVE_LIBM 1
63639 _ACEOF
63640 
63641   LIBS="-lm $LIBS"
63642 
63643 else
63644 
63645         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63646 $as_echo "$as_me: Maths library was not found" >&6;}
63647 
63648 fi
63649 
63650     LIBM="-lm"
63651   else
63652     LIBM=""
63653   fi
63654 
63655 
63656   # Setup libdl (for dynamic library loading)
63657   save_LIBS="$LIBS"
63658   LIBS=""
63659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63660 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63661 if ${ac_cv_lib_dl_dlopen+:} false; then :
63662   $as_echo_n "(cached) " >&6
63663 else
63664   ac_check_lib_save_LIBS=$LIBS
63665 LIBS="-ldl  $LIBS"
63666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63667 /* end confdefs.h.  */
63668 
63669 /* Override any GCC internal prototype to avoid an error.
63670    Use char because int might match the return type of a GCC
63671    builtin and then its argument prototype would still apply.  */
63672 #ifdef __cplusplus
63673 extern "C"
63674 #endif
63675 char dlopen ();
63676 int
63677 main ()
63678 {
63679 return dlopen ();
63680   ;
63681   return 0;
63682 }
63683 _ACEOF
63684 if ac_fn_cxx_try_link "$LINENO"; then :
63685   ac_cv_lib_dl_dlopen=yes
63686 else
63687   ac_cv_lib_dl_dlopen=no
63688 fi
63689 rm -f core conftest.err conftest.$ac_objext \
63690     conftest$ac_exeext conftest.$ac_ext
63691 LIBS=$ac_check_lib_save_LIBS
63692 fi
63693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63694 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63695 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63696   cat >>confdefs.h <<_ACEOF
63697 #define HAVE_LIBDL 1
63698 _ACEOF
63699 
63700   LIBS="-ldl $LIBS"
63701 
63702 fi
63703 
63704   LIBDL="$LIBS"
63705 
63706   LIBS="$save_LIBS"
63707 
63708   # Deprecated libraries, keep the flags for backwards compatibility
63709   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63710 
63711 
63712 # Check whether --with-dxsdk was given.
63713 if test "${with_dxsdk+set}" = set; then :
63714   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63715 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63716 fi
63717 
63718 
63719 
63720 
63721 # Check whether --with-dxsdk-lib was given.
63722 if test "${with_dxsdk_lib+set}" = set; then :
63723   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63724 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63725 fi
63726 
63727 
63728 
63729 
63730 # Check whether --with-dxsdk-include was given.
63731 if test "${with_dxsdk_include+set}" = set; then :
63732   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63733 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63734 fi
63735 
63736 
63737   fi
63738 
63739   # Control if libzip can use mmap. Available for purposes of overriding.
63740   LIBZIP_CAN_USE_MMAP=true
63741 
63742 
63743 
63744   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63745     # Find the root of the Solaris Studio installation from the compiler path
63746     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63747     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63749 $as_echo_n "checking for libstlport.so.1... " >&6; }
63750     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63751       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63752       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63753     fi
63754     if test -f "$STLPORT_LIB"; then
63755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63756 $as_echo "yes, $STLPORT_LIB" >&6; }
63757 
63758   # Only process if variable expands to non-empty
63759 
63760   if test "x$STLPORT_LIB" != x; then
63761     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63762 
63763   # Input might be given as Windows format, start by converting to
63764   # unix format.
63765   path="$STLPORT_LIB"
63766   new_path=`$CYGPATH -u "$path"`
63767 
63768   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63769   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63770   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63771   # "foo.exe" is OK but "foo" is an error.
63772   #
63773   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63774   # It is also a way to make sure we got the proper file name for the real test later on.
63775   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63776   if test "x$test_shortpath" = x; then
63777     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63778 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63779     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63780   fi
63781 
63782   # Call helper function which possibly converts this using DOS-style short mode.
63783   # If so, the updated path is stored in $new_path.
63784 
63785   input_path="$new_path"
63786   # Check if we need to convert this using DOS-style short mode. If the path
63787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63788   # take no chances and rewrite it.
63789   # Note: m4 eats our [], so we need to use [ and ] instead.
63790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63791   if test "x$has_forbidden_chars" != x; then
63792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63793     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63794     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63795     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63796       # Going to short mode and back again did indeed matter. Since short mode is
63797       # case insensitive, let's make it lowercase to improve readability.
63798       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63799       # Now convert it back to Unix-style (cygpath)
63800       input_path=`$CYGPATH -u "$shortmode_path"`
63801       new_path="$input_path"
63802     fi
63803   fi
63804 
63805   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63806   if test "x$test_cygdrive_prefix" = x; then
63807     # As a simple fix, exclude /usr/bin since it's not a real path.
63808     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63809       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63810       # a path prefixed by /cygdrive for fixpath to work.
63811       new_path="$CYGWIN_ROOT_PATH$input_path"
63812     fi
63813   fi
63814 
63815 
63816   if test "x$path" != "x$new_path"; then
63817     STLPORT_LIB="$new_path"
63818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63819 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63820   fi
63821 
63822     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63823 
63824   path="$STLPORT_LIB"
63825   has_colon=`$ECHO $path | $GREP ^.:`
63826   new_path="$path"
63827   if test "x$has_colon" = x; then
63828     # Not in mixed or Windows style, start by that.
63829     new_path=`cmd //c echo $path`
63830   fi
63831 
63832 
63833   input_path="$new_path"
63834   # Check if we need to convert this using DOS-style short mode. If the path
63835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63836   # take no chances and rewrite it.
63837   # Note: m4 eats our [], so we need to use [ and ] instead.
63838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63839   if test "x$has_forbidden_chars" != x; then
63840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63841     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63842   fi
63843 
63844 
63845   windows_path="$new_path"
63846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63847     unix_path=`$CYGPATH -u "$windows_path"`
63848     new_path="$unix_path"
63849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63851     new_path="$unix_path"
63852   fi
63853 
63854   if test "x$path" != "x$new_path"; then
63855     STLPORT_LIB="$new_path"
63856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63857 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63858   fi
63859 
63860   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63861   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63862 
63863     else
63864       # We're on a unix platform. Hooray! :)
63865       path="$STLPORT_LIB"
63866       has_space=`$ECHO "$path" | $GREP " "`
63867       if test "x$has_space" != x; then
63868         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63869 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63870         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63871       fi
63872 
63873       # Use eval to expand a potential ~
63874       eval path="$path"
63875       if test ! -f "$path" && test ! -d "$path"; then
63876         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63877       fi
63878 
63879       if test -d "$path"; then
63880         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63881       else
63882         dir="`$DIRNAME "$path"`"
63883         base="`$BASENAME "$path"`"
63884         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63885       fi
63886     fi
63887   fi
63888 
63889     else
63890       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63891 $as_echo "no, not found at $STLPORT_LIB" >&6; }
63892       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63893     fi
63894 
63895   fi
63896 
63897 
63898 
63899 # Check whether --with-libelf was given.
63900 if test "${with_libelf+set}" = set; then :
63901   withval=$with_libelf;
63902 fi
63903 
63904 
63905 # Check whether --with-libelf-include was given.
63906 if test "${with_libelf_include+set}" = set; then :
63907   withval=$with_libelf_include;
63908 fi
63909 
63910 
63911 # Check whether --with-libelf-lib was given.
63912 if test "${with_libelf_lib+set}" = set; then :
63913   withval=$with_libelf_lib;
63914 fi
63915 
63916 
63917   if test "x$ENABLE_AOT" = xfalse; then
63918     if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
63919         (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
63920         (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
63921       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
63922 $as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
63923     fi
63924     LIBELF_CFLAGS=
63925     LIBELF_LIBS=
63926   else
63927     LIBELF_FOUND=no
63928 
63929     if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
63930       ENABLE_AOT="false"
63931       if test "x${enable_aot}" = xyes; then
63932         as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
63933       fi
63934     else
63935       if test "x${with_libelf}" != x; then
63936         ELF_LIBS="-L${with_libelf}/lib -lelf"
63937         ELF_CFLAGS="-I${with_libelf}/include"
63938         LIBELF_FOUND=yes
63939       fi
63940       if test "x${with_libelf_include}" != x; then
63941         ELF_CFLAGS="-I${with_libelf_include}"
63942         LIBELF_FOUND=yes
63943       fi
63944       if test "x${with_libelf_lib}" != x; then
63945         ELF_LIBS="-L${with_libelf_lib} -lelf"
63946         LIBELF_FOUND=yes
63947       fi
63948       # Do not try pkg-config if we have a sysroot set.
63949       if test "x$SYSROOT" = x; then
63950         if test "x$LIBELF_FOUND" = xno; then
63951           # Figure out ELF_CFLAGS and ELF_LIBS
63952 
63953 pkg_failed=no
63954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
63955 $as_echo_n "checking for ELF... " >&6; }
63956 
63957 if test -n "$ELF_CFLAGS"; then
63958     pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
63959  elif test -n "$PKG_CONFIG"; then
63960     if test -n "$PKG_CONFIG" && \
63961     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
63962   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
63963   ac_status=$?
63964   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63965   test $ac_status = 0; }; then
63966   pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
63967 else
63968   pkg_failed=yes
63969 fi
63970  else
63971     pkg_failed=untried
63972 fi
63973 if test -n "$ELF_LIBS"; then
63974     pkg_cv_ELF_LIBS="$ELF_LIBS"
63975  elif test -n "$PKG_CONFIG"; then
63976     if test -n "$PKG_CONFIG" && \
63977     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
63978   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
63979   ac_status=$?
63980   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63981   test $ac_status = 0; }; then
63982   pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
63983 else
63984   pkg_failed=yes
63985 fi
63986  else
63987     pkg_failed=untried
63988 fi
63989 
63990 
63991 
63992 if test $pkg_failed = yes; then
63993 
63994 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63995         _pkg_short_errors_supported=yes
63996 else
63997         _pkg_short_errors_supported=no
63998 fi
63999         if test $_pkg_short_errors_supported = yes; then
64000                 ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64001         else
64002                 ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64003         fi
64004         # Put the nasty error message in config.log where it belongs
64005         echo "$ELF_PKG_ERRORS" >&5
64006 
64007         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64008 $as_echo "no" >&6; }
64009                 LIBELF_FOUND=no
64010 elif test $pkg_failed = untried; then
64011         LIBELF_FOUND=no
64012 else
64013         ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64014         ELF_LIBS=$pkg_cv_ELF_LIBS
64015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64016 $as_echo "yes" >&6; }
64017         LIBELF_FOUND=yes
64018 fi
64019         fi
64020       fi
64021       if test "x$LIBELF_FOUND" = xno; then
64022         for ac_header in libelf.h
64023 do :
64024   ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64025 if test "x$ac_cv_header_libelf_h" = xyes; then :
64026   cat >>confdefs.h <<_ACEOF
64027 #define HAVE_LIBELF_H 1
64028 _ACEOF
64029 
64030               LIBELF_FOUND=yes
64031               ELF_CFLAGS=
64032               ELF_LIBS=-lelf
64033 
64034 else
64035   LIBELF_FOUND=no
64036 
64037 fi
64038 
64039 done
64040 
64041       fi
64042       if test "x$LIBELF_FOUND" = xno; then
64043         ENABLE_AOT="false"
64044 
64045   # Print a helpful message on how to acquire the necessary build dependency.
64046   # elf is the help tag: freetype, cups, alsa etc
64047   MISSING_DEPENDENCY=elf
64048 
64049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64050     cygwin_help $MISSING_DEPENDENCY
64051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64052     msys_help $MISSING_DEPENDENCY
64053   else
64054     PKGHANDLER_COMMAND=
64055 
64056     case $PKGHANDLER in
64057       apt-get)
64058         apt_help     $MISSING_DEPENDENCY ;;
64059       yum)
64060         yum_help     $MISSING_DEPENDENCY ;;
64061       port)
64062         port_help    $MISSING_DEPENDENCY ;;
64063       pkgutil)
64064         pkgutil_help $MISSING_DEPENDENCY ;;
64065       pkgadd)
64066         pkgadd_help  $MISSING_DEPENDENCY ;;
64067     esac
64068 
64069     if test "x$PKGHANDLER_COMMAND" != x; then
64070       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64071     fi
64072   fi
64073 
64074         if test "x${enable_aot}" = xyes; then
64075           as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64076         else
64077           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64078 $as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64079         fi
64080       else
64081         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64082 $as_echo_n "checking if libelf works... " >&6; }
64083         ac_ext=c
64084 ac_cpp='$CPP $CPPFLAGS'
64085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64088 
64089         OLD_CFLAGS="$CFLAGS"
64090         CFLAGS="$CFLAGS $ELF_CFLAGS"
64091         OLD_LIBS="$LIBS"
64092         LIBS="$LIBS $ELF_LIBS"
64093         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64094 /* end confdefs.h.  */
64095 #include <libelf.h>
64096 int
64097 main ()
64098 {
64099 
64100               elf_version(0);
64101               return 0;
64102 
64103   ;
64104   return 0;
64105 }
64106 _ACEOF
64107 if ac_fn_c_try_link "$LINENO"; then :
64108   LIBELF_WORKS=yes
64109 else
64110   LIBELF_WORKS=no
64111 
64112 fi
64113 rm -f core conftest.err conftest.$ac_objext \
64114     conftest$ac_exeext conftest.$ac_ext
64115         CFLAGS="$OLD_CFLAGS"
64116         LIBS="$OLD_LIBS"
64117         ac_ext=cpp
64118 ac_cpp='$CXXCPP $CPPFLAGS'
64119 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64120 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64121 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64122 
64123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64124 $as_echo "$LIBELF_WORKS" >&6; }
64125 
64126         if test "x$LIBELF_WORKS" = xno; then
64127           ENABLE_AOT="false"
64128 
64129   # Print a helpful message on how to acquire the necessary build dependency.
64130   # elf is the help tag: freetype, cups, alsa etc
64131   MISSING_DEPENDENCY=elf
64132 
64133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64134     cygwin_help $MISSING_DEPENDENCY
64135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64136     msys_help $MISSING_DEPENDENCY
64137   else
64138     PKGHANDLER_COMMAND=
64139 
64140     case $PKGHANDLER in
64141       apt-get)
64142         apt_help     $MISSING_DEPENDENCY ;;
64143       yum)
64144         yum_help     $MISSING_DEPENDENCY ;;
64145       port)
64146         port_help    $MISSING_DEPENDENCY ;;
64147       pkgutil)
64148         pkgutil_help $MISSING_DEPENDENCY ;;
64149       pkgadd)
64150         pkgadd_help  $MISSING_DEPENDENCY ;;
64151     esac
64152 
64153     if test "x$PKGHANDLER_COMMAND" != x; then
64154       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64155     fi
64156   fi
64157 
64158           if test "x$enable_aot" = "xyes"; then
64159             as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64160           else
64161             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64162 $as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64163           fi
64164         fi
64165       fi
64166     fi
64167   fi
64168 
64169 
64170 
64171 
64172 
64173 
64174 
64175 
64176 
64177 
64178 
64179 
64180 
64181 
64182 
64183 
64184 
64185 
64186 # Hotspot setup depends on lib checks (AOT needs libelf).
64187 
64188 
64189   # The user can in some cases supply additional jvm features. For the custom
64190   # variant, this defines the entire variant.
64191 
64192 # Check whether --with-jvm-features was given.
64193 if test "${with_jvm_features+set}" = set; then :
64194   withval=$with_jvm_features;
64195 fi
64196 
64197   if test "x$with_jvm_features" != x; then
64198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64199 $as_echo_n "checking additional JVM features... " >&6; }
64200     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64202 $as_echo "$JVM_FEATURES" >&6; }
64203   fi
64204 
64205   # Override hotspot cpu definitions for ARM platforms
64206   if test "x$OPENJDK_TARGET_CPU" = xarm; then
64207     HOTSPOT_TARGET_CPU=arm_32
64208     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64209     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64210     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64211   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64212     HOTSPOT_TARGET_CPU=arm_64
64213     HOTSPOT_TARGET_CPU_ARCH=arm
64214     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64215     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64216   fi
64217 
64218   # Verify that dependencies are met for explicitly set features.
64219   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64220     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64221   fi
64222 
64223   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64224     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64225   fi
64226 
64227   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64228     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64229   fi
64230 
64231   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64232     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64233   fi
64234 
64235   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64236     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64237   fi
64238 
64239   # Turn on additional features based on other parts of configure
64240   if test "x$INCLUDE_DTRACE" = "xtrue"; then
64241     JVM_FEATURES="$JVM_FEATURES dtrace"
64242   else
64243     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64244       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64245     fi
64246   fi
64247 
64248   if test "x$STATIC_BUILD" = "xtrue"; then
64249     JVM_FEATURES="$JVM_FEATURES static-build"
64250   else
64251     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64252       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64253     fi
64254   fi
64255 
64256   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64257     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64258       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64259     fi
64260   fi
64261 
64262   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64263     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64264       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64265     fi
64266   fi
64267 
64268   # Only enable jvmci on x86_64, sparcv9 and aarch64.
64269   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64270      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64271      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64272     JVM_FEATURES_jvmci="jvmci"
64273   else
64274     JVM_FEATURES_jvmci=""
64275   fi
64276 
64277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64278 $as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64279   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64281 $as_echo "yes, forced" >&6; }
64282     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64283       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64284     fi
64285     INCLUDE_GRAAL="true"
64286   else
64287     # By default enable graal build where AOT is available
64288     if test "x$ENABLE_AOT" = "xtrue"; then
64289       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64290 $as_echo "yes" >&6; }
64291       JVM_FEATURES_graal="graal"
64292       INCLUDE_GRAAL="true"
64293     else
64294       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64295 $as_echo "no" >&6; }
64296       JVM_FEATURES_graal=""
64297       INCLUDE_GRAAL="false"
64298     fi
64299   fi
64300 
64301 
64302 
64303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64304 $as_echo_n "checking if aot should be enabled... " >&6; }
64305   if test "x$ENABLE_AOT" = "xtrue"; then
64306     if test "x$enable_aot" = "xyes"; then
64307       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64308 $as_echo "yes, forced" >&6; }
64309     else
64310       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64311 $as_echo "yes" >&6; }
64312     fi
64313     JVM_FEATURES_aot="aot"
64314   else
64315     if test "x$enable_aot" = "xno"; then
64316       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64317 $as_echo "no, forced" >&6; }
64318     else
64319       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64320 $as_echo "no" >&6; }
64321     fi
64322     JVM_FEATURES_aot=""
64323   fi
64324 
64325   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64326     # Default to use link time optimizations on minimal on arm
64327     JVM_FEATURES_link_time_opt="link-time-opt"
64328   else
64329     JVM_FEATURES_link_time_opt=""
64330   fi
64331 
64332   # All variants but minimal (and custom) get these features
64333   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64334 
64335   # Enable features depending on variant.
64336   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64337   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64338   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64339   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64340   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64341   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64342   JVM_FEATURES_custom="$JVM_FEATURES"
64343 
64344 
64345 
64346 
64347 
64348 
64349 
64350 
64351 
64352   # Used for verification of Makefiles by check-jvm-feature
64353 
64354 
64355   # We don't support --with-jvm-interpreter anymore, use zero instead.
64356 
64357 
64358 # Check whether --with-jvm-interpreter was given.
64359 if test "${with_jvm_interpreter+set}" = set; then :
64360   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64361 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64362 fi
64363 
64364 
64365 
64366 
64367 ###############################################################################
64368 #
64369 # We need to do some final tweaking, when everything else is done.
64370 #
64371 ###############################################################################
64372 
64373 
64374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64375 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64376 
64377   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64378     ENABLE_INTREE_EC=yes
64379     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64380 $as_echo "yes" >&6; }
64381   else
64382     ENABLE_INTREE_EC=no
64383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64384 $as_echo "no" >&6; }
64385   fi
64386 
64387 
64388 
64389 
64390   # Check whether --enable-jtreg-failure-handler was given.
64391 if test "${enable_jtreg_failure_handler+set}" = set; then :
64392   enableval=$enable_jtreg_failure_handler;
64393 fi
64394 
64395 
64396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64397 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64398 
64399   if test "x$enable_jtreg_failure_handler" = "xyes"; then
64400     if test "x$JT_HOME" = "x"; then
64401       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64402     else
64403       BUILD_FAILURE_HANDLER=true
64404       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64405 $as_echo "yes, forced" >&6; }
64406     fi
64407   elif test "x$enable_jtreg_failure_handler" = "xno"; then
64408     BUILD_FAILURE_HANDLER=false
64409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64410 $as_echo "no, forced" >&6; }
64411   elif test "x$enable_jtreg_failure_handler" = "xauto" \
64412       || test "x$enable_jtreg_failure_handler" = "x"; then
64413     if test "x$JT_HOME" = "x"; then
64414       BUILD_FAILURE_HANDLER=false
64415       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64416 $as_echo "no, missing jtreg" >&6; }
64417     else
64418       BUILD_FAILURE_HANDLER=true
64419       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64420 $as_echo "yes, jtreg present" >&6; }
64421     fi
64422   else
64423     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64424   fi
64425 
64426 
64427 
64428 
64429   # Check whether --enable-generate-classlist was given.
64430 if test "${enable_generate_classlist+set}" = set; then :
64431   enableval=$enable_generate_classlist;
64432 fi
64433 
64434 
64435   # Check if it's likely that it's possible to generate the classlist. Depending
64436   # on exact jvm configuration it could be possible anyway.
64437   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64438     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64439   else
64440     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64441   fi
64442 
64443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64444 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64445   if test "x$enable_generate_classlist" = "xyes"; then
64446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64447 $as_echo "yes, forced" >&6; }
64448     ENABLE_GENERATE_CLASSLIST="true"
64449     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64450       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64451 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64452     fi
64453   elif test "x$enable_generate_classlist" = "xno"; then
64454     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64455 $as_echo "no, forced" >&6; }
64456     ENABLE_GENERATE_CLASSLIST="false"
64457   elif test "x$enable_generate_classlist" = "x"; then
64458     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64459       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64460 $as_echo "yes" >&6; }
64461       ENABLE_GENERATE_CLASSLIST="true"
64462     else
64463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64464 $as_echo "no" >&6; }
64465       ENABLE_GENERATE_CLASSLIST="false"
64466     fi
64467   else
64468     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64469   fi
64470 
64471 
64472 
64473 
64474 ###############################################################################
64475 #
64476 # Configure parts of the build that only affect the build performance,
64477 # not the result.
64478 #
64479 ###############################################################################
64480 
64481 
64482   # How many cores do we have on this build system?
64483 
64484 # Check whether --with-num-cores was given.
64485 if test "${with_num_cores+set}" = set; then :
64486   withval=$with_num_cores;
64487 fi
64488 
64489   if test "x$with_num_cores" = x; then
64490     # The number of cores were not specified, try to probe them.
64491 
64492   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64493 $as_echo_n "checking for number of cores... " >&6; }
64494   NUM_CORES=1
64495   FOUND_CORES=no
64496 
64497   if test -f /proc/cpuinfo; then
64498     # Looks like a Linux (or cygwin) system
64499     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64500     FOUND_CORES=yes
64501   elif test -x /usr/sbin/psrinfo; then
64502     # Looks like a Solaris system
64503     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64504     FOUND_CORES=yes
64505   elif test -x /usr/sbin/sysctl; then
64506     # Looks like a MacOSX system
64507     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64508     FOUND_CORES=yes
64509   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64510     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64511     FOUND_CORES=yes
64512   elif test -n "$NUMBER_OF_PROCESSORS"; then
64513     # On windows, look in the env
64514     NUM_CORES=$NUMBER_OF_PROCESSORS
64515     FOUND_CORES=yes
64516   fi
64517 
64518   if test "x$FOUND_CORES" = xyes; then
64519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64520 $as_echo "$NUM_CORES" >&6; }
64521   else
64522     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64523 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64524     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64525 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64526   fi
64527 
64528   else
64529     NUM_CORES=$with_num_cores
64530   fi
64531 
64532 
64533 
64534   # How much memory do we have on this build system?
64535 
64536 # Check whether --with-memory-size was given.
64537 if test "${with_memory_size+set}" = set; then :
64538   withval=$with_memory_size;
64539 fi
64540 
64541   if test "x$with_memory_size" = x; then
64542     # The memory size was not specified, try to probe it.
64543 
64544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64545 $as_echo_n "checking for memory size... " >&6; }
64546   # Default to 1024 MB
64547   MEMORY_SIZE=1024
64548   FOUND_MEM=no
64549 
64550   if test -f /proc/meminfo; then
64551     # Looks like a Linux (or cygwin) system
64552     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64553     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64554     FOUND_MEM=yes
64555   elif test -x /usr/sbin/prtconf; then
64556     # Looks like a Solaris or AIX system
64557     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64558     FOUND_MEM=yes
64559   elif test -x /usr/sbin/sysctl; then
64560     # Looks like a MacOSX system
64561     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64562     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64563     FOUND_MEM=yes
64564   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64565     # Windows, but without cygwin
64566     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64567     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64568     FOUND_MEM=yes
64569   fi
64570 
64571   if test "x$FOUND_MEM" = xyes; then
64572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64573 $as_echo "$MEMORY_SIZE MB" >&6; }
64574   else
64575     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64576 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64577     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64578 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64579   fi
64580 
64581   else
64582     MEMORY_SIZE=$with_memory_size
64583   fi
64584 
64585 
64586 
64587   # Provide a decent default number of parallel jobs for make depending on
64588   # number of cores, amount of memory and machine architecture.
64589 
64590 # Check whether --with-jobs was given.
64591 if test "${with_jobs+set}" = set; then :
64592   withval=$with_jobs;
64593 fi
64594 
64595   if test "x$with_jobs" = x; then
64596     # Number of jobs was not specified, calculate.
64597     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64598 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64599     # Approximate memory in GB.
64600     memory_gb=`expr $MEMORY_SIZE / 1024`
64601     # Pick the lowest of memory in gb and number of cores.
64602     if test "$memory_gb" -lt "$NUM_CORES"; then
64603       JOBS="$memory_gb"
64604     else
64605       JOBS="$NUM_CORES"
64606     fi
64607     if test "$JOBS" -eq "0"; then
64608       JOBS=1
64609     fi
64610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64611 $as_echo "$JOBS" >&6; }
64612   else
64613     JOBS=$with_jobs
64614   fi
64615 
64616 
64617 
64618   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64619 
64620 # Check whether --with-test-jobs was given.
64621 if test "${with_test_jobs+set}" = set; then :
64622   withval=$with_test_jobs;
64623 fi
64624 
64625   if test "x$with_test_jobs" = x; then
64626       TEST_JOBS=0
64627   else
64628       TEST_JOBS=$with_test_jobs
64629   fi
64630 
64631 
64632 
64633 # Setup arguments for the boot jdk (after cores and memory have been setup)
64634 
64635   ##############################################################################
64636   #
64637   # Specify jvm options for anything that is run with the Boot JDK.
64638   # Not all JVM:s accept the same arguments on the command line.
64639   #
64640 
64641 # Check whether --with-boot-jdk-jvmargs was given.
64642 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64643   withval=$with_boot_jdk_jvmargs;
64644 fi
64645 
64646 
64647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64648 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64649 
64650   # Disable special log output when a debug build is used as Boot JDK...
64651 
64652   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64653   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64654   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64655   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64656   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64657   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64658     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64659     JVM_ARG_OK=true
64660   else
64661     $ECHO "Arg failed:" >&5
64662     $ECHO "$OUTPUT" >&5
64663     JVM_ARG_OK=false
64664   fi
64665 
64666 
64667   # Force en-US environment
64668 
64669   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64670   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64671   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64672   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64673   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64674   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64675     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64676     JVM_ARG_OK=true
64677   else
64678     $ECHO "Arg failed:" >&5
64679     $ECHO "$OUTPUT" >&5
64680     JVM_ARG_OK=false
64681   fi
64682 
64683 
64684   # Apply user provided options.
64685 
64686   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64687   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64688   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64689   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64690   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64691   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64692     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64693     JVM_ARG_OK=true
64694   else
64695     $ECHO "Arg failed:" >&5
64696     $ECHO "$OUTPUT" >&5
64697     JVM_ARG_OK=false
64698   fi
64699 
64700 
64701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64702 $as_echo "$boot_jdk_jvmargs" >&6; }
64703 
64704   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64705   JAVA_FLAGS=$boot_jdk_jvmargs
64706 
64707 
64708 
64709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64710 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64711 
64712   # Starting amount of heap memory.
64713 
64714   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64715   $ECHO "Command: $JAVA -Xms64M -version" >&5
64716   OUTPUT=`$JAVA -Xms64M -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_big="$boot_jdk_jvmargs_big -Xms64M"
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   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64729 
64730   # Maximum amount of heap memory and stack size.
64731   JVM_HEAP_LIMIT_32="1024"
64732   # Running a 64 bit JVM allows for and requires a bigger heap
64733   JVM_HEAP_LIMIT_64="1600"
64734   STACK_SIZE_32=768
64735   STACK_SIZE_64=1536
64736   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64737   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64738     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64739   fi
64740   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64741     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64742   fi
64743   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64744     JVM_HEAP_LIMIT_32=512
64745     JVM_HEAP_LIMIT_64=512
64746   fi
64747 
64748   if test "x$BOOT_JDK_BITS" = "x32"; then
64749     STACK_SIZE=$STACK_SIZE_32
64750     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64751   else
64752     STACK_SIZE=$STACK_SIZE_64
64753     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64754   fi
64755 
64756   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64757   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64758   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64759   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64760   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64761   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64762     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64763     JVM_ARG_OK=true
64764   else
64765     $ECHO "Arg failed:" >&5
64766     $ECHO "$OUTPUT" >&5
64767     JVM_ARG_OK=false
64768   fi
64769 
64770 
64771   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64772   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64773   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64774   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64775   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64776   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64777     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64778     JVM_ARG_OK=true
64779   else
64780     $ECHO "Arg failed:" >&5
64781     $ECHO "$OUTPUT" >&5
64782     JVM_ARG_OK=false
64783   fi
64784 
64785 
64786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64787 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64788 
64789   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64790 
64791 
64792   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64793     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64794     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64795   else
64796     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64797     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64798   fi
64799   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64800   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64802 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64804 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64805 
64806 
64807   # By default, the main javac compilations use big
64808   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64809 
64810 
64811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64812 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64813 
64814   # Use serial gc for small short lived tools if possible
64815 
64816   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64817   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64818   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64819   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64820   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64821   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64822     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64823     JVM_ARG_OK=true
64824   else
64825     $ECHO "Arg failed:" >&5
64826     $ECHO "$OUTPUT" >&5
64827     JVM_ARG_OK=false
64828   fi
64829 
64830 
64831   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64832   $ECHO "Command: $JAVA -Xms32M -version" >&5
64833   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64834   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64835   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64836   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64837     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64838     JVM_ARG_OK=true
64839   else
64840     $ECHO "Arg failed:" >&5
64841     $ECHO "$OUTPUT" >&5
64842     JVM_ARG_OK=false
64843   fi
64844 
64845 
64846   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64847   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64848   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64849   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64850   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64851   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64852     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64853     JVM_ARG_OK=true
64854   else
64855     $ECHO "Arg failed:" >&5
64856     $ECHO "$OUTPUT" >&5
64857     JVM_ARG_OK=false
64858   fi
64859 
64860 
64861   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64862   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64863   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64864   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64865   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64866   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64867     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64868     JVM_ARG_OK=true
64869   else
64870     $ECHO "Arg failed:" >&5
64871     $ECHO "$OUTPUT" >&5
64872     JVM_ARG_OK=false
64873   fi
64874 
64875 
64876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64877 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64878 
64879   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64880 
64881 
64882   JAVA_TOOL_FLAGS_SMALL=""
64883   for f in $JAVA_FLAGS_SMALL; do
64884     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64885   done
64886 
64887 
64888 
64889 # Setup smart javac (after cores and memory have been setup)
64890 
64891 
64892 # Check whether --with-sjavac-server-java was given.
64893 if test "${with_sjavac_server_java+set}" = set; then :
64894   withval=$with_sjavac_server_java;
64895 fi
64896 
64897 
64898   if test "x$with_sjavac_server_java" != x; then
64899     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64900     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64901     if test "x$FOUND_VERSION" = x; then
64902       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64903     fi
64904   else
64905     SJAVAC_SERVER_JAVA="$JAVA"
64906   fi
64907 
64908 
64909   if test "$MEMORY_SIZE" -gt "3000"; then
64910 
64911   $ECHO "Check if jvm arg is ok: -d64" >&5
64912   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64913   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64914   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64915   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64916   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64917     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64918     JVM_ARG_OK=true
64919   else
64920     $ECHO "Arg failed:" >&5
64921     $ECHO "$OUTPUT" >&5
64922     JVM_ARG_OK=false
64923   fi
64924 
64925     if test "$JVM_ARG_OK" = true; then
64926       JVM_64BIT=true
64927       JVM_ARG_OK=false
64928     fi
64929   fi
64930 
64931   MX_VALUE=`expr $MEMORY_SIZE / 2`
64932   if test "$JVM_64BIT" = true; then
64933     # Set ms lower than mx since more than one instance of the server might
64934     # get launched at the same time before they figure out which instance won.
64935     MS_VALUE=512
64936     if test "$MX_VALUE" -gt "2048"; then
64937       MX_VALUE=2048
64938     fi
64939   else
64940     MS_VALUE=256
64941     if test "$MX_VALUE" -gt "1500"; then
64942       MX_VALUE=1500
64943     fi
64944   fi
64945   if test "$MX_VALUE" -lt "512"; then
64946     MX_VALUE=512
64947   fi
64948 
64949   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64950   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64951   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64952   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64953   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64954   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64955     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64956     JVM_ARG_OK=true
64957   else
64958     $ECHO "Arg failed:" >&5
64959     $ECHO "$OUTPUT" >&5
64960     JVM_ARG_OK=false
64961   fi
64962 
64963 
64964 
64965   # Check whether --enable-sjavac was given.
64966 if test "${enable_sjavac+set}" = set; then :
64967   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64968 else
64969   ENABLE_SJAVAC="no"
64970 fi
64971 
64972   if test "x$JVM_ARG_OK" = "xfalse"; then
64973     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64974 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64975     ENABLE_SJAVAC="no"
64976   fi
64977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64978 $as_echo_n "checking whether to use sjavac... " >&6; }
64979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64980 $as_echo "$ENABLE_SJAVAC" >&6; }
64981 
64982 
64983   # Check whether --enable-javac-server was given.
64984 if test "${enable_javac_server+set}" = set; then :
64985   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64986 else
64987   ENABLE_JAVAC_SERVER="yes"
64988 fi
64989 
64990   if test "x$JVM_ARG_OK" = "xfalse"; then
64991     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64992 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64993     ENABLE_JAVAC_SERVER="no"
64994   fi
64995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64996 $as_echo_n "checking whether to use javac server... " >&6; }
64997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64998 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64999 
65000 
65001   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65002     # When using a server javac, the small client instances do not need much
65003     # resources.
65004     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65005   fi
65006 
65007 
65008 # Setup use of icecc if requested
65009 
65010   # Check whether --enable-icecc was given.
65011 if test "${enable_icecc+set}" = set; then :
65012   enableval=$enable_icecc;
65013 fi
65014 
65015 
65016   if test "x${enable_icecc}" = "xyes"; then
65017 
65018 
65019 
65020   # Publish this variable in the help.
65021 
65022 
65023   if [ -z "${ICECC_CMD+x}" ]; then
65024     # The variable is not set by user, try to locate tool using the code snippet
65025     for ac_prog in icecc
65026 do
65027   # Extract the first word of "$ac_prog", so it can be a program name with args.
65028 set dummy $ac_prog; ac_word=$2
65029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65030 $as_echo_n "checking for $ac_word... " >&6; }
65031 if ${ac_cv_path_ICECC_CMD+:} false; then :
65032   $as_echo_n "(cached) " >&6
65033 else
65034   case $ICECC_CMD in
65035   [\\/]* | ?:[\\/]*)
65036   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65037   ;;
65038   *)
65039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65040 for as_dir in $PATH
65041 do
65042   IFS=$as_save_IFS
65043   test -z "$as_dir" && as_dir=.
65044     for ac_exec_ext in '' $ac_executable_extensions; do
65045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65046     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65048     break 2
65049   fi
65050 done
65051   done
65052 IFS=$as_save_IFS
65053 
65054   ;;
65055 esac
65056 fi
65057 ICECC_CMD=$ac_cv_path_ICECC_CMD
65058 if test -n "$ICECC_CMD"; then
65059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65060 $as_echo "$ICECC_CMD" >&6; }
65061 else
65062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65063 $as_echo "no" >&6; }
65064 fi
65065 
65066 
65067   test -n "$ICECC_CMD" && break
65068 done
65069 
65070   else
65071     # The variable is set, but is it from the command line or the environment?
65072 
65073     # Try to remove the string !ICECC_CMD! from our list.
65074     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65075     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65076       # If it failed, the variable was not from the command line. Ignore it,
65077       # but warn the user (except for BASH, which is always set by the calling BASH).
65078       if test "xICECC_CMD" != xBASH; then
65079         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65080 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65081       fi
65082       # Try to locate tool using the code snippet
65083       for ac_prog in icecc
65084 do
65085   # Extract the first word of "$ac_prog", so it can be a program name with args.
65086 set dummy $ac_prog; ac_word=$2
65087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65088 $as_echo_n "checking for $ac_word... " >&6; }
65089 if ${ac_cv_path_ICECC_CMD+:} false; then :
65090   $as_echo_n "(cached) " >&6
65091 else
65092   case $ICECC_CMD in
65093   [\\/]* | ?:[\\/]*)
65094   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65095   ;;
65096   *)
65097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65098 for as_dir in $PATH
65099 do
65100   IFS=$as_save_IFS
65101   test -z "$as_dir" && as_dir=.
65102     for ac_exec_ext in '' $ac_executable_extensions; do
65103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65104     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65106     break 2
65107   fi
65108 done
65109   done
65110 IFS=$as_save_IFS
65111 
65112   ;;
65113 esac
65114 fi
65115 ICECC_CMD=$ac_cv_path_ICECC_CMD
65116 if test -n "$ICECC_CMD"; then
65117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65118 $as_echo "$ICECC_CMD" >&6; }
65119 else
65120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65121 $as_echo "no" >&6; }
65122 fi
65123 
65124 
65125   test -n "$ICECC_CMD" && break
65126 done
65127 
65128     else
65129       # If it succeeded, then it was overridden by the user. We will use it
65130       # for the tool.
65131 
65132       # First remove it from the list of overridden variables, so we can test
65133       # for unknown variables in the end.
65134       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65135 
65136       # Check if we try to supply an empty value
65137       if test "x$ICECC_CMD" = x; then
65138         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65139 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65140         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65141 $as_echo_n "checking for ICECC_CMD... " >&6; }
65142         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65143 $as_echo "disabled" >&6; }
65144       else
65145         # Check if the provided tool contains a complete path.
65146         tool_specified="$ICECC_CMD"
65147         tool_basename="${tool_specified##*/}"
65148         if test "x$tool_basename" = "x$tool_specified"; then
65149           # A command without a complete path is provided, search $PATH.
65150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65151 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65152           # Extract the first word of "$tool_basename", so it can be a program name with args.
65153 set dummy $tool_basename; ac_word=$2
65154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65155 $as_echo_n "checking for $ac_word... " >&6; }
65156 if ${ac_cv_path_ICECC_CMD+:} false; then :
65157   $as_echo_n "(cached) " >&6
65158 else
65159   case $ICECC_CMD in
65160   [\\/]* | ?:[\\/]*)
65161   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65162   ;;
65163   *)
65164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65165 for as_dir in $PATH
65166 do
65167   IFS=$as_save_IFS
65168   test -z "$as_dir" && as_dir=.
65169     for ac_exec_ext in '' $ac_executable_extensions; do
65170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65171     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65173     break 2
65174   fi
65175 done
65176   done
65177 IFS=$as_save_IFS
65178 
65179   ;;
65180 esac
65181 fi
65182 ICECC_CMD=$ac_cv_path_ICECC_CMD
65183 if test -n "$ICECC_CMD"; then
65184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65185 $as_echo "$ICECC_CMD" >&6; }
65186 else
65187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65188 $as_echo "no" >&6; }
65189 fi
65190 
65191 
65192           if test "x$ICECC_CMD" = x; then
65193             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65194           fi
65195         else
65196           # Otherwise we believe it is a complete path. Use it as it is.
65197           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65198 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65199           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65200 $as_echo_n "checking for ICECC_CMD... " >&6; }
65201           if test ! -x "$tool_specified"; then
65202             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65203 $as_echo "not found" >&6; }
65204             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65205           fi
65206           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65207 $as_echo "$tool_specified" >&6; }
65208         fi
65209       fi
65210     fi
65211 
65212   fi
65213 
65214 
65215 
65216   if test "x$ICECC_CMD" = x; then
65217     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65218   fi
65219 
65220 
65221     old_path="$PATH"
65222 
65223     # Look for icecc-create-env in some known places
65224     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65225 
65226 
65227 
65228   # Publish this variable in the help.
65229 
65230 
65231   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65232     # The variable is not set by user, try to locate tool using the code snippet
65233     for ac_prog in icecc-create-env
65234 do
65235   # Extract the first word of "$ac_prog", so it can be a program name with args.
65236 set dummy $ac_prog; ac_word=$2
65237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65238 $as_echo_n "checking for $ac_word... " >&6; }
65239 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65240   $as_echo_n "(cached) " >&6
65241 else
65242   case $ICECC_CREATE_ENV in
65243   [\\/]* | ?:[\\/]*)
65244   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65245   ;;
65246   *)
65247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65248 for as_dir in $PATH
65249 do
65250   IFS=$as_save_IFS
65251   test -z "$as_dir" && as_dir=.
65252     for ac_exec_ext in '' $ac_executable_extensions; do
65253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65254     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65256     break 2
65257   fi
65258 done
65259   done
65260 IFS=$as_save_IFS
65261 
65262   ;;
65263 esac
65264 fi
65265 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65266 if test -n "$ICECC_CREATE_ENV"; then
65267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65268 $as_echo "$ICECC_CREATE_ENV" >&6; }
65269 else
65270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65271 $as_echo "no" >&6; }
65272 fi
65273 
65274 
65275   test -n "$ICECC_CREATE_ENV" && break
65276 done
65277 
65278   else
65279     # The variable is set, but is it from the command line or the environment?
65280 
65281     # Try to remove the string !ICECC_CREATE_ENV! from our list.
65282     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65283     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65284       # If it failed, the variable was not from the command line. Ignore it,
65285       # but warn the user (except for BASH, which is always set by the calling BASH).
65286       if test "xICECC_CREATE_ENV" != xBASH; then
65287         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65288 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65289       fi
65290       # Try to locate tool using the code snippet
65291       for ac_prog in icecc-create-env
65292 do
65293   # Extract the first word of "$ac_prog", so it can be a program name with args.
65294 set dummy $ac_prog; ac_word=$2
65295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65296 $as_echo_n "checking for $ac_word... " >&6; }
65297 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65298   $as_echo_n "(cached) " >&6
65299 else
65300   case $ICECC_CREATE_ENV in
65301   [\\/]* | ?:[\\/]*)
65302   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65303   ;;
65304   *)
65305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65306 for as_dir in $PATH
65307 do
65308   IFS=$as_save_IFS
65309   test -z "$as_dir" && as_dir=.
65310     for ac_exec_ext in '' $ac_executable_extensions; do
65311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65312     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65314     break 2
65315   fi
65316 done
65317   done
65318 IFS=$as_save_IFS
65319 
65320   ;;
65321 esac
65322 fi
65323 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65324 if test -n "$ICECC_CREATE_ENV"; then
65325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65326 $as_echo "$ICECC_CREATE_ENV" >&6; }
65327 else
65328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65329 $as_echo "no" >&6; }
65330 fi
65331 
65332 
65333   test -n "$ICECC_CREATE_ENV" && break
65334 done
65335 
65336     else
65337       # If it succeeded, then it was overridden by the user. We will use it
65338       # for the tool.
65339 
65340       # First remove it from the list of overridden variables, so we can test
65341       # for unknown variables in the end.
65342       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65343 
65344       # Check if we try to supply an empty value
65345       if test "x$ICECC_CREATE_ENV" = x; then
65346         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65347 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65349 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65350         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65351 $as_echo "disabled" >&6; }
65352       else
65353         # Check if the provided tool contains a complete path.
65354         tool_specified="$ICECC_CREATE_ENV"
65355         tool_basename="${tool_specified##*/}"
65356         if test "x$tool_basename" = "x$tool_specified"; then
65357           # A command without a complete path is provided, search $PATH.
65358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65359 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65360           # Extract the first word of "$tool_basename", so it can be a program name with args.
65361 set dummy $tool_basename; ac_word=$2
65362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65363 $as_echo_n "checking for $ac_word... " >&6; }
65364 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65365   $as_echo_n "(cached) " >&6
65366 else
65367   case $ICECC_CREATE_ENV in
65368   [\\/]* | ?:[\\/]*)
65369   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65370   ;;
65371   *)
65372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65373 for as_dir in $PATH
65374 do
65375   IFS=$as_save_IFS
65376   test -z "$as_dir" && as_dir=.
65377     for ac_exec_ext in '' $ac_executable_extensions; do
65378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65379     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65381     break 2
65382   fi
65383 done
65384   done
65385 IFS=$as_save_IFS
65386 
65387   ;;
65388 esac
65389 fi
65390 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65391 if test -n "$ICECC_CREATE_ENV"; then
65392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65393 $as_echo "$ICECC_CREATE_ENV" >&6; }
65394 else
65395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65396 $as_echo "no" >&6; }
65397 fi
65398 
65399 
65400           if test "x$ICECC_CREATE_ENV" = x; then
65401             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65402           fi
65403         else
65404           # Otherwise we believe it is a complete path. Use it as it is.
65405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65406 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65407           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65408 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65409           if test ! -x "$tool_specified"; then
65410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65411 $as_echo "not found" >&6; }
65412             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65413           fi
65414           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65415 $as_echo "$tool_specified" >&6; }
65416         fi
65417       fi
65418     fi
65419 
65420   fi
65421 
65422 
65423 
65424   if test "x$ICECC_CREATE_ENV" = x; then
65425     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65426   fi
65427 
65428 
65429     # Use icecc-create-env to create a minimal compilation environment that can
65430     # be sent to the other hosts in the icecream cluster.
65431     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65432     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65433     # Older versions of icecc does not have the --gcc parameter
65434     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65435       icecc_gcc_arg="--gcc"
65436     fi
65437     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65438 
65439   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65440       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65441           ${icecc_create_env_log} 2>&1 )
65442   if test "$?" != "0"; then
65443     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65444 $as_echo "$as_me: icecc-create-env output:" >&6;}
65445     cat \
65446           ${icecc_create_env_log}
65447     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65448   fi
65449 
65450     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65451       # For clang, the icecc compilerwrapper is needed. It usually resides next
65452       # to icecc-create-env.
65453 
65454 
65455 
65456   # Publish this variable in the help.
65457 
65458 
65459   if [ -z "${ICECC_WRAPPER+x}" ]; then
65460     # The variable is not set by user, try to locate tool using the code snippet
65461     for ac_prog in compilerwrapper
65462 do
65463   # Extract the first word of "$ac_prog", so it can be a program name with args.
65464 set dummy $ac_prog; ac_word=$2
65465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65466 $as_echo_n "checking for $ac_word... " >&6; }
65467 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65468   $as_echo_n "(cached) " >&6
65469 else
65470   case $ICECC_WRAPPER in
65471   [\\/]* | ?:[\\/]*)
65472   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65473   ;;
65474   *)
65475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65476 for as_dir in $PATH
65477 do
65478   IFS=$as_save_IFS
65479   test -z "$as_dir" && as_dir=.
65480     for ac_exec_ext in '' $ac_executable_extensions; do
65481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65482     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65484     break 2
65485   fi
65486 done
65487   done
65488 IFS=$as_save_IFS
65489 
65490   ;;
65491 esac
65492 fi
65493 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65494 if test -n "$ICECC_WRAPPER"; then
65495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65496 $as_echo "$ICECC_WRAPPER" >&6; }
65497 else
65498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65499 $as_echo "no" >&6; }
65500 fi
65501 
65502 
65503   test -n "$ICECC_WRAPPER" && break
65504 done
65505 
65506   else
65507     # The variable is set, but is it from the command line or the environment?
65508 
65509     # Try to remove the string !ICECC_WRAPPER! from our list.
65510     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65511     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65512       # If it failed, the variable was not from the command line. Ignore it,
65513       # but warn the user (except for BASH, which is always set by the calling BASH).
65514       if test "xICECC_WRAPPER" != xBASH; then
65515         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65516 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65517       fi
65518       # Try to locate tool using the code snippet
65519       for ac_prog in compilerwrapper
65520 do
65521   # Extract the first word of "$ac_prog", so it can be a program name with args.
65522 set dummy $ac_prog; ac_word=$2
65523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65524 $as_echo_n "checking for $ac_word... " >&6; }
65525 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65526   $as_echo_n "(cached) " >&6
65527 else
65528   case $ICECC_WRAPPER in
65529   [\\/]* | ?:[\\/]*)
65530   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65531   ;;
65532   *)
65533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65534 for as_dir in $PATH
65535 do
65536   IFS=$as_save_IFS
65537   test -z "$as_dir" && as_dir=.
65538     for ac_exec_ext in '' $ac_executable_extensions; do
65539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65540     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65542     break 2
65543   fi
65544 done
65545   done
65546 IFS=$as_save_IFS
65547 
65548   ;;
65549 esac
65550 fi
65551 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65552 if test -n "$ICECC_WRAPPER"; then
65553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65554 $as_echo "$ICECC_WRAPPER" >&6; }
65555 else
65556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65557 $as_echo "no" >&6; }
65558 fi
65559 
65560 
65561   test -n "$ICECC_WRAPPER" && break
65562 done
65563 
65564     else
65565       # If it succeeded, then it was overridden by the user. We will use it
65566       # for the tool.
65567 
65568       # First remove it from the list of overridden variables, so we can test
65569       # for unknown variables in the end.
65570       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65571 
65572       # Check if we try to supply an empty value
65573       if test "x$ICECC_WRAPPER" = x; then
65574         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65575 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65577 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65579 $as_echo "disabled" >&6; }
65580       else
65581         # Check if the provided tool contains a complete path.
65582         tool_specified="$ICECC_WRAPPER"
65583         tool_basename="${tool_specified##*/}"
65584         if test "x$tool_basename" = "x$tool_specified"; then
65585           # A command without a complete path is provided, search $PATH.
65586           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65587 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65588           # Extract the first word of "$tool_basename", so it can be a program name with args.
65589 set dummy $tool_basename; ac_word=$2
65590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65591 $as_echo_n "checking for $ac_word... " >&6; }
65592 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65593   $as_echo_n "(cached) " >&6
65594 else
65595   case $ICECC_WRAPPER in
65596   [\\/]* | ?:[\\/]*)
65597   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65598   ;;
65599   *)
65600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65601 for as_dir in $PATH
65602 do
65603   IFS=$as_save_IFS
65604   test -z "$as_dir" && as_dir=.
65605     for ac_exec_ext in '' $ac_executable_extensions; do
65606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65607     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65609     break 2
65610   fi
65611 done
65612   done
65613 IFS=$as_save_IFS
65614 
65615   ;;
65616 esac
65617 fi
65618 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65619 if test -n "$ICECC_WRAPPER"; then
65620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65621 $as_echo "$ICECC_WRAPPER" >&6; }
65622 else
65623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65624 $as_echo "no" >&6; }
65625 fi
65626 
65627 
65628           if test "x$ICECC_WRAPPER" = x; then
65629             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65630           fi
65631         else
65632           # Otherwise we believe it is a complete path. Use it as it is.
65633           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65634 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65635           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65636 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65637           if test ! -x "$tool_specified"; then
65638             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65639 $as_echo "not found" >&6; }
65640             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65641           fi
65642           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65643 $as_echo "$tool_specified" >&6; }
65644         fi
65645       fi
65646     fi
65647 
65648   fi
65649 
65650 
65651 
65652   if test "x$ICECC_WRAPPER" = x; then
65653     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65654   fi
65655 
65656 
65657 
65658   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65659       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65660   if test "$?" != "0"; then
65661     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65662 $as_echo "$as_me: icecc-create-env output:" >&6;}
65663     cat ${icecc_create_env_log}
65664     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65665   fi
65666 
65667     else
65668       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65669     fi
65670     PATH="$old_path"
65671     # The bundle with the compiler gets a name based on checksums. Parse log file
65672     # to find it.
65673     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65674     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65675     if test ! -f ${ICECC_ENV_BUNDLE}; then
65676       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65677     fi
65678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65679 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65680     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65681 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65682     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65683 
65684     if test "x${COMPILE_TYPE}" = "xcross"; then
65685       # If cross compiling, create a separate env package for the build compiler
65686       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65687       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65688       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65689 
65690   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65691       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65692             ${icecc_create_env_log_build} 2>&1 )
65693   if test "$?" != "0"; then
65694     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65695 $as_echo "$as_me: icecc-create-env output:" >&6;}
65696     cat \
65697             ${icecc_create_env_log_build}
65698     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65699   fi
65700 
65701       elif test "x${BUILD_CC##*/}" = "xclang"; then
65702 
65703   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65704       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65705   if test "$?" != "0"; then
65706     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65707 $as_echo "$as_me: icecc-create-env output:" >&6;}
65708     cat ${icecc_create_env_log_build}
65709     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65710   fi
65711 
65712       else
65713         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65714       fi
65715       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65716       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65717       if test ! -f ${ICECC_ENV_BUNDLE}; then
65718         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65719       fi
65720       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65721 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65723 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65724       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65725           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65726     else
65727       BUILD_ICECC="${ICECC}"
65728     fi
65729 
65730 
65731   fi
65732 
65733 
65734 # Can the C/C++ compiler use precompiled headers?
65735 
65736 
65737   ###############################################################################
65738   #
65739   # Can the C/C++ compiler use precompiled headers?
65740   #
65741   # Check whether --enable-precompiled-headers was given.
65742 if test "${enable_precompiled_headers+set}" = set; then :
65743   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65744 else
65745   ENABLE_PRECOMPH=yes
65746 fi
65747 
65748 
65749   USE_PRECOMPILED_HEADER=1
65750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65751 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65752   if test "x$ENABLE_PRECOMPH" = xno; then
65753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65754 $as_echo "no, forced" >&6; }
65755     USE_PRECOMPILED_HEADER=0
65756   elif test "x$ICECC" != "x"; then
65757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65758 $as_echo "no, does not work effectively with icecc" >&6; }
65759     USE_PRECOMPILED_HEADER=0
65760   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65761     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65762 $as_echo "no, does not work with Solaris Studio" >&6; }
65763     USE_PRECOMPILED_HEADER=0
65764   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65766 $as_echo "no, does not work with xlc" >&6; }
65767     USE_PRECOMPILED_HEADER=0
65768   else
65769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65770 $as_echo "yes" >&6; }
65771   fi
65772 
65773   if test "x$ENABLE_PRECOMPH" = xyes; then
65774     # Check that the compiler actually supports precomp headers.
65775     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65777 $as_echo_n "checking that precompiled headers work... " >&6; }
65778       echo "int alfa();" > conftest.h
65779       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65780       if test ! -f conftest.hpp.gch; then
65781         USE_PRECOMPILED_HEADER=0
65782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65783 $as_echo "no" >&6; }
65784       else
65785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65786 $as_echo "yes" >&6; }
65787       fi
65788       $RM conftest.h conftest.hpp.gch
65789     fi
65790   fi
65791 
65792 
65793 
65794 
65795 # Setup use of ccache, if available
65796 
65797   # Check whether --enable-ccache was given.
65798 if test "${enable_ccache+set}" = set; then :
65799   enableval=$enable_ccache;
65800 fi
65801 
65802 
65803   CCACHE_STATUS=
65804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65805 $as_echo_n "checking is ccache enabled... " >&6; }
65806   if test "x$enable_ccache" = xyes; then
65807     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65809 $as_echo "yes" >&6; }
65810       OLD_PATH="$PATH"
65811       if test "x$TOOLCHAIN_PATH" != x; then
65812         PATH=$TOOLCHAIN_PATH:$PATH
65813       fi
65814 
65815 
65816 
65817   # Publish this variable in the help.
65818 
65819 
65820   if [ -z "${CCACHE+x}" ]; then
65821     # The variable is not set by user, try to locate tool using the code snippet
65822     for ac_prog in ccache
65823 do
65824   # Extract the first word of "$ac_prog", so it can be a program name with args.
65825 set dummy $ac_prog; ac_word=$2
65826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65827 $as_echo_n "checking for $ac_word... " >&6; }
65828 if ${ac_cv_path_CCACHE+:} false; then :
65829   $as_echo_n "(cached) " >&6
65830 else
65831   case $CCACHE in
65832   [\\/]* | ?:[\\/]*)
65833   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65834   ;;
65835   *)
65836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65837 for as_dir in $PATH
65838 do
65839   IFS=$as_save_IFS
65840   test -z "$as_dir" && as_dir=.
65841     for ac_exec_ext in '' $ac_executable_extensions; do
65842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65843     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65845     break 2
65846   fi
65847 done
65848   done
65849 IFS=$as_save_IFS
65850 
65851   ;;
65852 esac
65853 fi
65854 CCACHE=$ac_cv_path_CCACHE
65855 if test -n "$CCACHE"; then
65856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65857 $as_echo "$CCACHE" >&6; }
65858 else
65859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65860 $as_echo "no" >&6; }
65861 fi
65862 
65863 
65864   test -n "$CCACHE" && break
65865 done
65866 
65867   else
65868     # The variable is set, but is it from the command line or the environment?
65869 
65870     # Try to remove the string !CCACHE! from our list.
65871     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65872     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65873       # If it failed, the variable was not from the command line. Ignore it,
65874       # but warn the user (except for BASH, which is always set by the calling BASH).
65875       if test "xCCACHE" != xBASH; then
65876         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65877 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65878       fi
65879       # Try to locate tool using the code snippet
65880       for ac_prog in ccache
65881 do
65882   # Extract the first word of "$ac_prog", so it can be a program name with args.
65883 set dummy $ac_prog; ac_word=$2
65884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65885 $as_echo_n "checking for $ac_word... " >&6; }
65886 if ${ac_cv_path_CCACHE+:} false; then :
65887   $as_echo_n "(cached) " >&6
65888 else
65889   case $CCACHE in
65890   [\\/]* | ?:[\\/]*)
65891   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65892   ;;
65893   *)
65894   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65895 for as_dir in $PATH
65896 do
65897   IFS=$as_save_IFS
65898   test -z "$as_dir" && as_dir=.
65899     for ac_exec_ext in '' $ac_executable_extensions; do
65900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65901     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65903     break 2
65904   fi
65905 done
65906   done
65907 IFS=$as_save_IFS
65908 
65909   ;;
65910 esac
65911 fi
65912 CCACHE=$ac_cv_path_CCACHE
65913 if test -n "$CCACHE"; then
65914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65915 $as_echo "$CCACHE" >&6; }
65916 else
65917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65918 $as_echo "no" >&6; }
65919 fi
65920 
65921 
65922   test -n "$CCACHE" && break
65923 done
65924 
65925     else
65926       # If it succeeded, then it was overridden by the user. We will use it
65927       # for the tool.
65928 
65929       # First remove it from the list of overridden variables, so we can test
65930       # for unknown variables in the end.
65931       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65932 
65933       # Check if we try to supply an empty value
65934       if test "x$CCACHE" = x; then
65935         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65936 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65937         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65938 $as_echo_n "checking for CCACHE... " >&6; }
65939         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65940 $as_echo "disabled" >&6; }
65941       else
65942         # Check if the provided tool contains a complete path.
65943         tool_specified="$CCACHE"
65944         tool_basename="${tool_specified##*/}"
65945         if test "x$tool_basename" = "x$tool_specified"; then
65946           # A command without a complete path is provided, search $PATH.
65947           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65948 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65949           # Extract the first word of "$tool_basename", so it can be a program name with args.
65950 set dummy $tool_basename; ac_word=$2
65951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65952 $as_echo_n "checking for $ac_word... " >&6; }
65953 if ${ac_cv_path_CCACHE+:} false; then :
65954   $as_echo_n "(cached) " >&6
65955 else
65956   case $CCACHE in
65957   [\\/]* | ?:[\\/]*)
65958   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65959   ;;
65960   *)
65961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65962 for as_dir in $PATH
65963 do
65964   IFS=$as_save_IFS
65965   test -z "$as_dir" && as_dir=.
65966     for ac_exec_ext in '' $ac_executable_extensions; do
65967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65968     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65970     break 2
65971   fi
65972 done
65973   done
65974 IFS=$as_save_IFS
65975 
65976   ;;
65977 esac
65978 fi
65979 CCACHE=$ac_cv_path_CCACHE
65980 if test -n "$CCACHE"; then
65981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65982 $as_echo "$CCACHE" >&6; }
65983 else
65984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65985 $as_echo "no" >&6; }
65986 fi
65987 
65988 
65989           if test "x$CCACHE" = x; then
65990             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65991           fi
65992         else
65993           # Otherwise we believe it is a complete path. Use it as it is.
65994           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65995 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65996           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65997 $as_echo_n "checking for CCACHE... " >&6; }
65998           if test ! -x "$tool_specified"; then
65999             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66000 $as_echo "not found" >&6; }
66001             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66002           fi
66003           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66004 $as_echo "$tool_specified" >&6; }
66005         fi
66006       fi
66007     fi
66008 
66009   fi
66010 
66011 
66012 
66013   if test "x$CCACHE" = x; then
66014     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66015   fi
66016 
66017 
66018       PATH="$OLD_PATH"
66019       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66020       CCACHE_STATUS="Active ($CCACHE_VERSION)"
66021     else
66022       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66023 $as_echo "no" >&6; }
66024       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66025 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66026     fi
66027   elif test "x$enable_ccache" = xno; then
66028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66029 $as_echo "no, explicitly disabled" >&6; }
66030     CCACHE_STATUS="Disabled"
66031   elif test "x$enable_ccache" = x; then
66032     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66033 $as_echo "no" >&6; }
66034   else
66035     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66036 $as_echo "unknown" >&6; }
66037     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66038   fi
66039 
66040 
66041 
66042 # Check whether --with-ccache-dir was given.
66043 if test "${with_ccache_dir+set}" = set; then :
66044   withval=$with_ccache_dir;
66045 fi
66046 
66047 
66048   if test "x$with_ccache_dir" != x; then
66049     # When using a non home ccache directory, assume the use is to share ccache files
66050     # with other users. Thus change the umask.
66051     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66052     if test "x$CCACHE" = x; then
66053       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66054 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66055     fi
66056   fi
66057 
66058   if test "x$CCACHE" != x; then
66059 
66060   if test "x$CCACHE" != x; then
66061     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66062       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66063           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66064       if test "x$HAS_BAD_CCACHE" != "x"; then
66065         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66066       fi
66067     fi
66068     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66069       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66070           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66071       if test "x$HAS_BAD_CCACHE" != "x"; then
66072         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66073       fi
66074       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66075 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66076       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66077       PUSHED_FLAGS="$CXXFLAGS"
66078       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66079       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66080 /* end confdefs.h.  */
66081 
66082 int
66083 main ()
66084 {
66085 
66086   ;
66087   return 0;
66088 }
66089 _ACEOF
66090 if ac_fn_cxx_try_compile "$LINENO"; then :
66091   CC_KNOWS_CCACHE_TRICK=yes
66092 else
66093   CC_KNOWS_CCACHE_TRICK=no
66094 fi
66095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66096       CXXFLAGS="$PUSHED_FLAGS"
66097       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66099 $as_echo "yes" >&6; }
66100         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66101 
66102         CCACHE_SLOPPINESS=pch_defines,time_macros
66103       else
66104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66105 $as_echo "no" >&6; }
66106         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66107       fi
66108     fi
66109 
66110     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66111         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66112 
66113     if test "x$SET_CCACHE_DIR" != x; then
66114       mkdir -p $CCACHE_DIR > /dev/null 2>&1
66115       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66116     fi
66117   fi
66118 
66119   fi
66120 
66121 
66122 ###############################################################################
66123 #
66124 # And now the finish...
66125 #
66126 ###############################################################################
66127 
66128 # Check for some common pitfalls
66129 
66130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66131     file_to_test="$SRC_ROOT/LICENSE"
66132     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66133       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
66134     fi
66135   fi
66136 
66137 
66138   # Did user specify any unknown variables?
66139 
66140   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66141     # Replace the separating ! with spaces before presenting for end user.
66142     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66143     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66144 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66145   fi
66146 
66147 
66148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66149 $as_echo_n "checking if build directory is on local disk... " >&6; }
66150 
66151   # df -l lists only local disks; if the given directory is not found then
66152   # a non-zero exit code is given
66153   if test "x$DF" = x; then
66154     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66155       # msys does not have df; use Windows "net use" instead.
66156       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66157       if test "x$IS_NETWORK_DISK" = x; then
66158         OUTPUT_DIR_IS_LOCAL="yes"
66159       else
66160         OUTPUT_DIR_IS_LOCAL="no"
66161       fi
66162     else
66163       # No df here, say it's local
66164       OUTPUT_DIR_IS_LOCAL="yes"
66165     fi
66166   else
66167     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66168       OUTPUT_DIR_IS_LOCAL="yes"
66169     else
66170       OUTPUT_DIR_IS_LOCAL="no"
66171     fi
66172   fi
66173 
66174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66175 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66176 
66177 
66178 
66179   # Check if the user has any old-style ALT_ variables set.
66180   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66181 
66182   # Before generating output files, test if they exist. If they do, this is a reconfigure.
66183   # Since we can't properly handle the dependencies for this, warn the user about the situation
66184   if test -e $OUTPUT_ROOT/spec.gmk; then
66185     IS_RECONFIGURE=yes
66186   else
66187     IS_RECONFIGURE=no
66188   fi
66189 
66190 
66191 # At the end, call the custom hook. (Dummy macro if no custom sources available)
66192 
66193 
66194 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66195 
66196   # Keep feature lists sorted and free of duplicates
66197   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66198   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66199   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66200   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66201   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66202   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66203   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66204 
66205   # Validate features
66206   for variant in $JVM_VARIANTS; do
66207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66208 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66209     features_var_name=JVM_FEATURES_$variant
66210     JVM_FEATURES_TO_TEST=${!features_var_name}
66211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66212 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66213     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66214     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66215     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66216     if test "x$INVALID_FEATURES" != x; then
66217       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66218     fi
66219   done
66220 
66221 
66222 # We're messing a bit with internal autoconf variables to put the config.status
66223 # in the output directory instead of the current directory.
66224 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66225 
66226 # Create the actual output files. Now the main work of configure is done.
66227 cat >confcache <<\_ACEOF
66228 # This file is a shell script that caches the results of configure
66229 # tests run on this system so they can be shared between configure
66230 # scripts and configure runs, see configure's option --config-cache.
66231 # It is not useful on other systems.  If it contains results you don't
66232 # want to keep, you may remove or edit it.
66233 #
66234 # config.status only pays attention to the cache file if you give it
66235 # the --recheck option to rerun configure.
66236 #
66237 # `ac_cv_env_foo' variables (set or unset) will be overridden when
66238 # loading this file, other *unset* `ac_cv_foo' will be assigned the
66239 # following values.
66240 
66241 _ACEOF
66242 
66243 # The following way of writing the cache mishandles newlines in values,
66244 # but we know of no workaround that is simple, portable, and efficient.
66245 # So, we kill variables containing newlines.
66246 # Ultrix sh set writes to stderr and can't be redirected directly,
66247 # and sets the high bit in the cache file unless we assign to the vars.
66248 (
66249   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66250     eval ac_val=\$$ac_var
66251     case $ac_val in #(
66252     *${as_nl}*)
66253       case $ac_var in #(
66254       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66255 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66256       esac
66257       case $ac_var in #(
66258       _ | IFS | as_nl) ;; #(
66259       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66260       *) { eval $ac_var=; unset $ac_var;} ;;
66261       esac ;;
66262     esac
66263   done
66264 
66265   (set) 2>&1 |
66266     case $as_nl`(ac_space=' '; set) 2>&1` in #(
66267     *${as_nl}ac_space=\ *)
66268       # `set' does not quote correctly, so add quotes: double-quote
66269       # substitution turns \\\\ into \\, and sed turns \\ into \.
66270       sed -n \
66271         "s/'/'\\\\''/g;
66272           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66273       ;; #(
66274     *)
66275       # `set' quotes correctly as required by POSIX, so do not add quotes.
66276       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66277       ;;
66278     esac |
66279     sort
66280 ) |
66281   sed '
66282      /^ac_cv_env_/b end
66283      t clear
66284      :clear
66285      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66286      t end
66287      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66288      :end' >>confcache
66289 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66290   if test -w "$cache_file"; then
66291     if test "x$cache_file" != "x/dev/null"; then
66292       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66293 $as_echo "$as_me: updating cache $cache_file" >&6;}
66294       if test ! -f "$cache_file" || test -h "$cache_file"; then
66295         cat confcache >"$cache_file"
66296       else
66297         case $cache_file in #(
66298         */* | ?:*)
66299           mv -f confcache "$cache_file"$$ &&
66300           mv -f "$cache_file"$$ "$cache_file" ;; #(
66301         *)
66302           mv -f confcache "$cache_file" ;;
66303         esac
66304       fi
66305     fi
66306   else
66307     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66308 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66309   fi
66310 fi
66311 rm -f confcache
66312 
66313 test "x$prefix" = xNONE && prefix=$ac_default_prefix
66314 # Let make expand exec_prefix.
66315 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66316 
66317 # Transform confdefs.h into DEFS.
66318 # Protect against shell expansion while executing Makefile rules.
66319 # Protect against Makefile macro expansion.
66320 #
66321 # If the first sed substitution is executed (which looks for macros that
66322 # take arguments), then branch to the quote section.  Otherwise,
66323 # look for a macro that doesn't take arguments.
66324 ac_script='
66325 :mline
66326 /\\$/{
66327  N
66328  s,\\\n,,
66329  b mline
66330 }
66331 t clear
66332 :clear
66333 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
66334 t quote
66335 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
66336 t quote
66337 b any
66338 :quote
66339 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66340 s/\[/\\&/g
66341 s/\]/\\&/g
66342 s/\$/$$/g
66343 H
66344 :any
66345 ${
66346         g
66347         s/^\n//
66348         s/\n/ /g
66349         p
66350 }
66351 '
66352 DEFS=`sed -n "$ac_script" confdefs.h`
66353 
66354 
66355 ac_libobjs=
66356 ac_ltlibobjs=
66357 U=
66358 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66359   # 1. Remove the extension, and $U if already installed.
66360   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66361   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66362   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66363   #    will be set to the directory where LIBOBJS objects are built.
66364   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66365   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66366 done
66367 LIBOBJS=$ac_libobjs
66368 
66369 LTLIBOBJS=$ac_ltlibobjs
66370 
66371 
66372 
66373 : "${CONFIG_STATUS=./config.status}"
66374 ac_write_fail=0
66375 ac_clean_files_save=$ac_clean_files
66376 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66377 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66378 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66379 as_write_fail=0
66380 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66381 #! $SHELL
66382 # Generated by $as_me.
66383 # Run this file to recreate the current configuration.
66384 # Compiler output produced by configure, useful for debugging
66385 # configure, is in config.log if it exists.
66386 
66387 debug=false
66388 ac_cs_recheck=false
66389 ac_cs_silent=false
66390 
66391 SHELL=\${CONFIG_SHELL-$SHELL}
66392 export SHELL
66393 _ASEOF
66394 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66395 ## -------------------- ##
66396 ## M4sh Initialization. ##
66397 ## -------------------- ##
66398 
66399 # Be more Bourne compatible
66400 DUALCASE=1; export DUALCASE # for MKS sh
66401 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66402   emulate sh
66403   NULLCMD=:
66404   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66405   # is contrary to our usage.  Disable this feature.
66406   alias -g '${1+"$@"}'='"$@"'
66407   setopt NO_GLOB_SUBST
66408 else
66409   case `(set -o) 2>/dev/null` in #(
66410   *posix*) :
66411     set -o posix ;; #(
66412   *) :
66413      ;;
66414 esac
66415 fi
66416 
66417 
66418 as_nl='
66419 '
66420 export as_nl
66421 # Printing a long string crashes Solaris 7 /usr/bin/printf.
66422 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66423 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66424 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66425 # Prefer a ksh shell builtin over an external printf program on Solaris,
66426 # but without wasting forks for bash or zsh.
66427 if test -z "$BASH_VERSION$ZSH_VERSION" \
66428     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66429   as_echo='print -r --'
66430   as_echo_n='print -rn --'
66431 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66432   as_echo='printf %s\n'
66433   as_echo_n='printf %s'
66434 else
66435   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66436     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66437     as_echo_n='/usr/ucb/echo -n'
66438   else
66439     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66440     as_echo_n_body='eval
66441       arg=$1;
66442       case $arg in #(
66443       *"$as_nl"*)
66444         expr "X$arg" : "X\\(.*\\)$as_nl";
66445         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66446       esac;
66447       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66448     '
66449     export as_echo_n_body
66450     as_echo_n='sh -c $as_echo_n_body as_echo'
66451   fi
66452   export as_echo_body
66453   as_echo='sh -c $as_echo_body as_echo'
66454 fi
66455 
66456 # The user is always right.
66457 if test "${PATH_SEPARATOR+set}" != set; then
66458   PATH_SEPARATOR=:
66459   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66460     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66461       PATH_SEPARATOR=';'
66462   }
66463 fi
66464 
66465 
66466 # IFS
66467 # We need space, tab and new line, in precisely that order.  Quoting is
66468 # there to prevent editors from complaining about space-tab.
66469 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66470 # splitting by setting IFS to empty value.)
66471 IFS=" ""        $as_nl"
66472 
66473 # Find who we are.  Look in the path if we contain no directory separator.
66474 as_myself=
66475 case $0 in #((
66476   *[\\/]* ) as_myself=$0 ;;
66477   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66478 for as_dir in $PATH
66479 do
66480   IFS=$as_save_IFS
66481   test -z "$as_dir" && as_dir=.
66482     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66483   done
66484 IFS=$as_save_IFS
66485 
66486      ;;
66487 esac
66488 # We did not find ourselves, most probably we were run as `sh COMMAND'
66489 # in which case we are not to be found in the path.
66490 if test "x$as_myself" = x; then
66491   as_myself=$0
66492 fi
66493 if test ! -f "$as_myself"; then
66494   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66495   exit 1
66496 fi
66497 
66498 # Unset variables that we do not need and which cause bugs (e.g. in
66499 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66500 # suppresses any "Segmentation fault" message there.  '((' could
66501 # trigger a bug in pdksh 5.2.14.
66502 for as_var in BASH_ENV ENV MAIL MAILPATH
66503 do eval test x\${$as_var+set} = xset \
66504   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66505 done
66506 PS1='$ '
66507 PS2='> '
66508 PS4='+ '
66509 
66510 # NLS nuisances.
66511 LC_ALL=C
66512 export LC_ALL
66513 LANGUAGE=C
66514 export LANGUAGE
66515 
66516 # CDPATH.
66517 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66518 
66519 
66520 # as_fn_error STATUS ERROR [LINENO LOG_FD]
66521 # ----------------------------------------
66522 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66523 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66524 # script with STATUS, using 1 if that was 0.
66525 as_fn_error ()
66526 {
66527   as_status=$1; test $as_status -eq 0 && as_status=1
66528   if test "$4"; then
66529     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66530     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66531   fi
66532   $as_echo "$as_me: error: $2" >&2
66533   as_fn_exit $as_status
66534 } # as_fn_error
66535 
66536 
66537 # as_fn_set_status STATUS
66538 # -----------------------
66539 # Set $? to STATUS, without forking.
66540 as_fn_set_status ()
66541 {
66542   return $1
66543 } # as_fn_set_status
66544 
66545 # as_fn_exit STATUS
66546 # -----------------
66547 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66548 as_fn_exit ()
66549 {
66550   set +e
66551   as_fn_set_status $1
66552   exit $1
66553 } # as_fn_exit
66554 
66555 # as_fn_unset VAR
66556 # ---------------
66557 # Portably unset VAR.
66558 as_fn_unset ()
66559 {
66560   { eval $1=; unset $1;}
66561 }
66562 as_unset=as_fn_unset
66563 # as_fn_append VAR VALUE
66564 # ----------------------
66565 # Append the text in VALUE to the end of the definition contained in VAR. Take
66566 # advantage of any shell optimizations that allow amortized linear growth over
66567 # repeated appends, instead of the typical quadratic growth present in naive
66568 # implementations.
66569 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66570   eval 'as_fn_append ()
66571   {
66572     eval $1+=\$2
66573   }'
66574 else
66575   as_fn_append ()
66576   {
66577     eval $1=\$$1\$2
66578   }
66579 fi # as_fn_append
66580 
66581 # as_fn_arith ARG...
66582 # ------------------
66583 # Perform arithmetic evaluation on the ARGs, and store the result in the
66584 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66585 # must be portable across $(()) and expr.
66586 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66587   eval 'as_fn_arith ()
66588   {
66589     as_val=$(( $* ))
66590   }'
66591 else
66592   as_fn_arith ()
66593   {
66594     as_val=`expr "$@" || test $? -eq 1`
66595   }
66596 fi # as_fn_arith
66597 
66598 
66599 if expr a : '\(a\)' >/dev/null 2>&1 &&
66600    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66601   as_expr=expr
66602 else
66603   as_expr=false
66604 fi
66605 
66606 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66607   as_basename=basename
66608 else
66609   as_basename=false
66610 fi
66611 
66612 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66613   as_dirname=dirname
66614 else
66615   as_dirname=false
66616 fi
66617 
66618 as_me=`$as_basename -- "$0" ||
66619 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66620          X"$0" : 'X\(//\)$' \| \
66621          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66622 $as_echo X/"$0" |
66623     sed '/^.*\/\([^/][^/]*\)\/*$/{
66624             s//\1/
66625             q
66626           }
66627           /^X\/\(\/\/\)$/{
66628             s//\1/
66629             q
66630           }
66631           /^X\/\(\/\).*/{
66632             s//\1/
66633             q
66634           }
66635           s/.*/./; q'`
66636 
66637 # Avoid depending upon Character Ranges.
66638 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66639 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66640 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66641 as_cr_digits='0123456789'
66642 as_cr_alnum=$as_cr_Letters$as_cr_digits
66643 
66644 ECHO_C= ECHO_N= ECHO_T=
66645 case `echo -n x` in #(((((
66646 -n*)
66647   case `echo 'xy\c'` in
66648   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66649   xy)  ECHO_C='\c';;
66650   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66651        ECHO_T=' ';;
66652   esac;;
66653 *)
66654   ECHO_N='-n';;
66655 esac
66656 
66657 rm -f conf$$ conf$$.exe conf$$.file
66658 if test -d conf$$.dir; then
66659   rm -f conf$$.dir/conf$$.file
66660 else
66661   rm -f conf$$.dir
66662   mkdir conf$$.dir 2>/dev/null
66663 fi
66664 if (echo >conf$$.file) 2>/dev/null; then
66665   if ln -s conf$$.file conf$$ 2>/dev/null; then
66666     as_ln_s='ln -s'
66667     # ... but there are two gotchas:
66668     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66669     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66670     # In both cases, we have to default to `cp -pR'.
66671     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66672       as_ln_s='cp -pR'
66673   elif ln conf$$.file conf$$ 2>/dev/null; then
66674     as_ln_s=ln
66675   else
66676     as_ln_s='cp -pR'
66677   fi
66678 else
66679   as_ln_s='cp -pR'
66680 fi
66681 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66682 rmdir conf$$.dir 2>/dev/null
66683 
66684 
66685 # as_fn_mkdir_p
66686 # -------------
66687 # Create "$as_dir" as a directory, including parents if necessary.
66688 as_fn_mkdir_p ()
66689 {
66690 
66691   case $as_dir in #(
66692   -*) as_dir=./$as_dir;;
66693   esac
66694   test -d "$as_dir" || eval $as_mkdir_p || {
66695     as_dirs=
66696     while :; do
66697       case $as_dir in #(
66698       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66699       *) as_qdir=$as_dir;;
66700       esac
66701       as_dirs="'$as_qdir' $as_dirs"
66702       as_dir=`$as_dirname -- "$as_dir" ||
66703 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66704          X"$as_dir" : 'X\(//\)[^/]' \| \
66705          X"$as_dir" : 'X\(//\)$' \| \
66706          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66707 $as_echo X"$as_dir" |
66708     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66709             s//\1/
66710             q
66711           }
66712           /^X\(\/\/\)[^/].*/{
66713             s//\1/
66714             q
66715           }
66716           /^X\(\/\/\)$/{
66717             s//\1/
66718             q
66719           }
66720           /^X\(\/\).*/{
66721             s//\1/
66722             q
66723           }
66724           s/.*/./; q'`
66725       test -d "$as_dir" && break
66726     done
66727     test -z "$as_dirs" || eval "mkdir $as_dirs"
66728   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66729 
66730 
66731 } # as_fn_mkdir_p
66732 if mkdir -p . 2>/dev/null; then
66733   as_mkdir_p='mkdir -p "$as_dir"'
66734 else
66735   test -d ./-p && rmdir ./-p
66736   as_mkdir_p=false
66737 fi
66738 
66739 
66740 # as_fn_executable_p FILE
66741 # -----------------------
66742 # Test if FILE is an executable regular file.
66743 as_fn_executable_p ()
66744 {
66745   test -f "$1" && test -x "$1"
66746 } # as_fn_executable_p
66747 as_test_x='test -x'
66748 as_executable_p=as_fn_executable_p
66749 
66750 # Sed expression to map a string onto a valid CPP name.
66751 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66752 
66753 # Sed expression to map a string onto a valid variable name.
66754 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66755 
66756 
66757 exec 6>&1
66758 ## ----------------------------------- ##
66759 ## Main body of $CONFIG_STATUS script. ##
66760 ## ----------------------------------- ##
66761 _ASEOF
66762 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66763 
66764 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66765 # Save the log message, to keep $0 and so on meaningful, and to
66766 # report actual input values of CONFIG_FILES etc. instead of their
66767 # values after options handling.
66768 ac_log="
66769 This file was extended by OpenJDK $as_me jdk9, which was
66770 generated by GNU Autoconf 2.69.  Invocation command line was
66771 
66772   CONFIG_FILES    = $CONFIG_FILES
66773   CONFIG_HEADERS  = $CONFIG_HEADERS
66774   CONFIG_LINKS    = $CONFIG_LINKS
66775   CONFIG_COMMANDS = $CONFIG_COMMANDS
66776   $ $0 $@
66777 
66778 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66779 "
66780 
66781 _ACEOF
66782 
66783 case $ac_config_files in *"
66784 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66785 esac
66786 
66787 
66788 
66789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66790 # Files that config.status was made for.
66791 config_files="$ac_config_files"
66792 
66793 _ACEOF
66794 
66795 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66796 ac_cs_usage="\
66797 \`$as_me' instantiates files and other configuration actions
66798 from templates according to the current configuration.  Unless the files
66799 and actions are specified as TAGs, all are instantiated by default.
66800 
66801 Usage: $0 [OPTION]... [TAG]...
66802 
66803   -h, --help       print this help, then exit
66804   -V, --version    print version number and configuration settings, then exit
66805       --config     print configuration, then exit
66806   -q, --quiet, --silent
66807                    do not print progress messages
66808   -d, --debug      don't remove temporary files
66809       --recheck    update $as_me by reconfiguring in the same conditions
66810       --file=FILE[:TEMPLATE]
66811                    instantiate the configuration file FILE
66812 
66813 Configuration files:
66814 $config_files
66815 
66816 Report bugs to <build-dev@openjdk.java.net>.
66817 OpenJDK home page: <http://openjdk.java.net>."
66818 
66819 _ACEOF
66820 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66821 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66822 ac_cs_version="\\
66823 OpenJDK config.status jdk9
66824 configured by $0, generated by GNU Autoconf 2.69,
66825   with options \\"\$ac_cs_config\\"
66826 
66827 Copyright (C) 2012 Free Software Foundation, Inc.
66828 This config.status script is free software; the Free Software Foundation
66829 gives unlimited permission to copy, distribute and modify it."
66830 
66831 ac_pwd='$ac_pwd'
66832 srcdir='$srcdir'
66833 AWK='$AWK'
66834 test -n "\$AWK" || AWK=awk
66835 _ACEOF
66836 
66837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66838 # The default lists apply if the user does not specify any file.
66839 ac_need_defaults=:
66840 while test $# != 0
66841 do
66842   case $1 in
66843   --*=?*)
66844     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66845     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66846     ac_shift=:
66847     ;;
66848   --*=)
66849     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66850     ac_optarg=
66851     ac_shift=:
66852     ;;
66853   *)
66854     ac_option=$1
66855     ac_optarg=$2
66856     ac_shift=shift
66857     ;;
66858   esac
66859 
66860   case $ac_option in
66861   # Handling of the options.
66862   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66863     ac_cs_recheck=: ;;
66864   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66865     $as_echo "$ac_cs_version"; exit ;;
66866   --config | --confi | --conf | --con | --co | --c )
66867     $as_echo "$ac_cs_config"; exit ;;
66868   --debug | --debu | --deb | --de | --d | -d )
66869     debug=: ;;
66870   --file | --fil | --fi | --f )
66871     $ac_shift
66872     case $ac_optarg in
66873     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66874     '') as_fn_error $? "missing file argument" ;;
66875     esac
66876     as_fn_append CONFIG_FILES " '$ac_optarg'"
66877     ac_need_defaults=false;;
66878   --he | --h |  --help | --hel | -h )
66879     $as_echo "$ac_cs_usage"; exit ;;
66880   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66881   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66882     ac_cs_silent=: ;;
66883 
66884   # This is an error.
66885   -*) as_fn_error $? "unrecognized option: \`$1'
66886 Try \`$0 --help' for more information." ;;
66887 
66888   *) as_fn_append ac_config_targets " $1"
66889      ac_need_defaults=false ;;
66890 
66891   esac
66892   shift
66893 done
66894 
66895 ac_configure_extra_args=
66896 
66897 if $ac_cs_silent; then
66898   exec 6>/dev/null
66899   ac_configure_extra_args="$ac_configure_extra_args --silent"
66900 fi
66901 
66902 _ACEOF
66903 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66904 if \$ac_cs_recheck; then
66905   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66906   shift
66907   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66908   CONFIG_SHELL='$SHELL'
66909   export CONFIG_SHELL
66910   exec "\$@"
66911 fi
66912 
66913 _ACEOF
66914 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66915 exec 5>>config.log
66916 {
66917   echo
66918   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66919 ## Running $as_me. ##
66920 _ASBOX
66921   $as_echo "$ac_log"
66922 } >&5
66923 
66924 _ACEOF
66925 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66926 _ACEOF
66927 
66928 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66929 
66930 # Handling of arguments.
66931 for ac_config_target in $ac_config_targets
66932 do
66933   case $ac_config_target in
66934     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66935     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66936     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66937     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66938     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66939 
66940   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66941   esac
66942 done
66943 
66944 
66945 # If the user did not use the arguments to specify the items to instantiate,
66946 # then the envvar interface is used.  Set only those that are not.
66947 # We use the long form for the default assignment because of an extremely
66948 # bizarre bug on SunOS 4.1.3.
66949 if $ac_need_defaults; then
66950   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66951 fi
66952 
66953 # Have a temporary directory for convenience.  Make it in the build tree
66954 # simply because there is no reason against having it here, and in addition,
66955 # creating and moving files from /tmp can sometimes cause problems.
66956 # Hook for its removal unless debugging.
66957 # Note that there is a small window in which the directory will not be cleaned:
66958 # after its creation but before its name has been assigned to `$tmp'.
66959 $debug ||
66960 {
66961   tmp= ac_tmp=
66962   trap 'exit_status=$?
66963   : "${ac_tmp:=$tmp}"
66964   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66965 ' 0
66966   trap 'as_fn_exit 1' 1 2 13 15
66967 }
66968 # Create a (secure) tmp directory for tmp files.
66969 
66970 {
66971   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66972   test -d "$tmp"
66973 }  ||
66974 {
66975   tmp=./conf$$-$RANDOM
66976   (umask 077 && mkdir "$tmp")
66977 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66978 ac_tmp=$tmp
66979 
66980 # Set up the scripts for CONFIG_FILES section.
66981 # No need to generate them if there are no CONFIG_FILES.
66982 # This happens for instance with `./config.status config.h'.
66983 if test -n "$CONFIG_FILES"; then
66984 
66985 
66986 ac_cr=`echo X | tr X '\015'`
66987 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66988 # But we know of no other shell where ac_cr would be empty at this
66989 # point, so we can use a bashism as a fallback.
66990 if test "x$ac_cr" = x; then
66991   eval ac_cr=\$\'\\r\'
66992 fi
66993 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66994 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66995   ac_cs_awk_cr='\\r'
66996 else
66997   ac_cs_awk_cr=$ac_cr
66998 fi
66999 
67000 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67001 _ACEOF
67002 
67003 
67004 {
67005   echo "cat >conf$$subs.awk <<_ACEOF" &&
67006   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67007   echo "_ACEOF"
67008 } >conf$$subs.sh ||
67009   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67010 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67011 ac_delim='%!_!# '
67012 for ac_last_try in false false false false false :; do
67013   . ./conf$$subs.sh ||
67014     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67015 
67016   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67017   if test $ac_delim_n = $ac_delim_num; then
67018     break
67019   elif $ac_last_try; then
67020     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67021   else
67022     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67023   fi
67024 done
67025 rm -f conf$$subs.sh
67026 
67027 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67028 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67029 _ACEOF
67030 sed -n '
67031 h
67032 s/^/S["/; s/!.*/"]=/
67033 p
67034 g
67035 s/^[^!]*!//
67036 :repl
67037 t repl
67038 s/'"$ac_delim"'$//
67039 t delim
67040 :nl
67041 h
67042 s/\(.\{148\}\)..*/\1/
67043 t more1
67044 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67045 p
67046 n
67047 b repl
67048 :more1
67049 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67050 p
67051 g
67052 s/.\{148\}//
67053 t nl
67054 :delim
67055 h
67056 s/\(.\{148\}\)..*/\1/
67057 t more2
67058 s/["\\]/\\&/g; s/^/"/; s/$/"/
67059 p
67060 b
67061 :more2
67062 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67063 p
67064 g
67065 s/.\{148\}//
67066 t delim
67067 ' <conf$$subs.awk | sed '
67068 /^[^""]/{
67069   N
67070   s/\n//
67071 }
67072 ' >>$CONFIG_STATUS || ac_write_fail=1
67073 rm -f conf$$subs.awk
67074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67075 _ACAWK
67076 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67077   for (key in S) S_is_set[key] = 1
67078   FS = ""
67079 
67080 }
67081 {
67082   line = $ 0
67083   nfields = split(line, field, "@")
67084   substed = 0
67085   len = length(field[1])
67086   for (i = 2; i < nfields; i++) {
67087     key = field[i]
67088     keylen = length(key)
67089     if (S_is_set[key]) {
67090       value = S[key]
67091       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67092       len += length(value) + length(field[++i])
67093       substed = 1
67094     } else
67095       len += 1 + keylen
67096   }
67097 
67098   print line
67099 }
67100 
67101 _ACAWK
67102 _ACEOF
67103 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67104 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67105   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67106 else
67107   cat
67108 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67109   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67110 _ACEOF
67111 
67112 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67113 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67114 # trailing colons and then remove the whole line if VPATH becomes empty
67115 # (actually we leave an empty line to preserve line numbers).
67116 if test "x$srcdir" = x.; then
67117   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
67118 h
67119 s///
67120 s/^/:/
67121 s/[      ]*$/:/
67122 s/:\$(srcdir):/:/g
67123 s/:\${srcdir}:/:/g
67124 s/:@srcdir@:/:/g
67125 s/^:*//
67126 s/:*$//
67127 x
67128 s/\(=[   ]*\).*/\1/
67129 G
67130 s/\n//
67131 s/^[^=]*=[       ]*$//
67132 }'
67133 fi
67134 
67135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67136 fi # test -n "$CONFIG_FILES"
67137 
67138 
67139 eval set X "  :F $CONFIG_FILES      "
67140 shift
67141 for ac_tag
67142 do
67143   case $ac_tag in
67144   :[FHLC]) ac_mode=$ac_tag; continue;;
67145   esac
67146   case $ac_mode$ac_tag in
67147   :[FHL]*:*);;
67148   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67149   :[FH]-) ac_tag=-:-;;
67150   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67151   esac
67152   ac_save_IFS=$IFS
67153   IFS=:
67154   set x $ac_tag
67155   IFS=$ac_save_IFS
67156   shift
67157   ac_file=$1
67158   shift
67159 
67160   case $ac_mode in
67161   :L) ac_source=$1;;
67162   :[FH])
67163     ac_file_inputs=
67164     for ac_f
67165     do
67166       case $ac_f in
67167       -) ac_f="$ac_tmp/stdin";;
67168       *) # Look for the file first in the build tree, then in the source tree
67169          # (if the path is not absolute).  The absolute path cannot be DOS-style,
67170          # because $ac_f cannot contain `:'.
67171          test -f "$ac_f" ||
67172            case $ac_f in
67173            [\\/$]*) false;;
67174            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67175            esac ||
67176            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67177       esac
67178       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67179       as_fn_append ac_file_inputs " '$ac_f'"
67180     done
67181 
67182     # Let's still pretend it is `configure' which instantiates (i.e., don't
67183     # use $as_me), people would be surprised to read:
67184     #    /* config.h.  Generated by config.status.  */
67185     configure_input='Generated from '`
67186           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67187         `' by configure.'
67188     if test x"$ac_file" != x-; then
67189       configure_input="$ac_file.  $configure_input"
67190       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67191 $as_echo "$as_me: creating $ac_file" >&6;}
67192     fi
67193     # Neutralize special characters interpreted by sed in replacement strings.
67194     case $configure_input in #(
67195     *\&* | *\|* | *\\* )
67196        ac_sed_conf_input=`$as_echo "$configure_input" |
67197        sed 's/[\\\\&|]/\\\\&/g'`;; #(
67198     *) ac_sed_conf_input=$configure_input;;
67199     esac
67200 
67201     case $ac_tag in
67202     *:-:* | *:-) cat >"$ac_tmp/stdin" \
67203       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67204     esac
67205     ;;
67206   esac
67207 
67208   ac_dir=`$as_dirname -- "$ac_file" ||
67209 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67210          X"$ac_file" : 'X\(//\)[^/]' \| \
67211          X"$ac_file" : 'X\(//\)$' \| \
67212          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67213 $as_echo X"$ac_file" |
67214     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67215             s//\1/
67216             q
67217           }
67218           /^X\(\/\/\)[^/].*/{
67219             s//\1/
67220             q
67221           }
67222           /^X\(\/\/\)$/{
67223             s//\1/
67224             q
67225           }
67226           /^X\(\/\).*/{
67227             s//\1/
67228             q
67229           }
67230           s/.*/./; q'`
67231   as_dir="$ac_dir"; as_fn_mkdir_p
67232   ac_builddir=.
67233 
67234 case "$ac_dir" in
67235 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67236 *)
67237   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67238   # A ".." for each directory in $ac_dir_suffix.
67239   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67240   case $ac_top_builddir_sub in
67241   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67242   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67243   esac ;;
67244 esac
67245 ac_abs_top_builddir=$ac_pwd
67246 ac_abs_builddir=$ac_pwd$ac_dir_suffix
67247 # for backward compatibility:
67248 ac_top_builddir=$ac_top_build_prefix
67249 
67250 case $srcdir in
67251   .)  # We are building in place.
67252     ac_srcdir=.
67253     ac_top_srcdir=$ac_top_builddir_sub
67254     ac_abs_top_srcdir=$ac_pwd ;;
67255   [\\/]* | ?:[\\/]* )  # Absolute name.
67256     ac_srcdir=$srcdir$ac_dir_suffix;
67257     ac_top_srcdir=$srcdir
67258     ac_abs_top_srcdir=$srcdir ;;
67259   *) # Relative name.
67260     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67261     ac_top_srcdir=$ac_top_build_prefix$srcdir
67262     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67263 esac
67264 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67265 
67266 
67267   case $ac_mode in
67268   :F)
67269   #
67270   # CONFIG_FILE
67271   #
67272 
67273 _ACEOF
67274 
67275 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67276 # If the template does not know about datarootdir, expand it.
67277 # FIXME: This hack should be removed a few years after 2.60.
67278 ac_datarootdir_hack=; ac_datarootdir_seen=
67279 ac_sed_dataroot='
67280 /datarootdir/ {
67281   p
67282   q
67283 }
67284 /@datadir@/p
67285 /@docdir@/p
67286 /@infodir@/p
67287 /@localedir@/p
67288 /@mandir@/p'
67289 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67290 *datarootdir*) ac_datarootdir_seen=yes;;
67291 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67292   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67293 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67294 _ACEOF
67295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67296   ac_datarootdir_hack='
67297   s&@datadir@&$datadir&g
67298   s&@docdir@&$docdir&g
67299   s&@infodir@&$infodir&g
67300   s&@localedir@&$localedir&g
67301   s&@mandir@&$mandir&g
67302   s&\\\${datarootdir}&$datarootdir&g' ;;
67303 esac
67304 _ACEOF
67305 
67306 # Neutralize VPATH when `$srcdir' = `.'.
67307 # Shell code in configure.ac might set extrasub.
67308 # FIXME: do we really want to maintain this feature?
67309 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67310 ac_sed_extra="$ac_vpsub
67311 $extrasub
67312 _ACEOF
67313 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67314 :t
67315 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67316 s|@configure_input@|$ac_sed_conf_input|;t t
67317 s&@top_builddir@&$ac_top_builddir_sub&;t t
67318 s&@top_build_prefix@&$ac_top_build_prefix&;t t
67319 s&@srcdir@&$ac_srcdir&;t t
67320 s&@abs_srcdir@&$ac_abs_srcdir&;t t
67321 s&@top_srcdir@&$ac_top_srcdir&;t t
67322 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67323 s&@builddir@&$ac_builddir&;t t
67324 s&@abs_builddir@&$ac_abs_builddir&;t t
67325 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67326 $ac_datarootdir_hack
67327 "
67328 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67329   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67330 
67331 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67332   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67333   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
67334       "$ac_tmp/out"`; test -z "$ac_out"; } &&
67335   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67336 which seems to be undefined.  Please make sure it is defined" >&5
67337 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67338 which seems to be undefined.  Please make sure it is defined" >&2;}
67339 
67340   rm -f "$ac_tmp/stdin"
67341   case $ac_file in
67342   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67343   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67344   esac \
67345   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67346  ;;
67347 
67348 
67349 
67350   esac
67351 
67352 done # for ac_tag
67353 
67354 
67355 as_fn_exit 0
67356 _ACEOF
67357 ac_clean_files=$ac_clean_files_save
67358 
67359 test $ac_write_fail = 0 ||
67360   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67361 
67362 
67363 # configure is writing to config.log, and then calls config.status.
67364 # config.status does its own redirection, appending to config.log.
67365 # Unfortunately, on DOS this fails, as config.log is still kept open
67366 # by configure, so config.status won't be able to write to it; its
67367 # output is simply discarded.  So we exec the FD to /dev/null,
67368 # effectively closing config.log, so it can be properly (re)opened and
67369 # appended to by config.status.  When coming back to configure, we
67370 # need to make the FD available again.
67371 if test "$no_create" != yes; then
67372   ac_cs_success=:
67373   ac_config_status_args=
67374   test "$silent" = yes &&
67375     ac_config_status_args="$ac_config_status_args --quiet"
67376   exec 5>/dev/null
67377   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67378   exec 5>>config.log
67379   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67380   # would make configure fail if this is the last instruction.
67381   $ac_cs_success || as_fn_exit 1
67382 fi
67383 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67384   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67385 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67386 fi
67387 
67388 
67389 # After AC_OUTPUT, we need to do final work
67390 
67391 
67392   # Try to move config.log (generated by autoconf) to the configure-support directory.
67393   if test -e ./config.log; then
67394     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67395   fi
67396 
67397   # Rotate our log file (configure.log)
67398   if test -e "$OUTPUT_ROOT/configure.log.old"; then
67399     $RM -f "$OUTPUT_ROOT/configure.log.old"
67400   fi
67401   if test -e "$OUTPUT_ROOT/configure.log"; then
67402     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67403   fi
67404 
67405   # Move configure.log from current directory to the build output root
67406   if test -e ./configure.log; then
67407     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67408   fi
67409 
67410   # Make the compare script executable
67411   $CHMOD +x $OUTPUT_ROOT/compare.sh
67412 
67413 
67414 # Finally output some useful information to the user
67415 
67416   # Finally output some useful information to the user
67417 
67418   printf "\n"
67419   printf "====================================================\n"
67420   if test "x$no_create" != "xyes"; then
67421     if test "x$IS_RECONFIGURE" != "xyes"; then
67422       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67423     else
67424       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67425     fi
67426   else
67427     if test "x$IS_RECONFIGURE" != "xyes"; then
67428       printf "A configuration has been successfully checked but not created\n"
67429     else
67430       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67431     fi
67432   fi
67433   if test "x$CONFIGURE_COMMAND_LINE" != x; then
67434     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67435   else
67436     printf "using default settings.\n"
67437   fi
67438 
67439   printf "\n"
67440   printf "Configuration summary:\n"
67441   printf "* Debug level:    $DEBUG_LEVEL\n"
67442   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67443   printf "* JDK variant:    $JDK_VARIANT\n"
67444   printf "* JVM variants:   $JVM_VARIANTS\n"
67445   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67446   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67447 
67448   printf "\n"
67449   printf "Tools summary:\n"
67450   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67451     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67452   fi
67453   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67454   if test "x$TOOLCHAIN_VERSION" != "x"; then
67455     print_version=" $TOOLCHAIN_VERSION"
67456   fi
67457   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67458   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67459   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67460 
67461   printf "\n"
67462   printf "Build performance summary:\n"
67463   printf "* Cores to use:   $JOBS\n"
67464   printf "* Memory limit:   $MEMORY_SIZE MB\n"
67465   if test "x$CCACHE_STATUS" != "x"; then
67466     printf "* ccache status:  $CCACHE_STATUS\n"
67467   fi
67468   printf "\n"
67469 
67470   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67471     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67472     printf "will result in longer build times.\n"
67473     printf "\n"
67474   fi
67475 
67476   if test "x$FOUND_ALT_VARIABLES" != "x"; then
67477     printf "WARNING: You have old-style ALT_ environment variables set.\n"
67478     printf "These are not respected, and will be ignored. It is recommended\n"
67479     printf "that you clean your environment. The following variables are set:\n"
67480     printf "$FOUND_ALT_VARIABLES\n"
67481     printf "\n"
67482   fi
67483 
67484   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67485     printf "WARNING: Your build output directory is not on a local disk.\n"
67486     printf "This will severely degrade build performance!\n"
67487     printf "It is recommended that you create an output directory on a local disk,\n"
67488     printf "and run the configure script again from that directory.\n"
67489     printf "\n"
67490   fi
67491 
67492   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67493     printf "WARNING: The result of this configuration has overridden an older\n"
67494     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67495     printf "proper build. Failure to do so might result in strange build problems.\n"
67496     printf "\n"
67497   fi
67498 
67499   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67500     printf "WARNING: The result of this configuration was not saved.\n"
67501     printf "You should run without '--no-create | -n' to create the configuration.\n"
67502     printf "\n"
67503   fi
67504 
67505 
67506 
67507   # Locate config.log.
67508   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67509     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67510   elif test -e "./config.log"; then
67511     CONFIG_LOG_PATH="."
67512   fi
67513 
67514   if test -e "$CONFIG_LOG_PATH/config.log"; then
67515     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67516     if test $? -eq 0; then
67517       printf "The following warnings were produced. Repeated here for convenience:\n"
67518       # We must quote sed expression (using []) to stop m4 from eating the [].
67519       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67520       printf "\n"
67521     fi
67522   fi
67523