1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 STLPORT_LIB
 658 LIBZIP_CAN_USE_MMAP
 659 LIBDL
 660 LIBM
 661 USE_EXTERNAL_LCMS
 662 LCMS_LIBS
 663 LCMS_CFLAGS
 664 USE_EXTERNAL_LIBZ
 665 USE_EXTERNAL_LIBPNG
 666 PNG_LIBS
 667 PNG_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 LLVM_LIBS
 671 LLVM_LDFLAGS
 672 LLVM_CFLAGS
 673 LLVM_CONFIG
 674 LIBFFI_LIBS
 675 LIBFFI_CFLAGS
 676 ALSA_LIBS
 677 ALSA_CFLAGS
 678 FREETYPE_BUNDLE_LIB_PATH
 679 FREETYPE_LIBS
 680 FREETYPE_CFLAGS
 681 CUPS_CFLAGS
 682 X_EXTRA_LIBS
 683 X_LIBS
 684 X_PRE_LIBS
 685 X_CFLAGS
 686 XMKMF
 687 MSVCP_DLL
 688 MSVCR_DLL
 689 LIBCXX
 690 FIXPATH_DETACH_FLAG
 691 FIXPATH
 692 BUILD_GTEST
 693 VALID_JVM_FEATURES
 694 JVM_FEATURES_custom
 695 JVM_FEATURES_zeroshark
 696 JVM_FEATURES_zero
 697 JVM_FEATURES_minimal
 698 JVM_FEATURES_core
 699 JVM_FEATURES_client
 700 JVM_FEATURES_server
 701 INCLUDE_DTRACE
 702 GCOV_ENABLED
 703 STRIP_POLICY
 704 DEBUG_BINARIES
 705 ZIP_EXTERNAL_DEBUG_SYMBOLS
 706 COPY_DEBUG_SYMBOLS
 707 COMPILE_WITH_DEBUG_SYMBOLS
 708 CFLAGS_WARNINGS_ARE_ERRORS
 709 BUILD_CC_DISABLE_WARNING_PREFIX
 710 DISABLE_WARNING_PREFIX
 711 HOTSPOT_SET_WARNINGS_AS_ERRORS
 712 WARNINGS_AS_ERRORS
 713 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 714 ZERO_ARCHFLAG
 715 LDFLAGS_TESTEXE
 716 LDFLAGS_TESTLIB
 717 CXXFLAGS_TESTEXE
 718 CXXFLAGS_TESTLIB
 719 CFLAGS_TESTEXE
 720 CFLAGS_TESTLIB
 721 OPENJDK_BUILD_JVM_LIBS
 722 OPENJDK_BUILD_JVM_ASFLAGS
 723 OPENJDK_BUILD_JVM_LDFLAGS
 724 OPENJDK_BUILD_JVM_CFLAGS
 725 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 726 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 727 OPENJDK_BUILD_JDKEXE_LIBS
 728 OPENJDK_BUILD_JDKLIB_LIBS
 729 OPENJDK_BUILD_LDFLAGS_JDKEXE
 730 OPENJDK_BUILD_LDFLAGS_JDKLIB
 731 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 732 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 733 OPENJDK_BUILD_CFLAGS_JDKEXE
 734 OPENJDK_BUILD_CFLAGS_JDKLIB
 735 OPENJDK_BUILD_CXXSTD_CXXFLAG
 736 JVM_LIBS
 737 JVM_ASFLAGS
 738 JVM_LDFLAGS
 739 JVM_CFLAGS
 740 LDFLAGS_HASH_STYLE
 741 LDFLAGS_CXX_JDK
 742 JDKEXE_LIBS
 743 JDKLIB_LIBS
 744 LDFLAGS_JDKEXE
 745 LDFLAGS_JDKLIB
 746 CXXFLAGS_JDKEXE
 747 CXXFLAGS_JDKLIB
 748 CFLAGS_JDKEXE
 749 CFLAGS_JDKLIB
 750 MACOSX_VERSION_MIN
 751 CXXSTD_CXXFLAG
 752 JDK_ARCH_ABI_PROP_NAME
 753 CXX_O_FLAG_SIZE
 754 CXX_O_FLAG_NONE
 755 CXX_O_FLAG_DEBUG
 756 CXX_O_FLAG_NORM
 757 CXX_O_FLAG_HI
 758 CXX_O_FLAG_HIGHEST
 759 CXX_O_FLAG_HIGHEST_JVM
 760 C_O_FLAG_SIZE
 761 C_O_FLAG_NONE
 762 C_O_FLAG_DEBUG
 763 C_O_FLAG_NORM
 764 C_O_FLAG_HI
 765 C_O_FLAG_HIGHEST
 766 C_O_FLAG_HIGHEST_JVM
 767 JVM_CFLAGS_SYMBOLS
 768 CXXFLAGS_DEBUG_SYMBOLS
 769 CFLAGS_DEBUG_SYMBOLS
 770 CXX_FLAG_DEPS
 771 C_FLAG_DEPS
 772 SHARED_LIBRARY_FLAGS
 773 SET_SHARED_LIBRARY_MAPFILE
 774 SET_SHARED_LIBRARY_NAME
 775 SET_SHARED_LIBRARY_ORIGIN
 776 SET_EXECUTABLE_ORIGIN
 777 CXX_FLAG_REORDER
 778 C_FLAG_REORDER
 779 JVM_RCFLAGS
 780 RC_FLAGS
 781 AR_OUT_OPTION
 782 LD_OUT_OPTION
 783 EXE_OUT_OPTION
 784 CC_OUT_OPTION
 785 STRIPFLAGS
 786 ARFLAGS
 787 COMPILER_BINDCMD_FILE_FLAG
 788 COMPILER_COMMAND_FILE_FLAG
 789 COMPILER_TARGET_BITS_FLAG
 790 JT_HOME
 791 JTREGEXE
 792 HOTSPOT_TOOLCHAIN_TYPE
 793 USING_BROKEN_SUSE_LD
 794 PACKAGE_PATH
 795 USE_CLANG
 796 HOTSPOT_LD
 797 HOTSPOT_CXX
 798 HOTSPOT_RC
 799 HOTSPOT_MT
 800 BUILD_AS
 801 BUILD_LDCXX
 802 BUILD_LD
 803 BUILD_STRIP
 804 BUILD_OBJCOPY
 805 BUILD_AR
 806 BUILD_NM
 807 BUILD_CXX
 808 BUILD_CC
 809 BUILD_SYSROOT_LDFLAGS
 810 BUILD_SYSROOT_CFLAGS
 811 ac_ct_OBJDUMP
 812 OBJDUMP
 813 ac_ct_OBJCOPY
 814 OBJCOPY
 815 ac_ct_NM
 816 ac_ct_STRIP
 817 GNM
 818 NM
 819 STRIP
 820 MSBUILD
 821 DUMPBIN
 822 RC
 823 MT
 824 LIPO
 825 ac_ct_AR
 826 AR
 827 AS
 828 LDCXX
 829 LD
 830 CXXCPP
 831 CPP
 832 CXX_VERSION_NUMBER
 833 CC_VERSION_NUMBER
 834 ac_ct_CXX
 835 CXXFLAGS
 836 CXX
 837 TOOLCHAIN_PATH_CXX
 838 POTENTIAL_CXX
 839 OBJEXT
 840 EXEEXT
 841 ac_ct_CC
 842 CPPFLAGS
 843 LDFLAGS
 844 CFLAGS
 845 CC
 846 TOOLCHAIN_PATH_CC
 847 POTENTIAL_CC
 848 TOOLCHAIN_VERSION
 849 VS_LIB
 850 VS_INCLUDE
 851 VS_PATH
 852 CYGWIN_LINK
 853 SYSROOT_LDFLAGS
 854 SYSROOT_CFLAGS
 855 EXTRA_LDFLAGS
 856 EXTRA_CXXFLAGS
 857 EXTRA_CFLAGS
 858 LEGACY_EXTRA_LDFLAGS
 859 LEGACY_EXTRA_CXXFLAGS
 860 LEGACY_EXTRA_CFLAGS
 861 EXE_SUFFIX
 862 OBJ_SUFFIX
 863 STATIC_LIBRARY
 864 SHARED_LIBRARY
 865 STATIC_LIBRARY_SUFFIX
 866 SHARED_LIBRARY_SUFFIX
 867 LIBRARY_PREFIX
 868 TOOLCHAIN_TYPE
 869 STATIC_BUILD
 870 IMPORT_MODULES_MAKE
 871 IMPORT_MODULES_SRC
 872 IMPORT_MODULES_CONF
 873 IMPORT_MODULES_LIBS
 874 IMPORT_MODULES_CMDS
 875 IMPORT_MODULES_CLASSES
 876 BUILD_OUTPUT
 877 JDK_TOPDIR
 878 NASHORN_TOPDIR
 879 HOTSPOT_TOPDIR
 880 JAXWS_TOPDIR
 881 JAXP_TOPDIR
 882 CORBA_TOPDIR
 883 LANGTOOLS_TOPDIR
 884 EXTERNAL_BUILDJDK
 885 BUILD_JDK
 886 CREATE_BUILDJDK
 887 JLINK
 888 JMOD
 889 BOOT_JDK_BITS
 890 JAVAC_FLAGS
 891 BOOT_JDK_MODULAR
 892 BOOT_JDK_SOURCETARGET
 893 JARSIGNER
 894 JAR
 895 JAVAH
 896 JAVAC
 897 JAVA
 898 BOOT_JDK
 899 JAVA_CHECK
 900 JAVAC_CHECK
 901 VERSION_IS_GA
 902 VERSION_SHORT
 903 VERSION_STRING
 904 VERSION_NUMBER_FOUR_POSITIONS
 905 VERSION_NUMBER
 906 VERSION_OPT
 907 VERSION_BUILD
 908 VERSION_PRE
 909 VERSION_PATCH
 910 VERSION_SECURITY
 911 VERSION_MINOR
 912 VERSION_MAJOR
 913 MACOSX_BUNDLE_ID_BASE
 914 MACOSX_BUNDLE_NAME_BASE
 915 HOTSPOT_VM_DISTRO
 916 COMPANY_NAME
 917 JDK_RC_PLATFORM_NAME
 918 PRODUCT_SUFFIX
 919 PRODUCT_NAME
 920 LAUNCHER_NAME
 921 JLINK_KEEP_PACKAGED_MODULES
 922 COPYRIGHT_YEAR
 923 COMPRESS_JARS
 924 INCLUDE_SA
 925 UNLIMITED_CRYPTO
 926 CACERTS_FILE
 927 ENABLE_HEADLESS_ONLY
 928 DEFAULT_MAKE_TARGET
 929 OS_VERSION_MICRO
 930 OS_VERSION_MINOR
 931 OS_VERSION_MAJOR
 932 PKG_CONFIG
 933 BASH_ARGS
 934 SETFILE
 935 CODESIGN
 936 XATTR
 937 DSYMUTIL
 938 IS_GNU_TIME
 939 PATCH
 940 DTRACE
 941 TIME
 942 STAT
 943 HG
 944 READELF
 945 OTOOL
 946 LDD
 947 ZIP
 948 UNZIP
 949 TAR_SUPPORTS_TRANSFORM
 950 TAR_INCLUDE_PARAM
 951 TAR_CREATE_EXTRA_PARAM
 952 TAR_TYPE
 953 FIND_DELETE
 954 OUTPUT_SYNC
 955 OUTPUT_SYNC_SUPPORTED
 956 CHECK_TOOLSDIR_MAKE
 957 CHECK_TOOLSDIR_GMAKE
 958 CHECK_MAKE
 959 CHECK_GMAKE
 960 MAKE
 961 PKGHANDLER
 962 CONFIGURESUPPORT_OUTPUTDIR
 963 OUTPUT_ROOT
 964 CONF_NAME
 965 SPEC
 966 SDKROOT
 967 XCODEBUILD
 968 JVM_VARIANT_MAIN
 969 VALID_JVM_VARIANTS
 970 JVM_VARIANTS
 971 DEBUG_LEVEL
 972 HOTSPOT_DEBUG_LEVEL
 973 JDK_VARIANT
 974 USERNAME
 975 CANONICAL_TOPDIR
 976 ORIGINAL_TOPDIR
 977 TOPDIR
 978 PATH_SEP
 979 ZERO_ARCHDEF
 980 HOTSPOT_BUILD_CPU_DEFINE
 981 HOTSPOT_BUILD_CPU_ARCH
 982 HOTSPOT_BUILD_CPU
 983 HOTSPOT_BUILD_OS_TYPE
 984 HOTSPOT_BUILD_OS
 985 OPENJDK_BUILD_BUNDLE_PLATFORM
 986 OPENJDK_BUILD_CPU_BUNDLE
 987 OPENJDK_BUILD_OS_BUNDLE
 988 OPENJDK_BUILD_OS_EXPORT_DIR
 989 OPENJDK_BUILD_CPU_JLI_CFLAGS
 990 OPENJDK_BUILD_CPU_OSARCH
 991 OPENJDK_BUILD_CPU_ISADIR
 992 OPENJDK_BUILD_CPU_LIBDIR
 993 OPENJDK_BUILD_CPU_LEGACY_LIB
 994 OPENJDK_BUILD_CPU_LEGACY
 995 HOTSPOT_TARGET_CPU_DEFINE
 996 HOTSPOT_TARGET_CPU_ARCH
 997 HOTSPOT_TARGET_CPU
 998 HOTSPOT_TARGET_OS_TYPE
 999 HOTSPOT_TARGET_OS
1000 DEFINE_CROSS_COMPILE_ARCH
1001 LP64
1002 OPENJDK_TARGET_BUNDLE_PLATFORM
1003 OPENJDK_TARGET_CPU_BUNDLE
1004 OPENJDK_TARGET_OS_BUNDLE
1005 OPENJDK_TARGET_OS_EXPORT_DIR
1006 OPENJDK_TARGET_CPU_JLI_CFLAGS
1007 OPENJDK_TARGET_CPU_OSARCH
1008 OPENJDK_TARGET_CPU_ISADIR
1009 OPENJDK_TARGET_CPU_LIBDIR
1010 OPENJDK_TARGET_CPU_LEGACY_LIB
1011 OPENJDK_TARGET_CPU_LEGACY
1012 REQUIRED_OS_VERSION
1013 REQUIRED_OS_NAME
1014 COMPILE_TYPE
1015 OPENJDK_TARGET_CPU_ENDIAN
1016 OPENJDK_TARGET_CPU_BITS
1017 OPENJDK_TARGET_CPU_ARCH
1018 OPENJDK_TARGET_CPU
1019 OPENJDK_TARGET_OS_ENV
1020 OPENJDK_TARGET_OS_TYPE
1021 OPENJDK_TARGET_OS
1022 OPENJDK_BUILD_CPU_ENDIAN
1023 OPENJDK_BUILD_CPU_BITS
1024 OPENJDK_BUILD_CPU_ARCH
1025 OPENJDK_BUILD_CPU
1026 OPENJDK_BUILD_OS_ENV
1027 OPENJDK_BUILD_OS_TYPE
1028 OPENJDK_BUILD_OS
1029 OPENJDK_BUILD_AUTOCONF_NAME
1030 OPENJDK_TARGET_AUTOCONF_NAME
1031 target_os
1032 target_vendor
1033 target_cpu
1034 target
1035 host_os
1036 host_vendor
1037 host_cpu
1038 host
1039 build_os
1040 build_vendor
1041 build_cpu
1042 build
1043 NICE
1044 CPIO
1045 DF
1046 READLINK
1047 CYGPATH
1048 SED
1049 FGREP
1050 EGREP
1051 GREP
1052 AWK
1053 XARGS
1054 WHICH
1055 WC
1056 UNIQ
1057 UNAME
1058 TR
1059 TOUCH
1060 TEE
1061 TAR
1062 TAIL
1063 SORT
1064 SH
1065 RMDIR
1066 RM
1067 PRINTF
1068 NAWK
1069 MV
1070 MKTEMP
1071 MKDIR
1072 LS
1073 LN
1074 GZIP
1075 GUNZIP
1076 HEAD
1077 FIND
1078 FILE
1079 EXPR
1080 ECHO
1081 DIRNAME
1082 DIFF
1083 DATE
1084 CUT
1085 CP
1086 COMM
1087 CMP
1088 CHMOD
1089 CAT
1090 BASH
1091 BASENAME
1092 DATE_WHEN_CONFIGURED
1093 ORIGINAL_PATH
1094 CONFIGURE_COMMAND_LINE
1095 target_alias
1096 host_alias
1097 build_alias
1098 LIBS
1099 ECHO_T
1100 ECHO_N
1101 ECHO_C
1102 DEFS
1103 mandir
1104 localedir
1105 libdir
1106 psdir
1107 pdfdir
1108 dvidir
1109 htmldir
1110 infodir
1111 docdir
1112 oldincludedir
1113 includedir
1114 localstatedir
1115 sharedstatedir
1116 sysconfdir
1117 datadir
1118 datarootdir
1119 libexecdir
1120 sbindir
1121 bindir
1122 program_transform_name
1123 prefix
1124 exec_prefix
1125 PACKAGE_URL
1126 PACKAGE_BUGREPORT
1127 PACKAGE_STRING
1128 PACKAGE_VERSION
1129 PACKAGE_TARNAME
1130 PACKAGE_NAME
1131 PATH_SEPARATOR
1132 SHELL'
1133 ac_subst_files=''
1134 ac_user_opts='
1135 enable_option_checking
1136 with_target_bits
1137 enable_openjdk_only
1138 with_custom_make_dir
1139 with_jdk_variant
1140 enable_debug
1141 with_debug_level
1142 with_jvm_variants
1143 with_cpu_port
1144 with_devkit
1145 with_sys_root
1146 with_sysroot
1147 with_tools_dir
1148 with_toolchain_path
1149 with_extra_path
1150 with_sdk_name
1151 with_conf_name
1152 with_output_sync
1153 with_default_make_target
1154 enable_headless_only
1155 with_cacerts_file
1156 enable_unlimited_crypto
1157 with_copyright_year
1158 enable_keep_packaged_modules
1159 with_milestone
1160 with_update_version
1161 with_user_release_suffix
1162 with_build_number
1163 with_version_string
1164 with_version_pre
1165 with_version_opt
1166 with_version_build
1167 with_version_major
1168 with_version_minor
1169 with_version_security
1170 with_version_patch
1171 with_boot_jdk
1172 with_build_jdk
1173 with_add_source_root
1174 with_override_source_root
1175 with_adds_and_overrides
1176 with_override_langtools
1177 with_override_corba
1178 with_override_jaxp
1179 with_override_jaxws
1180 with_override_hotspot
1181 with_override_nashorn
1182 with_override_jdk
1183 with_import_hotspot
1184 with_import_modules
1185 enable_static_build
1186 with_toolchain_type
1187 with_extra_cflags
1188 with_extra_cxxflags
1189 with_extra_ldflags
1190 with_toolchain_version
1191 with_build_devkit
1192 with_jtreg
1193 with_abi_profile
1194 enable_warnings_as_errors
1195 with_native_debug_symbols
1196 enable_debug_symbols
1197 enable_zip_debug_info
1198 enable_native_coverage
1199 enable_dtrace
1200 with_jvm_features
1201 with_jvm_interpreter
1202 enable_hotspot_gtest
1203 with_stdc__lib
1204 with_msvcr_dll
1205 with_msvcp_dll
1206 with_x
1207 with_cups
1208 with_cups_include
1209 with_freetype
1210 with_freetype_include
1211 with_freetype_lib
1212 with_freetype_src
1213 enable_freetype_bundling
1214 with_alsa
1215 with_alsa_include
1216 with_alsa_lib
1217 with_libffi
1218 with_libffi_include
1219 with_libffi_lib
1220 with_libjpeg
1221 with_giflib
1222 with_libpng
1223 with_zlib
1224 with_lcms
1225 with_dxsdk
1226 with_dxsdk_lib
1227 with_dxsdk_include
1228 enable_jtreg_failure_handler
1229 enable_generate_classlist
1230 with_num_cores
1231 with_memory_size
1232 with_jobs
1233 with_test_jobs
1234 with_boot_jdk_jvmargs
1235 with_sjavac_server_java
1236 enable_sjavac
1237 enable_javac_server
1238 enable_icecc
1239 enable_precompiled_headers
1240 enable_ccache
1241 with_ccache_dir
1242 '
1243       ac_precious_vars='build_alias
1244 host_alias
1245 target_alias
1246 BASENAME
1247 BASH
1248 CAT
1249 CHMOD
1250 CMP
1251 COMM
1252 CP
1253 CUT
1254 DATE
1255 DIFF
1256 DIRNAME
1257 ECHO
1258 EXPR
1259 FILE
1260 FIND
1261 HEAD
1262 GUNZIP
1263 GZIP
1264 LN
1265 LS
1266 MKDIR
1267 MKTEMP
1268 MV
1269 NAWK
1270 PRINTF
1271 RM
1272 RMDIR
1273 SH
1274 SORT
1275 TAIL
1276 TAR
1277 TEE
1278 TOUCH
1279 TR
1280 UNAME
1281 UNIQ
1282 WC
1283 WHICH
1284 XARGS
1285 AWK
1286 GREP
1287 EGREP
1288 FGREP
1289 SED
1290 CYGPATH
1291 READLINK
1292 DF
1293 CPIO
1294 NICE
1295 MAKE
1296 UNZIP
1297 ZIP
1298 LDD
1299 OTOOL
1300 READELF
1301 HG
1302 STAT
1303 TIME
1304 DTRACE
1305 PATCH
1306 DSYMUTIL
1307 XATTR
1308 CODESIGN
1309 SETFILE
1310 PKG_CONFIG
1311 JAVA
1312 JAVAC
1313 JAVAH
1314 JAR
1315 JARSIGNER
1316 CC
1317 CFLAGS
1318 LDFLAGS
1319 LIBS
1320 CPPFLAGS
1321 CXX
1322 CXXFLAGS
1323 CCC
1324 CPP
1325 CXXCPP
1326 AS
1327 AR
1328 LIPO
1329 STRIP
1330 NM
1331 GNM
1332 OBJCOPY
1333 OBJDUMP
1334 BUILD_CC
1335 BUILD_CXX
1336 BUILD_NM
1337 BUILD_AR
1338 BUILD_OBJCOPY
1339 BUILD_STRIP
1340 JTREGEXE
1341 XMKMF
1342 FREETYPE_CFLAGS
1343 FREETYPE_LIBS
1344 ALSA_CFLAGS
1345 ALSA_LIBS
1346 LIBFFI_CFLAGS
1347 LIBFFI_LIBS
1348 PNG_CFLAGS
1349 PNG_LIBS
1350 LCMS_CFLAGS
1351 LCMS_LIBS
1352 ICECC_CMD
1353 ICECC_CREATE_ENV
1354 ICECC_WRAPPER
1355 CCACHE'
1356 
1357 
1358 # Initialize some variables set by options.
1359 ac_init_help=
1360 ac_init_version=false
1361 ac_unrecognized_opts=
1362 ac_unrecognized_sep=
1363 # The variables have the same names as the options, with
1364 # dashes changed to underlines.
1365 cache_file=/dev/null
1366 exec_prefix=NONE
1367 no_create=
1368 no_recursion=
1369 prefix=NONE
1370 program_prefix=NONE
1371 program_suffix=NONE
1372 program_transform_name=s,x,x,
1373 silent=
1374 site=
1375 srcdir=
1376 verbose=
1377 x_includes=NONE
1378 x_libraries=NONE
1379 
1380 # Installation directory options.
1381 # These are left unexpanded so users can "make install exec_prefix=/foo"
1382 # and all the variables that are supposed to be based on exec_prefix
1383 # by default will actually change.
1384 # Use braces instead of parens because sh, perl, etc. also accept them.
1385 # (The list follows the same order as the GNU Coding Standards.)
1386 bindir='${exec_prefix}/bin'
1387 sbindir='${exec_prefix}/sbin'
1388 libexecdir='${exec_prefix}/libexec'
1389 datarootdir='${prefix}/share'
1390 datadir='${datarootdir}'
1391 sysconfdir='${prefix}/etc'
1392 sharedstatedir='${prefix}/com'
1393 localstatedir='${prefix}/var'
1394 includedir='${prefix}/include'
1395 oldincludedir='/usr/include'
1396 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1397 infodir='${datarootdir}/info'
1398 htmldir='${docdir}'
1399 dvidir='${docdir}'
1400 pdfdir='${docdir}'
1401 psdir='${docdir}'
1402 libdir='${exec_prefix}/lib'
1403 localedir='${datarootdir}/locale'
1404 mandir='${datarootdir}/man'
1405 
1406 ac_prev=
1407 ac_dashdash=
1408 for ac_option
1409 do
1410   # If the previous option needs an argument, assign it.
1411   if test -n "$ac_prev"; then
1412     eval $ac_prev=\$ac_option
1413     ac_prev=
1414     continue
1415   fi
1416 
1417   case $ac_option in
1418   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1419   *=)   ac_optarg= ;;
1420   *)    ac_optarg=yes ;;
1421   esac
1422 
1423   # Accept the important Cygnus configure options, so we can diagnose typos.
1424 
1425   case $ac_dashdash$ac_option in
1426   --)
1427     ac_dashdash=yes ;;
1428 
1429   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1430     ac_prev=bindir ;;
1431   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1432     bindir=$ac_optarg ;;
1433 
1434   -build | --build | --buil | --bui | --bu)
1435     ac_prev=build_alias ;;
1436   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1437     build_alias=$ac_optarg ;;
1438 
1439   -cache-file | --cache-file | --cache-fil | --cache-fi \
1440   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1441     ac_prev=cache_file ;;
1442   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1443   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1444     cache_file=$ac_optarg ;;
1445 
1446   --config-cache | -C)
1447     cache_file=config.cache ;;
1448 
1449   -datadir | --datadir | --datadi | --datad)
1450     ac_prev=datadir ;;
1451   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1452     datadir=$ac_optarg ;;
1453 
1454   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1455   | --dataroo | --dataro | --datar)
1456     ac_prev=datarootdir ;;
1457   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1458   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1459     datarootdir=$ac_optarg ;;
1460 
1461   -disable-* | --disable-*)
1462     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1463     # Reject names that are not valid shell variable names.
1464     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465       as_fn_error $? "invalid feature name: $ac_useropt"
1466     ac_useropt_orig=$ac_useropt
1467     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468     case $ac_user_opts in
1469       *"
1470 "enable_$ac_useropt"
1471 "*) ;;
1472       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1473          ac_unrecognized_sep=', ';;
1474     esac
1475     eval enable_$ac_useropt=no ;;
1476 
1477   -docdir | --docdir | --docdi | --doc | --do)
1478     ac_prev=docdir ;;
1479   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1480     docdir=$ac_optarg ;;
1481 
1482   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1483     ac_prev=dvidir ;;
1484   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1485     dvidir=$ac_optarg ;;
1486 
1487   -enable-* | --enable-*)
1488     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1489     # Reject names that are not valid shell variable names.
1490     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1491       as_fn_error $? "invalid feature name: $ac_useropt"
1492     ac_useropt_orig=$ac_useropt
1493     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1494     case $ac_user_opts in
1495       *"
1496 "enable_$ac_useropt"
1497 "*) ;;
1498       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1499          ac_unrecognized_sep=', ';;
1500     esac
1501     eval enable_$ac_useropt=\$ac_optarg ;;
1502 
1503   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1504   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1505   | --exec | --exe | --ex)
1506     ac_prev=exec_prefix ;;
1507   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1508   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1509   | --exec=* | --exe=* | --ex=*)
1510     exec_prefix=$ac_optarg ;;
1511 
1512   -gas | --gas | --ga | --g)
1513     # Obsolete; use --with-gas.
1514     with_gas=yes ;;
1515 
1516   -help | --help | --hel | --he | -h)
1517     ac_init_help=long ;;
1518   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1519     ac_init_help=recursive ;;
1520   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1521     ac_init_help=short ;;
1522 
1523   -host | --host | --hos | --ho)
1524     ac_prev=host_alias ;;
1525   -host=* | --host=* | --hos=* | --ho=*)
1526     host_alias=$ac_optarg ;;
1527 
1528   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1529     ac_prev=htmldir ;;
1530   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1531   | --ht=*)
1532     htmldir=$ac_optarg ;;
1533 
1534   -includedir | --includedir | --includedi | --included | --include \
1535   | --includ | --inclu | --incl | --inc)
1536     ac_prev=includedir ;;
1537   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1538   | --includ=* | --inclu=* | --incl=* | --inc=*)
1539     includedir=$ac_optarg ;;
1540 
1541   -infodir | --infodir | --infodi | --infod | --info | --inf)
1542     ac_prev=infodir ;;
1543   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1544     infodir=$ac_optarg ;;
1545 
1546   -libdir | --libdir | --libdi | --libd)
1547     ac_prev=libdir ;;
1548   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1549     libdir=$ac_optarg ;;
1550 
1551   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1552   | --libexe | --libex | --libe)
1553     ac_prev=libexecdir ;;
1554   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1555   | --libexe=* | --libex=* | --libe=*)
1556     libexecdir=$ac_optarg ;;
1557 
1558   -localedir | --localedir | --localedi | --localed | --locale)
1559     ac_prev=localedir ;;
1560   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1561     localedir=$ac_optarg ;;
1562 
1563   -localstatedir | --localstatedir | --localstatedi | --localstated \
1564   | --localstate | --localstat | --localsta | --localst | --locals)
1565     ac_prev=localstatedir ;;
1566   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1567   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1568     localstatedir=$ac_optarg ;;
1569 
1570   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1571     ac_prev=mandir ;;
1572   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1573     mandir=$ac_optarg ;;
1574 
1575   -nfp | --nfp | --nf)
1576     # Obsolete; use --without-fp.
1577     with_fp=no ;;
1578 
1579   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1580   | --no-cr | --no-c | -n)
1581     no_create=yes ;;
1582 
1583   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1584   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1585     no_recursion=yes ;;
1586 
1587   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1588   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1589   | --oldin | --oldi | --old | --ol | --o)
1590     ac_prev=oldincludedir ;;
1591   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1592   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1593   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1594     oldincludedir=$ac_optarg ;;
1595 
1596   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1597     ac_prev=prefix ;;
1598   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1599     prefix=$ac_optarg ;;
1600 
1601   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1602   | --program-pre | --program-pr | --program-p)
1603     ac_prev=program_prefix ;;
1604   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1605   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1606     program_prefix=$ac_optarg ;;
1607 
1608   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1609   | --program-suf | --program-su | --program-s)
1610     ac_prev=program_suffix ;;
1611   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1612   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1613     program_suffix=$ac_optarg ;;
1614 
1615   -program-transform-name | --program-transform-name \
1616   | --program-transform-nam | --program-transform-na \
1617   | --program-transform-n | --program-transform- \
1618   | --program-transform | --program-transfor \
1619   | --program-transfo | --program-transf \
1620   | --program-trans | --program-tran \
1621   | --progr-tra | --program-tr | --program-t)
1622     ac_prev=program_transform_name ;;
1623   -program-transform-name=* | --program-transform-name=* \
1624   | --program-transform-nam=* | --program-transform-na=* \
1625   | --program-transform-n=* | --program-transform-=* \
1626   | --program-transform=* | --program-transfor=* \
1627   | --program-transfo=* | --program-transf=* \
1628   | --program-trans=* | --program-tran=* \
1629   | --progr-tra=* | --program-tr=* | --program-t=*)
1630     program_transform_name=$ac_optarg ;;
1631 
1632   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1633     ac_prev=pdfdir ;;
1634   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1635     pdfdir=$ac_optarg ;;
1636 
1637   -psdir | --psdir | --psdi | --psd | --ps)
1638     ac_prev=psdir ;;
1639   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1640     psdir=$ac_optarg ;;
1641 
1642   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1643   | -silent | --silent | --silen | --sile | --sil)
1644     silent=yes ;;
1645 
1646   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1647     ac_prev=sbindir ;;
1648   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1649   | --sbi=* | --sb=*)
1650     sbindir=$ac_optarg ;;
1651 
1652   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1653   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1654   | --sharedst | --shareds | --shared | --share | --shar \
1655   | --sha | --sh)
1656     ac_prev=sharedstatedir ;;
1657   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1658   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1659   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1660   | --sha=* | --sh=*)
1661     sharedstatedir=$ac_optarg ;;
1662 
1663   -site | --site | --sit)
1664     ac_prev=site ;;
1665   -site=* | --site=* | --sit=*)
1666     site=$ac_optarg ;;
1667 
1668   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1669     ac_prev=srcdir ;;
1670   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1671     srcdir=$ac_optarg ;;
1672 
1673   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1674   | --syscon | --sysco | --sysc | --sys | --sy)
1675     ac_prev=sysconfdir ;;
1676   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1677   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1678     sysconfdir=$ac_optarg ;;
1679 
1680   -target | --target | --targe | --targ | --tar | --ta | --t)
1681     ac_prev=target_alias ;;
1682   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1683     target_alias=$ac_optarg ;;
1684 
1685   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1686     verbose=yes ;;
1687 
1688   -version | --version | --versio | --versi | --vers | -V)
1689     ac_init_version=: ;;
1690 
1691   -with-* | --with-*)
1692     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1693     # Reject names that are not valid shell variable names.
1694     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1695       as_fn_error $? "invalid package name: $ac_useropt"
1696     ac_useropt_orig=$ac_useropt
1697     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1698     case $ac_user_opts in
1699       *"
1700 "with_$ac_useropt"
1701 "*) ;;
1702       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1703          ac_unrecognized_sep=', ';;
1704     esac
1705     eval with_$ac_useropt=\$ac_optarg ;;
1706 
1707   -without-* | --without-*)
1708     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1709     # Reject names that are not valid shell variable names.
1710     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1711       as_fn_error $? "invalid package name: $ac_useropt"
1712     ac_useropt_orig=$ac_useropt
1713     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1714     case $ac_user_opts in
1715       *"
1716 "with_$ac_useropt"
1717 "*) ;;
1718       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1719          ac_unrecognized_sep=', ';;
1720     esac
1721     eval with_$ac_useropt=no ;;
1722 
1723   --x)
1724     # Obsolete; use --with-x.
1725     with_x=yes ;;
1726 
1727   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1728   | --x-incl | --x-inc | --x-in | --x-i)
1729     ac_prev=x_includes ;;
1730   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1731   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1732     x_includes=$ac_optarg ;;
1733 
1734   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1735   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1736     ac_prev=x_libraries ;;
1737   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1738   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1739     x_libraries=$ac_optarg ;;
1740 
1741   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1742 Try \`$0 --help' for more information"
1743     ;;
1744 
1745   *=*)
1746     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1747     # Reject names that are not valid shell variable names.
1748     case $ac_envvar in #(
1749       '' | [0-9]* | *[!_$as_cr_alnum]* )
1750       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1751     esac
1752     eval $ac_envvar=\$ac_optarg
1753     export $ac_envvar ;;
1754 
1755   *)
1756     # FIXME: should be removed in autoconf 3.0.
1757     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1758     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1759       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1760     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1761     ;;
1762 
1763   esac
1764 done
1765 
1766 if test -n "$ac_prev"; then
1767   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1768   as_fn_error $? "missing argument to $ac_option"
1769 fi
1770 
1771 if test -n "$ac_unrecognized_opts"; then
1772   case $enable_option_checking in
1773     no) ;;
1774     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1775     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1776   esac
1777 fi
1778 
1779 # Check all directory arguments for consistency.
1780 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1781                 datadir sysconfdir sharedstatedir localstatedir includedir \
1782                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1783                 libdir localedir mandir
1784 do
1785   eval ac_val=\$$ac_var
1786   # Remove trailing slashes.
1787   case $ac_val in
1788     */ )
1789       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1790       eval $ac_var=\$ac_val;;
1791   esac
1792   # Be sure to have absolute directory names.
1793   case $ac_val in
1794     [\\/$]* | ?:[\\/]* )  continue;;
1795     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1796   esac
1797   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1798 done
1799 
1800 # There might be people who depend on the old broken behavior: `$host'
1801 # used to hold the argument of --host etc.
1802 # FIXME: To remove some day.
1803 build=$build_alias
1804 host=$host_alias
1805 target=$target_alias
1806 
1807 # FIXME: To remove some day.
1808 if test "x$host_alias" != x; then
1809   if test "x$build_alias" = x; then
1810     cross_compiling=maybe
1811   elif test "x$build_alias" != "x$host_alias"; then
1812     cross_compiling=yes
1813   fi
1814 fi
1815 
1816 ac_tool_prefix=
1817 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1818 
1819 test "$silent" = yes && exec 6>/dev/null
1820 
1821 
1822 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1823 ac_ls_di=`ls -di .` &&
1824 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1825   as_fn_error $? "working directory cannot be determined"
1826 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1827   as_fn_error $? "pwd does not report name of working directory"
1828 
1829 
1830 # Find the source files, if location was not specified.
1831 if test -z "$srcdir"; then
1832   ac_srcdir_defaulted=yes
1833   # Try the directory containing this script, then the parent directory.
1834   ac_confdir=`$as_dirname -- "$as_myself" ||
1835 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1836          X"$as_myself" : 'X\(//\)[^/]' \| \
1837          X"$as_myself" : 'X\(//\)$' \| \
1838          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1839 $as_echo X"$as_myself" |
1840     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1841             s//\1/
1842             q
1843           }
1844           /^X\(\/\/\)[^/].*/{
1845             s//\1/
1846             q
1847           }
1848           /^X\(\/\/\)$/{
1849             s//\1/
1850             q
1851           }
1852           /^X\(\/\).*/{
1853             s//\1/
1854             q
1855           }
1856           s/.*/./; q'`
1857   srcdir=$ac_confdir
1858   if test ! -r "$srcdir/$ac_unique_file"; then
1859     srcdir=..
1860   fi
1861 else
1862   ac_srcdir_defaulted=no
1863 fi
1864 if test ! -r "$srcdir/$ac_unique_file"; then
1865   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1866   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1867 fi
1868 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1869 ac_abs_confdir=`(
1870         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1871         pwd)`
1872 # When building in place, set srcdir=.
1873 if test "$ac_abs_confdir" = "$ac_pwd"; then
1874   srcdir=.
1875 fi
1876 # Remove unnecessary trailing slashes from srcdir.
1877 # Double slashes in file names in object file debugging info
1878 # mess up M-x gdb in Emacs.
1879 case $srcdir in
1880 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1881 esac
1882 for ac_var in $ac_precious_vars; do
1883   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1884   eval ac_env_${ac_var}_value=\$${ac_var}
1885   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1886   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1887 done
1888 
1889 #
1890 # Report the --help message.
1891 #
1892 if test "$ac_init_help" = "long"; then
1893   # Omit some internal or obsolete options to make the list less imposing.
1894   # This message is too long to be a string in the A/UX 3.1 sh.
1895   cat <<_ACEOF
1896 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1897 
1898 Usage: $0 [OPTION]... [VAR=VALUE]...
1899 
1900 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1901 VAR=VALUE.  See below for descriptions of some of the useful variables.
1902 
1903 Defaults for the options are specified in brackets.
1904 
1905 Configuration:
1906   -h, --help              display this help and exit
1907       --help=short        display options specific to this package
1908       --help=recursive    display the short help of all the included packages
1909   -V, --version           display version information and exit
1910   -q, --quiet, --silent   do not print \`checking ...' messages
1911       --cache-file=FILE   cache test results in FILE [disabled]
1912   -C, --config-cache      alias for \`--cache-file=config.cache'
1913   -n, --no-create         do not create output files
1914       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1915 
1916 Installation directories:
1917   --prefix=PREFIX         install architecture-independent files in PREFIX
1918                           [$ac_default_prefix]
1919   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1920                           [PREFIX]
1921 
1922 By default, \`make install' will install all the files in
1923 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1924 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1925 for instance \`--prefix=\$HOME'.
1926 
1927 For better control, use the options below.
1928 
1929 Fine tuning of the installation directories:
1930   --bindir=DIR            user executables [EPREFIX/bin]
1931   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1932   --libexecdir=DIR        program executables [EPREFIX/libexec]
1933   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1934   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1935   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1936   --libdir=DIR            object code libraries [EPREFIX/lib]
1937   --includedir=DIR        C header files [PREFIX/include]
1938   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1939   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1940   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1941   --infodir=DIR           info documentation [DATAROOTDIR/info]
1942   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1943   --mandir=DIR            man documentation [DATAROOTDIR/man]
1944   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1945   --htmldir=DIR           html documentation [DOCDIR]
1946   --dvidir=DIR            dvi documentation [DOCDIR]
1947   --pdfdir=DIR            pdf documentation [DOCDIR]
1948   --psdir=DIR             ps documentation [DOCDIR]
1949 _ACEOF
1950 
1951   cat <<\_ACEOF
1952 
1953 X features:
1954   --x-includes=DIR    X include files are in DIR
1955   --x-libraries=DIR   X library files are in DIR
1956 
1957 System types:
1958   --build=BUILD     configure for building on BUILD [guessed]
1959   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1960   --target=TARGET   configure for building compilers for TARGET [HOST]
1961 _ACEOF
1962 fi
1963 
1964 if test -n "$ac_init_help"; then
1965   case $ac_init_help in
1966      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1967    esac
1968   cat <<\_ACEOF
1969 
1970 Optional Features:
1971   --disable-option-checking  ignore unrecognized --enable/--with options
1972   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1973   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1974   --enable-openjdk-only   suppress building custom source even if present
1975                           [disabled]
1976   --enable-debug          set the debug level to fastdebug (shorthand for
1977                           --with-debug-level=fastdebug) [disabled]
1978   --enable-headless-only  only build headless (no GUI) support [disabled]
1979   --enable-unlimited-crypto
1980                           Enable unlimited crypto policy [disabled]
1981   --disable-keep-packaged-modules
1982                           Do not keep packaged modules in jdk image [enable]
1983   --enable-static-build   enable static library build [disabled]
1984   --disable-warnings-as-errors
1985                           do not consider native warnings to be an error
1986                           [enabled]
1987   --enable-debug-symbols  Deprecated. Option is kept for backwards
1988                           compatibility and is ignored
1989   --enable-zip-debug-info Deprecated. Option is kept for backwards
1990                           compatibility and is ignored
1991   --enable-native-coverage
1992                           enable native compilation with code coverage
1993                           data[disabled]
1994   --enable-dtrace[=yes/no/auto]
1995                           enable dtrace. Default is auto, where dtrace is
1996                           enabled if all dependencies are present.
1997   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1998   --disable-freetype-bundling
1999                           disable bundling of the freetype library with the
2000                           build result [enabled on Windows or when using
2001                           --with-freetype, disabled otherwise]
2002   --enable-jtreg-failure-handler
2003                           forces build of the jtreg failure handler to be
2004                           enabled, missing dependencies become fatal errors.
2005                           Default is auto, where the failure handler is built
2006                           if all dependencies are present and otherwise just
2007                           disabled.
2008   --disable-generate-classlist
2009                           forces enabling or disabling of the generation of a
2010                           CDS classlist at build time. Default is to generate
2011                           it when either the server or client JVMs are built.
2012   --enable-sjavac         use sjavac to do fast incremental compiles
2013                           [disabled]
2014   --disable-javac-server  disable javac server [enabled]
2015   --enable-icecc          enable distribted compilation of native code using
2016                           icecc/icecream [disabled]
2017   --disable-precompiled-headers
2018                           disable using precompiled headers when compiling C++
2019                           [enabled]
2020   --enable-ccache         enable using ccache to speed up recompilations
2021                           [disabled]
2022 
2023 Optional Packages:
2024   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2025   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2026   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2027                           support it), e.g. --with-target-bits=32 [guessed]
2028   --with-custom-make-dir  Deprecated. Option is kept for backwards
2029                           compatibility and is ignored
2030   --with-jdk-variant      JDK variant to build (normal) [normal]
2031   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2032                           optimized) [release]
2033   --with-jvm-variants     JVM variants (separated by commas) to build
2034                           (server,client,minimal,core,zero,zeroshark,custom)
2035                           [server]
2036   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2037                           (arm64,aarch64) [aarch64]
2038   --with-devkit           use this devkit for compilers, tools and resources
2039   --with-sys-root         alias for --with-sysroot for backwards compatability
2040   --with-sysroot          use this directory as sysroot
2041   --with-tools-dir        alias for --with-toolchain-path for backwards
2042                           compatibility
2043   --with-toolchain-path   prepend these directories when searching for
2044                           toolchain binaries (compilers etc)
2045   --with-extra-path       prepend these directories to the default path
2046   --with-sdk-name         use the platform SDK of the given name. [macosx]
2047   --with-conf-name        use this as the name of the configuration [generated
2048                           from important configuration options]
2049   --with-output-sync      set make output sync type if supported by make.
2050                           [recurse]
2051   --with-default-make-target
2052                           set the default make target [exploded-image]
2053   --with-cacerts-file     specify alternative cacerts file
2054   --with-copyright-year   Set copyright year value for build [current year]
2055   --with-milestone        Deprecated. Option is kept for backwards
2056                           compatibility and is ignored
2057   --with-update-version   Deprecated. Option is kept for backwards
2058                           compatibility and is ignored
2059   --with-user-release-suffix
2060                           Deprecated. Option is kept for backwards
2061                           compatibility and is ignored
2062   --with-build-number     Deprecated. Option is kept for backwards
2063                           compatibility and is ignored
2064   --with-version-string   Set version string [calculated]
2065   --with-version-pre      Set the base part of the version 'PRE' field
2066                           (pre-release identifier) ['internal']
2067   --with-version-opt      Set version 'OPT' field (build metadata)
2068                           [<timestamp>.<user>.<dirname>]
2069   --with-version-build    Set version 'BUILD' field (build number) [not
2070                           specified]
2071   --with-version-major    Set version 'MAJOR' field (first number) [current
2072                           source value]
2073   --with-version-minor    Set version 'MINOR' field (second number) [current
2074                           source value]
2075   --with-version-security Set version 'SECURITY' field (third number) [current
2076                           source value]
2077   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                           specified]
2079   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080   --with-build-jdk        path to JDK of same version as is being built[the
2081                           newly built JDK]
2082   --with-add-source-root  Deprecated. Option is kept for backwards
2083                           compatibility and is ignored
2084   --with-override-source-root
2085                           Deprecated. Option is kept for backwards
2086                           compatibility and is ignored
2087   --with-adds-and-overrides
2088                           Deprecated. Option is kept for backwards
2089                           compatibility and is ignored
2090   --with-override-langtools
2091                           Deprecated. Option is kept for backwards
2092                           compatibility and is ignored
2093   --with-override-corba   Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-jaxp    Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-override-jaxws   Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-override-hotspot Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-nashorn Deprecated. Option is kept for backwards
2102                           compatibility and is ignored
2103   --with-override-jdk     Deprecated. Option is kept for backwards
2104                           compatibility and is ignored
2105   --with-import_hotspot   Deprecated. Option is kept for backwards
2106                           compatibility and is ignored
2107   --with-import-modules   import a set of prebuilt modules either as a zip
2108                           file or an exploded directory
2109   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2110                           to show possible values [platform dependent]
2111   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2112   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2113   --with-extra-ldflags    extra flags to be used when linking jdk
2114   --with-toolchain-version
2115                           the version of the toolchain to look for, use
2116                           '--help' to show possible values [platform
2117                           dependent]
2118   --with-build-devkit     Devkit to use for the build platform toolchain
2119   --with-jtreg            Regression Test Harness [probed]
2120   --with-abi-profile      specify ABI profile for ARM builds
2121                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2122                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2123                           [toolchain dependent]
2124   --with-native-debug-symbols
2125                           set the native debug symbol configuration (none,
2126                           internal, external, zipped) [varying]
2127   --with-jvm-features     additional JVM features to enable (separated by
2128                           comma), use '--help' to show possible values [none]
2129   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2130                           compatibility and is ignored
2131   --with-stdc++lib=<static>,<dynamic>,<default>
2132                           force linking of the C++ runtime on Linux to either
2133                           static or dynamic, default is static with dynamic as
2134                           fallback
2135   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2136                           (Windows only) [probed]
2137   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2138                           (Windows only) [probed]
2139   --with-x                use the X Window System
2140   --with-cups             specify prefix directory for the cups package
2141                           (expecting the headers under PATH/include)
2142   --with-cups-include     specify directory for the cups include files
2143   --with-freetype         specify prefix directory for the freetype package
2144                           (expecting the libraries under PATH/lib and the
2145                           headers under PATH/include)
2146   --with-freetype-include specify directory for the freetype include files
2147   --with-freetype-lib     specify directory for the freetype library
2148   --with-freetype-src     specify directory with freetype sources to
2149                           automatically build the library (experimental,
2150                           Windows-only)
2151   --with-alsa             specify prefix directory for the alsa package
2152                           (expecting the libraries under PATH/lib and the
2153                           headers under PATH/include)
2154   --with-alsa-include     specify directory for the alsa include files
2155   --with-alsa-lib         specify directory for the alsa library
2156   --with-libffi           specify prefix directory for the libffi package
2157                           (expecting the libraries under PATH/lib and the
2158                           headers under PATH/include)
2159   --with-libffi-include   specify directory for the libffi include files
2160   --with-libffi-lib       specify directory for the libffi library
2161   --with-libjpeg          use libjpeg from build system or OpenJDK source
2162                           (system, bundled) [bundled]
2163   --with-giflib           use giflib from build system or OpenJDK source
2164                           (system, bundled) [bundled]
2165   --with-libpng           use libpng from build system or OpenJDK source
2166                           (system, bundled) [bundled]
2167   --with-zlib             use zlib from build system or OpenJDK source
2168                           (system, bundled) [bundled]
2169   --with-lcms             use lcms2 from build system or OpenJDK source
2170                           (system, bundled) [bundled]
2171   --with-dxsdk            Deprecated. Option is kept for backwards
2172                           compatibility and is ignored
2173   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2174                           compatibility and is ignored
2175   --with-dxsdk-include    Deprecated. Option is kept for backwards
2176                           compatibility and is ignored
2177   --with-num-cores        number of cores in the build system, e.g.
2178                           --with-num-cores=8 [probed]
2179   --with-memory-size      memory (in MB) available in the build system, e.g.
2180                           --with-memory-size=1024 [probed]
2181   --with-jobs             number of parallel jobs to let make run [calculated
2182                           based on cores and memory]
2183   --with-test-jobs        number of parallel tests jobs to run [based on build
2184                           jobs]
2185   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2186                           invocations of boot JDK, overriding the default
2187                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2188                           -enableassertions"
2189   --with-sjavac-server-java
2190                           use this java binary for running the sjavac
2191                           background server [Boot JDK java]
2192   --with-ccache-dir       where to store ccache files [~/.ccache]
2193 
2194 Some influential environment variables:
2195   BASENAME    Override default value for BASENAME
2196   BASH        Override default value for BASH
2197   CAT         Override default value for CAT
2198   CHMOD       Override default value for CHMOD
2199   CMP         Override default value for CMP
2200   COMM        Override default value for COMM
2201   CP          Override default value for CP
2202   CUT         Override default value for CUT
2203   DATE        Override default value for DATE
2204   DIFF        Override default value for DIFF
2205   DIRNAME     Override default value for DIRNAME
2206   ECHO        Override default value for ECHO
2207   EXPR        Override default value for EXPR
2208   FILE        Override default value for FILE
2209   FIND        Override default value for FIND
2210   HEAD        Override default value for HEAD
2211   GUNZIP      Override default value for GUNZIP
2212   GZIP        Override default value for GZIP
2213   LN          Override default value for LN
2214   LS          Override default value for LS
2215   MKDIR       Override default value for MKDIR
2216   MKTEMP      Override default value for MKTEMP
2217   MV          Override default value for MV
2218   NAWK        Override default value for NAWK
2219   PRINTF      Override default value for PRINTF
2220   RM          Override default value for RM
2221   RMDIR       Override default value for RMDIR
2222   SH          Override default value for SH
2223   SORT        Override default value for SORT
2224   TAIL        Override default value for TAIL
2225   TAR         Override default value for TAR
2226   TEE         Override default value for TEE
2227   TOUCH       Override default value for TOUCH
2228   TR          Override default value for TR
2229   UNAME       Override default value for UNAME
2230   UNIQ        Override default value for UNIQ
2231   WC          Override default value for WC
2232   WHICH       Override default value for WHICH
2233   XARGS       Override default value for XARGS
2234   AWK         Override default value for AWK
2235   GREP        Override default value for GREP
2236   EGREP       Override default value for EGREP
2237   FGREP       Override default value for FGREP
2238   SED         Override default value for SED
2239   CYGPATH     Override default value for CYGPATH
2240   READLINK    Override default value for READLINK
2241   DF          Override default value for DF
2242   CPIO        Override default value for CPIO
2243   NICE        Override default value for NICE
2244   MAKE        Override default value for MAKE
2245   UNZIP       Override default value for UNZIP
2246   ZIP         Override default value for ZIP
2247   LDD         Override default value for LDD
2248   OTOOL       Override default value for OTOOL
2249   READELF     Override default value for READELF
2250   HG          Override default value for HG
2251   STAT        Override default value for STAT
2252   TIME        Override default value for TIME
2253   DTRACE      Override default value for DTRACE
2254   PATCH       Override default value for PATCH
2255   DSYMUTIL    Override default value for DSYMUTIL
2256   XATTR       Override default value for XATTR
2257   CODESIGN    Override default value for CODESIGN
2258   SETFILE     Override default value for SETFILE
2259   PKG_CONFIG  path to pkg-config utility
2260   JAVA        Override default value for JAVA
2261   JAVAC       Override default value for JAVAC
2262   JAVAH       Override default value for JAVAH
2263   JAR         Override default value for JAR
2264   JARSIGNER   Override default value for JARSIGNER
2265   CC          C compiler command
2266   CFLAGS      C compiler flags
2267   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2268               nonstandard directory <lib dir>
2269   LIBS        libraries to pass to the linker, e.g. -l<library>
2270   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2271               you have headers in a nonstandard directory <include dir>
2272   CXX         C++ compiler command
2273   CXXFLAGS    C++ compiler flags
2274   CPP         C preprocessor
2275   CXXCPP      C++ preprocessor
2276   AS          Override default value for AS
2277   AR          Override default value for AR
2278   LIPO        Override default value for LIPO
2279   STRIP       Override default value for STRIP
2280   NM          Override default value for NM
2281   GNM         Override default value for GNM
2282   OBJCOPY     Override default value for OBJCOPY
2283   OBJDUMP     Override default value for OBJDUMP
2284   BUILD_CC    Override default value for BUILD_CC
2285   BUILD_CXX   Override default value for BUILD_CXX
2286   BUILD_NM    Override default value for BUILD_NM
2287   BUILD_AR    Override default value for BUILD_AR
2288   BUILD_OBJCOPY
2289               Override default value for BUILD_OBJCOPY
2290   BUILD_STRIP Override default value for BUILD_STRIP
2291   JTREGEXE    Override default value for JTREGEXE
2292   XMKMF       Path to xmkmf, Makefile generator for X Window System
2293   FREETYPE_CFLAGS
2294               C compiler flags for FREETYPE, overriding pkg-config
2295   FREETYPE_LIBS
2296               linker flags for FREETYPE, overriding pkg-config
2297   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2298   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2299   LIBFFI_CFLAGS
2300               C compiler flags for LIBFFI, overriding pkg-config
2301   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2302   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2303   PNG_LIBS    linker flags for PNG, overriding pkg-config
2304   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2305   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2306   ICECC_CMD   Override default value for ICECC_CMD
2307   ICECC_CREATE_ENV
2308               Override default value for ICECC_CREATE_ENV
2309   ICECC_WRAPPER
2310               Override default value for ICECC_WRAPPER
2311   CCACHE      Override default value for CCACHE
2312 
2313 Use these variables to override the choices made by `configure' or to help
2314 it to find libraries and programs with nonstandard names/locations.
2315 
2316 Report bugs to <build-dev@openjdk.java.net>.
2317 OpenJDK home page: <http://openjdk.java.net>.
2318 _ACEOF
2319 ac_status=$?
2320 fi
2321 
2322 if test "$ac_init_help" = "recursive"; then
2323   # If there are subdirs, report their specific --help.
2324   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2325     test -d "$ac_dir" ||
2326       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2327       continue
2328     ac_builddir=.
2329 
2330 case "$ac_dir" in
2331 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2332 *)
2333   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2334   # A ".." for each directory in $ac_dir_suffix.
2335   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2336   case $ac_top_builddir_sub in
2337   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2338   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2339   esac ;;
2340 esac
2341 ac_abs_top_builddir=$ac_pwd
2342 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2343 # for backward compatibility:
2344 ac_top_builddir=$ac_top_build_prefix
2345 
2346 case $srcdir in
2347   .)  # We are building in place.
2348     ac_srcdir=.
2349     ac_top_srcdir=$ac_top_builddir_sub
2350     ac_abs_top_srcdir=$ac_pwd ;;
2351   [\\/]* | ?:[\\/]* )  # Absolute name.
2352     ac_srcdir=$srcdir$ac_dir_suffix;
2353     ac_top_srcdir=$srcdir
2354     ac_abs_top_srcdir=$srcdir ;;
2355   *) # Relative name.
2356     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2357     ac_top_srcdir=$ac_top_build_prefix$srcdir
2358     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2359 esac
2360 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2361 
2362     cd "$ac_dir" || { ac_status=$?; continue; }
2363     # Check for guested configure.
2364     if test -f "$ac_srcdir/configure.gnu"; then
2365       echo &&
2366       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2367     elif test -f "$ac_srcdir/configure"; then
2368       echo &&
2369       $SHELL "$ac_srcdir/configure" --help=recursive
2370     else
2371       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2372     fi || ac_status=$?
2373     cd "$ac_pwd" || { ac_status=$?; break; }
2374   done
2375 fi
2376 
2377 test -n "$ac_init_help" && exit $ac_status
2378 if $ac_init_version; then
2379   cat <<\_ACEOF
2380 OpenJDK configure jdk9
2381 generated by GNU Autoconf 2.69
2382 
2383 Copyright (C) 2012 Free Software Foundation, Inc.
2384 This configure script is free software; the Free Software Foundation
2385 gives unlimited permission to copy, distribute and modify it.
2386 _ACEOF
2387   exit
2388 fi
2389 
2390 ## ------------------------ ##
2391 ## Autoconf initialization. ##
2392 ## ------------------------ ##
2393 
2394 # ac_fn_c_try_compile LINENO
2395 # --------------------------
2396 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2397 ac_fn_c_try_compile ()
2398 {
2399   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400   rm -f conftest.$ac_objext
2401   if { { ac_try="$ac_compile"
2402 case "(($ac_try" in
2403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404   *) ac_try_echo=$ac_try;;
2405 esac
2406 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407 $as_echo "$ac_try_echo"; } >&5
2408   (eval "$ac_compile") 2>conftest.err
2409   ac_status=$?
2410   if test -s conftest.err; then
2411     grep -v '^ *+' conftest.err >conftest.er1
2412     cat conftest.er1 >&5
2413     mv -f conftest.er1 conftest.err
2414   fi
2415   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416   test $ac_status = 0; } && {
2417          test -z "$ac_c_werror_flag" ||
2418          test ! -s conftest.err
2419        } && test -s conftest.$ac_objext; then :
2420   ac_retval=0
2421 else
2422   $as_echo "$as_me: failed program was:" >&5
2423 sed 's/^/| /' conftest.$ac_ext >&5
2424 
2425         ac_retval=1
2426 fi
2427   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2428   as_fn_set_status $ac_retval
2429 
2430 } # ac_fn_c_try_compile
2431 
2432 # ac_fn_cxx_try_compile LINENO
2433 # ----------------------------
2434 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2435 ac_fn_cxx_try_compile ()
2436 {
2437   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2438   rm -f conftest.$ac_objext
2439   if { { ac_try="$ac_compile"
2440 case "(($ac_try" in
2441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2442   *) ac_try_echo=$ac_try;;
2443 esac
2444 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2445 $as_echo "$ac_try_echo"; } >&5
2446   (eval "$ac_compile") 2>conftest.err
2447   ac_status=$?
2448   if test -s conftest.err; then
2449     grep -v '^ *+' conftest.err >conftest.er1
2450     cat conftest.er1 >&5
2451     mv -f conftest.er1 conftest.err
2452   fi
2453   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2454   test $ac_status = 0; } && {
2455          test -z "$ac_cxx_werror_flag" ||
2456          test ! -s conftest.err
2457        } && test -s conftest.$ac_objext; then :
2458   ac_retval=0
2459 else
2460   $as_echo "$as_me: failed program was:" >&5
2461 sed 's/^/| /' conftest.$ac_ext >&5
2462 
2463         ac_retval=1
2464 fi
2465   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2466   as_fn_set_status $ac_retval
2467 
2468 } # ac_fn_cxx_try_compile
2469 
2470 # ac_fn_c_try_cpp LINENO
2471 # ----------------------
2472 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2473 ac_fn_c_try_cpp ()
2474 {
2475   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476   if { { ac_try="$ac_cpp conftest.$ac_ext"
2477 case "(($ac_try" in
2478   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2479   *) ac_try_echo=$ac_try;;
2480 esac
2481 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2482 $as_echo "$ac_try_echo"; } >&5
2483   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2484   ac_status=$?
2485   if test -s conftest.err; then
2486     grep -v '^ *+' conftest.err >conftest.er1
2487     cat conftest.er1 >&5
2488     mv -f conftest.er1 conftest.err
2489   fi
2490   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2491   test $ac_status = 0; } > conftest.i && {
2492          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2493          test ! -s conftest.err
2494        }; then :
2495   ac_retval=0
2496 else
2497   $as_echo "$as_me: failed program was:" >&5
2498 sed 's/^/| /' conftest.$ac_ext >&5
2499 
2500     ac_retval=1
2501 fi
2502   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503   as_fn_set_status $ac_retval
2504 
2505 } # ac_fn_c_try_cpp
2506 
2507 # ac_fn_cxx_try_cpp LINENO
2508 # ------------------------
2509 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2510 ac_fn_cxx_try_cpp ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   if { { ac_try="$ac_cpp conftest.$ac_ext"
2514 case "(($ac_try" in
2515   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516   *) ac_try_echo=$ac_try;;
2517 esac
2518 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519 $as_echo "$ac_try_echo"; } >&5
2520   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2521   ac_status=$?
2522   if test -s conftest.err; then
2523     grep -v '^ *+' conftest.err >conftest.er1
2524     cat conftest.er1 >&5
2525     mv -f conftest.er1 conftest.err
2526   fi
2527   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2528   test $ac_status = 0; } > conftest.i && {
2529          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2530          test ! -s conftest.err
2531        }; then :
2532   ac_retval=0
2533 else
2534   $as_echo "$as_me: failed program was:" >&5
2535 sed 's/^/| /' conftest.$ac_ext >&5
2536 
2537     ac_retval=1
2538 fi
2539   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2540   as_fn_set_status $ac_retval
2541 
2542 } # ac_fn_cxx_try_cpp
2543 
2544 # ac_fn_c_try_link LINENO
2545 # -----------------------
2546 # Try to link conftest.$ac_ext, and return whether this succeeded.
2547 ac_fn_c_try_link ()
2548 {
2549   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2550   rm -f conftest.$ac_objext conftest$ac_exeext
2551   if { { ac_try="$ac_link"
2552 case "(($ac_try" in
2553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554   *) ac_try_echo=$ac_try;;
2555 esac
2556 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2557 $as_echo "$ac_try_echo"; } >&5
2558   (eval "$ac_link") 2>conftest.err
2559   ac_status=$?
2560   if test -s conftest.err; then
2561     grep -v '^ *+' conftest.err >conftest.er1
2562     cat conftest.er1 >&5
2563     mv -f conftest.er1 conftest.err
2564   fi
2565   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2566   test $ac_status = 0; } && {
2567          test -z "$ac_c_werror_flag" ||
2568          test ! -s conftest.err
2569        } && test -s conftest$ac_exeext && {
2570          test "$cross_compiling" = yes ||
2571          test -x conftest$ac_exeext
2572        }; then :
2573   ac_retval=0
2574 else
2575   $as_echo "$as_me: failed program was:" >&5
2576 sed 's/^/| /' conftest.$ac_ext >&5
2577 
2578         ac_retval=1
2579 fi
2580   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2581   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2582   # interfere with the next link command; also delete a directory that is
2583   # left behind by Apple's compiler.  We do this before executing the actions.
2584   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2585   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2586   as_fn_set_status $ac_retval
2587 
2588 } # ac_fn_c_try_link
2589 
2590 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2591 # ---------------------------------------------------------
2592 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2593 # the include files in INCLUDES and setting the cache variable VAR
2594 # accordingly.
2595 ac_fn_cxx_check_header_mongrel ()
2596 {
2597   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2598   if eval \${$3+:} false; then :
2599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2600 $as_echo_n "checking for $2... " >&6; }
2601 if eval \${$3+:} false; then :
2602   $as_echo_n "(cached) " >&6
2603 fi
2604 eval ac_res=\$$3
2605                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2606 $as_echo "$ac_res" >&6; }
2607 else
2608   # Is the header compilable?
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2610 $as_echo_n "checking $2 usability... " >&6; }
2611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612 /* end confdefs.h.  */
2613 $4
2614 #include <$2>
2615 _ACEOF
2616 if ac_fn_cxx_try_compile "$LINENO"; then :
2617   ac_header_compiler=yes
2618 else
2619   ac_header_compiler=no
2620 fi
2621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2623 $as_echo "$ac_header_compiler" >&6; }
2624 
2625 # Is the header present?
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2627 $as_echo_n "checking $2 presence... " >&6; }
2628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629 /* end confdefs.h.  */
2630 #include <$2>
2631 _ACEOF
2632 if ac_fn_cxx_try_cpp "$LINENO"; then :
2633   ac_header_preproc=yes
2634 else
2635   ac_header_preproc=no
2636 fi
2637 rm -f conftest.err conftest.i conftest.$ac_ext
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2639 $as_echo "$ac_header_preproc" >&6; }
2640 
2641 # So?  What about this header?
2642 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2643   yes:no: )
2644     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2645 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2646     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2647 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2648     ;;
2649   no:yes:* )
2650     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2651 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2652     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2653 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2654     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2655 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2656     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2657 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2658     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2659 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2660 ( $as_echo "## ----------------------------------------- ##
2661 ## Report this to build-dev@openjdk.java.net ##
2662 ## ----------------------------------------- ##"
2663      ) | sed "s/^/$as_me: WARNING:     /" >&2
2664     ;;
2665 esac
2666   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2667 $as_echo_n "checking for $2... " >&6; }
2668 if eval \${$3+:} false; then :
2669   $as_echo_n "(cached) " >&6
2670 else
2671   eval "$3=\$ac_header_compiler"
2672 fi
2673 eval ac_res=\$$3
2674                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2675 $as_echo "$ac_res" >&6; }
2676 fi
2677   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2678 
2679 } # ac_fn_cxx_check_header_mongrel
2680 
2681 # ac_fn_cxx_try_run LINENO
2682 # ------------------------
2683 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2684 # that executables *can* be run.
2685 ac_fn_cxx_try_run ()
2686 {
2687   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2688   if { { ac_try="$ac_link"
2689 case "(($ac_try" in
2690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691   *) ac_try_echo=$ac_try;;
2692 esac
2693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694 $as_echo "$ac_try_echo"; } >&5
2695   (eval "$ac_link") 2>&5
2696   ac_status=$?
2697   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2698   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2699   { { case "(($ac_try" in
2700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2701   *) ac_try_echo=$ac_try;;
2702 esac
2703 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2704 $as_echo "$ac_try_echo"; } >&5
2705   (eval "$ac_try") 2>&5
2706   ac_status=$?
2707   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2708   test $ac_status = 0; }; }; then :
2709   ac_retval=0
2710 else
2711   $as_echo "$as_me: program exited with status $ac_status" >&5
2712        $as_echo "$as_me: failed program was:" >&5
2713 sed 's/^/| /' conftest.$ac_ext >&5
2714 
2715        ac_retval=$ac_status
2716 fi
2717   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2718   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2719   as_fn_set_status $ac_retval
2720 
2721 } # ac_fn_cxx_try_run
2722 
2723 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2724 # ---------------------------------------------------------
2725 # Tests whether HEADER exists and can be compiled using the include files in
2726 # INCLUDES, setting the cache variable VAR accordingly.
2727 ac_fn_cxx_check_header_compile ()
2728 {
2729   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2731 $as_echo_n "checking for $2... " >&6; }
2732 if eval \${$3+:} false; then :
2733   $as_echo_n "(cached) " >&6
2734 else
2735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736 /* end confdefs.h.  */
2737 $4
2738 #include <$2>
2739 _ACEOF
2740 if ac_fn_cxx_try_compile "$LINENO"; then :
2741   eval "$3=yes"
2742 else
2743   eval "$3=no"
2744 fi
2745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2746 fi
2747 eval ac_res=\$$3
2748                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2749 $as_echo "$ac_res" >&6; }
2750   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2751 
2752 } # ac_fn_cxx_check_header_compile
2753 
2754 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2755 # ----------------------------------------------
2756 # Tries to find the compile-time value of EXPR in a program that includes
2757 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2758 # computed
2759 ac_fn_cxx_compute_int ()
2760 {
2761   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2762   if test "$cross_compiling" = yes; then
2763     # Depending upon the size, compute the lo and hi bounds.
2764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765 /* end confdefs.h.  */
2766 $4
2767 int
2768 main ()
2769 {
2770 static int test_array [1 - 2 * !(($2) >= 0)];
2771 test_array [0] = 0;
2772 return test_array [0];
2773 
2774   ;
2775   return 0;
2776 }
2777 _ACEOF
2778 if ac_fn_cxx_try_compile "$LINENO"; then :
2779   ac_lo=0 ac_mid=0
2780   while :; do
2781     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2782 /* end confdefs.h.  */
2783 $4
2784 int
2785 main ()
2786 {
2787 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2788 test_array [0] = 0;
2789 return test_array [0];
2790 
2791   ;
2792   return 0;
2793 }
2794 _ACEOF
2795 if ac_fn_cxx_try_compile "$LINENO"; then :
2796   ac_hi=$ac_mid; break
2797 else
2798   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2799                         if test $ac_lo -le $ac_mid; then
2800                           ac_lo= ac_hi=
2801                           break
2802                         fi
2803                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2804 fi
2805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2806   done
2807 else
2808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2809 /* end confdefs.h.  */
2810 $4
2811 int
2812 main ()
2813 {
2814 static int test_array [1 - 2 * !(($2) < 0)];
2815 test_array [0] = 0;
2816 return test_array [0];
2817 
2818   ;
2819   return 0;
2820 }
2821 _ACEOF
2822 if ac_fn_cxx_try_compile "$LINENO"; then :
2823   ac_hi=-1 ac_mid=-1
2824   while :; do
2825     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2826 /* end confdefs.h.  */
2827 $4
2828 int
2829 main ()
2830 {
2831 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2832 test_array [0] = 0;
2833 return test_array [0];
2834 
2835   ;
2836   return 0;
2837 }
2838 _ACEOF
2839 if ac_fn_cxx_try_compile "$LINENO"; then :
2840   ac_lo=$ac_mid; break
2841 else
2842   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2843                         if test $ac_mid -le $ac_hi; then
2844                           ac_lo= ac_hi=
2845                           break
2846                         fi
2847                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2848 fi
2849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850   done
2851 else
2852   ac_lo= ac_hi=
2853 fi
2854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855 fi
2856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2857 # Binary search between lo and hi bounds.
2858 while test "x$ac_lo" != "x$ac_hi"; do
2859   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861 /* end confdefs.h.  */
2862 $4
2863 int
2864 main ()
2865 {
2866 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2867 test_array [0] = 0;
2868 return test_array [0];
2869 
2870   ;
2871   return 0;
2872 }
2873 _ACEOF
2874 if ac_fn_cxx_try_compile "$LINENO"; then :
2875   ac_hi=$ac_mid
2876 else
2877   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2878 fi
2879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2880 done
2881 case $ac_lo in #((
2882 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2883 '') ac_retval=1 ;;
2884 esac
2885   else
2886     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887 /* end confdefs.h.  */
2888 $4
2889 static long int longval () { return $2; }
2890 static unsigned long int ulongval () { return $2; }
2891 #include <stdio.h>
2892 #include <stdlib.h>
2893 int
2894 main ()
2895 {
2896 
2897   FILE *f = fopen ("conftest.val", "w");
2898   if (! f)
2899     return 1;
2900   if (($2) < 0)
2901     {
2902       long int i = longval ();
2903       if (i != ($2))
2904         return 1;
2905       fprintf (f, "%ld", i);
2906     }
2907   else
2908     {
2909       unsigned long int i = ulongval ();
2910       if (i != ($2))
2911         return 1;
2912       fprintf (f, "%lu", i);
2913     }
2914   /* Do not output a trailing newline, as this causes \r\n confusion
2915      on some platforms.  */
2916   return ferror (f) || fclose (f) != 0;
2917 
2918   ;
2919   return 0;
2920 }
2921 _ACEOF
2922 if ac_fn_cxx_try_run "$LINENO"; then :
2923   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2924 else
2925   ac_retval=1
2926 fi
2927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2928   conftest.$ac_objext conftest.beam conftest.$ac_ext
2929 rm -f conftest.val
2930 
2931   fi
2932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2933   as_fn_set_status $ac_retval
2934 
2935 } # ac_fn_cxx_compute_int
2936 
2937 # ac_fn_cxx_try_link LINENO
2938 # -------------------------
2939 # Try to link conftest.$ac_ext, and return whether this succeeded.
2940 ac_fn_cxx_try_link ()
2941 {
2942   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2943   rm -f conftest.$ac_objext conftest$ac_exeext
2944   if { { ac_try="$ac_link"
2945 case "(($ac_try" in
2946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2947   *) ac_try_echo=$ac_try;;
2948 esac
2949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2950 $as_echo "$ac_try_echo"; } >&5
2951   (eval "$ac_link") 2>conftest.err
2952   ac_status=$?
2953   if test -s conftest.err; then
2954     grep -v '^ *+' conftest.err >conftest.er1
2955     cat conftest.er1 >&5
2956     mv -f conftest.er1 conftest.err
2957   fi
2958   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2959   test $ac_status = 0; } && {
2960          test -z "$ac_cxx_werror_flag" ||
2961          test ! -s conftest.err
2962        } && test -s conftest$ac_exeext && {
2963          test "$cross_compiling" = yes ||
2964          test -x conftest$ac_exeext
2965        }; then :
2966   ac_retval=0
2967 else
2968   $as_echo "$as_me: failed program was:" >&5
2969 sed 's/^/| /' conftest.$ac_ext >&5
2970 
2971         ac_retval=1
2972 fi
2973   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2974   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2975   # interfere with the next link command; also delete a directory that is
2976   # left behind by Apple's compiler.  We do this before executing the actions.
2977   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2978   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2979   as_fn_set_status $ac_retval
2980 
2981 } # ac_fn_cxx_try_link
2982 
2983 # ac_fn_cxx_check_func LINENO FUNC VAR
2984 # ------------------------------------
2985 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2986 ac_fn_cxx_check_func ()
2987 {
2988   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2990 $as_echo_n "checking for $2... " >&6; }
2991 if eval \${$3+:} false; then :
2992   $as_echo_n "(cached) " >&6
2993 else
2994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2995 /* end confdefs.h.  */
2996 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2997    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2998 #define $2 innocuous_$2
2999 
3000 /* System header to define __stub macros and hopefully few prototypes,
3001     which can conflict with char $2 (); below.
3002     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3003     <limits.h> exists even on freestanding compilers.  */
3004 
3005 #ifdef __STDC__
3006 # include <limits.h>
3007 #else
3008 # include <assert.h>
3009 #endif
3010 
3011 #undef $2
3012 
3013 /* Override any GCC internal prototype to avoid an error.
3014    Use char because int might match the return type of a GCC
3015    builtin and then its argument prototype would still apply.  */
3016 #ifdef __cplusplus
3017 extern "C"
3018 #endif
3019 char $2 ();
3020 /* The GNU C library defines this for functions which it implements
3021     to always fail with ENOSYS.  Some functions are actually named
3022     something starting with __ and the normal name is an alias.  */
3023 #if defined __stub_$2 || defined __stub___$2
3024 choke me
3025 #endif
3026 
3027 int
3028 main ()
3029 {
3030 return $2 ();
3031   ;
3032   return 0;
3033 }
3034 _ACEOF
3035 if ac_fn_cxx_try_link "$LINENO"; then :
3036   eval "$3=yes"
3037 else
3038   eval "$3=no"
3039 fi
3040 rm -f core conftest.err conftest.$ac_objext \
3041     conftest$ac_exeext conftest.$ac_ext
3042 fi
3043 eval ac_res=\$$3
3044                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3045 $as_echo "$ac_res" >&6; }
3046   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3047 
3048 } # ac_fn_cxx_check_func
3049 
3050 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3051 # -------------------------------------------------------
3052 # Tests whether HEADER exists and can be compiled using the include files in
3053 # INCLUDES, setting the cache variable VAR accordingly.
3054 ac_fn_c_check_header_compile ()
3055 {
3056   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3058 $as_echo_n "checking for $2... " >&6; }
3059 if eval \${$3+:} false; then :
3060   $as_echo_n "(cached) " >&6
3061 else
3062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3063 /* end confdefs.h.  */
3064 $4
3065 #include <$2>
3066 _ACEOF
3067 if ac_fn_c_try_compile "$LINENO"; then :
3068   eval "$3=yes"
3069 else
3070   eval "$3=no"
3071 fi
3072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3073 fi
3074 eval ac_res=\$$3
3075                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3076 $as_echo "$ac_res" >&6; }
3077   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3078 
3079 } # ac_fn_c_check_header_compile
3080 cat >config.log <<_ACEOF
3081 This file contains any messages produced by compilers while
3082 running configure, to aid debugging if configure makes a mistake.
3083 
3084 It was created by OpenJDK $as_me jdk9, which was
3085 generated by GNU Autoconf 2.69.  Invocation command line was
3086 
3087   $ $0 $@
3088 
3089 _ACEOF
3090 exec 5>>config.log
3091 {
3092 cat <<_ASUNAME
3093 ## --------- ##
3094 ## Platform. ##
3095 ## --------- ##
3096 
3097 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3098 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3099 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3100 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3101 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3102 
3103 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3104 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3105 
3106 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3107 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3108 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3109 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3110 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3111 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3112 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3113 
3114 _ASUNAME
3115 
3116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3117 for as_dir in $PATH
3118 do
3119   IFS=$as_save_IFS
3120   test -z "$as_dir" && as_dir=.
3121     $as_echo "PATH: $as_dir"
3122   done
3123 IFS=$as_save_IFS
3124 
3125 } >&5
3126 
3127 cat >&5 <<_ACEOF
3128 
3129 
3130 ## ----------- ##
3131 ## Core tests. ##
3132 ## ----------- ##
3133 
3134 _ACEOF
3135 
3136 
3137 # Keep a trace of the command line.
3138 # Strip out --no-create and --no-recursion so they do not pile up.
3139 # Strip out --silent because we don't want to record it for future runs.
3140 # Also quote any args containing shell meta-characters.
3141 # Make two passes to allow for proper duplicate-argument suppression.
3142 ac_configure_args=
3143 ac_configure_args0=
3144 ac_configure_args1=
3145 ac_must_keep_next=false
3146 for ac_pass in 1 2
3147 do
3148   for ac_arg
3149   do
3150     case $ac_arg in
3151     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3152     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3153     | -silent | --silent | --silen | --sile | --sil)
3154       continue ;;
3155     *\'*)
3156       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3157     esac
3158     case $ac_pass in
3159     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3160     2)
3161       as_fn_append ac_configure_args1 " '$ac_arg'"
3162       if test $ac_must_keep_next = true; then
3163         ac_must_keep_next=false # Got value, back to normal.
3164       else
3165         case $ac_arg in
3166           *=* | --config-cache | -C | -disable-* | --disable-* \
3167           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3168           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3169           | -with-* | --with-* | -without-* | --without-* | --x)
3170             case "$ac_configure_args0 " in
3171               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3172             esac
3173             ;;
3174           -* ) ac_must_keep_next=true ;;
3175         esac
3176       fi
3177       as_fn_append ac_configure_args " '$ac_arg'"
3178       ;;
3179     esac
3180   done
3181 done
3182 { ac_configure_args0=; unset ac_configure_args0;}
3183 { ac_configure_args1=; unset ac_configure_args1;}
3184 
3185 # When interrupted or exit'd, cleanup temporary files, and complete
3186 # config.log.  We remove comments because anyway the quotes in there
3187 # would cause problems or look ugly.
3188 # WARNING: Use '\'' to represent an apostrophe within the trap.
3189 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3190 trap 'exit_status=$?
3191   # Save into config.log some information that might help in debugging.
3192   {
3193     echo
3194 
3195     $as_echo "## ---------------- ##
3196 ## Cache variables. ##
3197 ## ---------------- ##"
3198     echo
3199     # The following way of writing the cache mishandles newlines in values,
3200 (
3201   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3202     eval ac_val=\$$ac_var
3203     case $ac_val in #(
3204     *${as_nl}*)
3205       case $ac_var in #(
3206       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3207 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3208       esac
3209       case $ac_var in #(
3210       _ | IFS | as_nl) ;; #(
3211       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3212       *) { eval $ac_var=; unset $ac_var;} ;;
3213       esac ;;
3214     esac
3215   done
3216   (set) 2>&1 |
3217     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3218     *${as_nl}ac_space=\ *)
3219       sed -n \
3220         "s/'\''/'\''\\\\'\'''\''/g;
3221           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3222       ;; #(
3223     *)
3224       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3225       ;;
3226     esac |
3227     sort
3228 )
3229     echo
3230 
3231     $as_echo "## ----------------- ##
3232 ## Output variables. ##
3233 ## ----------------- ##"
3234     echo
3235     for ac_var in $ac_subst_vars
3236     do
3237       eval ac_val=\$$ac_var
3238       case $ac_val in
3239       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3240       esac
3241       $as_echo "$ac_var='\''$ac_val'\''"
3242     done | sort
3243     echo
3244 
3245     if test -n "$ac_subst_files"; then
3246       $as_echo "## ------------------- ##
3247 ## File substitutions. ##
3248 ## ------------------- ##"
3249       echo
3250       for ac_var in $ac_subst_files
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     fi
3260 
3261     if test -s confdefs.h; then
3262       $as_echo "## ----------- ##
3263 ## confdefs.h. ##
3264 ## ----------- ##"
3265       echo
3266       cat confdefs.h
3267       echo
3268     fi
3269     test "$ac_signal" != 0 &&
3270       $as_echo "$as_me: caught signal $ac_signal"
3271     $as_echo "$as_me: exit $exit_status"
3272   } >&5
3273   rm -f core *.core core.conftest.* &&
3274     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3275     exit $exit_status
3276 ' 0
3277 for ac_signal in 1 2 13 15; do
3278   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3279 done
3280 ac_signal=0
3281 
3282 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3283 rm -f -r conftest* confdefs.h
3284 
3285 $as_echo "/* confdefs.h */" > confdefs.h
3286 
3287 # Predefined preprocessor variables.
3288 
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_NAME "$PACKAGE_NAME"
3291 _ACEOF
3292 
3293 cat >>confdefs.h <<_ACEOF
3294 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3295 _ACEOF
3296 
3297 cat >>confdefs.h <<_ACEOF
3298 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3299 _ACEOF
3300 
3301 cat >>confdefs.h <<_ACEOF
3302 #define PACKAGE_STRING "$PACKAGE_STRING"
3303 _ACEOF
3304 
3305 cat >>confdefs.h <<_ACEOF
3306 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3307 _ACEOF
3308 
3309 cat >>confdefs.h <<_ACEOF
3310 #define PACKAGE_URL "$PACKAGE_URL"
3311 _ACEOF
3312 
3313 
3314 # Let the site file select an alternate cache file if it wants to.
3315 # Prefer an explicitly selected file to automatically selected ones.
3316 ac_site_file1=NONE
3317 ac_site_file2=NONE
3318 if test -n "$CONFIG_SITE"; then
3319   # We do not want a PATH search for config.site.
3320   case $CONFIG_SITE in #((
3321     -*)  ac_site_file1=./$CONFIG_SITE;;
3322     */*) ac_site_file1=$CONFIG_SITE;;
3323     *)   ac_site_file1=./$CONFIG_SITE;;
3324   esac
3325 elif test "x$prefix" != xNONE; then
3326   ac_site_file1=$prefix/share/config.site
3327   ac_site_file2=$prefix/etc/config.site
3328 else
3329   ac_site_file1=$ac_default_prefix/share/config.site
3330   ac_site_file2=$ac_default_prefix/etc/config.site
3331 fi
3332 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3333 do
3334   test "x$ac_site_file" = xNONE && continue
3335   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3336     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3337 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3338     sed 's/^/| /' "$ac_site_file" >&5
3339     . "$ac_site_file" \
3340       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3342 as_fn_error $? "failed to load site script $ac_site_file
3343 See \`config.log' for more details" "$LINENO" 5; }
3344   fi
3345 done
3346 
3347 if test -r "$cache_file"; then
3348   # Some versions of bash will fail to source /dev/null (special files
3349   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3350   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3351     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3352 $as_echo "$as_me: loading cache $cache_file" >&6;}
3353     case $cache_file in
3354       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3355       *)                      . "./$cache_file";;
3356     esac
3357   fi
3358 else
3359   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3360 $as_echo "$as_me: creating cache $cache_file" >&6;}
3361   >$cache_file
3362 fi
3363 
3364 # Check that the precious variables saved in the cache have kept the same
3365 # value.
3366 ac_cache_corrupted=false
3367 for ac_var in $ac_precious_vars; do
3368   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3369   eval ac_new_set=\$ac_env_${ac_var}_set
3370   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3371   eval ac_new_val=\$ac_env_${ac_var}_value
3372   case $ac_old_set,$ac_new_set in
3373     set,)
3374       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3375 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3376       ac_cache_corrupted=: ;;
3377     ,set)
3378       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3379 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3380       ac_cache_corrupted=: ;;
3381     ,);;
3382     *)
3383       if test "x$ac_old_val" != "x$ac_new_val"; then
3384         # differences in whitespace do not lead to failure.
3385         ac_old_val_w=`echo x $ac_old_val`
3386         ac_new_val_w=`echo x $ac_new_val`
3387         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3388           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3389 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3390           ac_cache_corrupted=:
3391         else
3392           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3393 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3394           eval $ac_var=\$ac_old_val
3395         fi
3396         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3397 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3398         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3399 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3400       fi;;
3401   esac
3402   # Pass precious variables to config.status.
3403   if test "$ac_new_set" = set; then
3404     case $ac_new_val in
3405     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3406     *) ac_arg=$ac_var=$ac_new_val ;;
3407     esac
3408     case " $ac_configure_args " in
3409       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3410       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3411     esac
3412   fi
3413 done
3414 if $ac_cache_corrupted; then
3415   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3417   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3418 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3419   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3420 fi
3421 ## -------------------- ##
3422 ## Main body of script. ##
3423 ## -------------------- ##
3424 
3425 ac_ext=c
3426 ac_cpp='$CPP $CPPFLAGS'
3427 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3428 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3429 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3430 
3431 
3432 
3433 ac_aux_dir=
3434 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3435   if test -f "$ac_dir/install-sh"; then
3436     ac_aux_dir=$ac_dir
3437     ac_install_sh="$ac_aux_dir/install-sh -c"
3438     break
3439   elif test -f "$ac_dir/install.sh"; then
3440     ac_aux_dir=$ac_dir
3441     ac_install_sh="$ac_aux_dir/install.sh -c"
3442     break
3443   elif test -f "$ac_dir/shtool"; then
3444     ac_aux_dir=$ac_dir
3445     ac_install_sh="$ac_aux_dir/shtool install -c"
3446     break
3447   fi
3448 done
3449 if test -z "$ac_aux_dir"; then
3450   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
3451 fi
3452 
3453 # These three variables are undocumented and unsupported,
3454 # and are intended to be withdrawn in a future Autoconf release.
3455 # They can cause serious problems if a builder's source tree is in a directory
3456 # whose full name contains unusual characters.
3457 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3458 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3459 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3460 
3461 
3462 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3463 
3464 #
3465 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3466 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3467 #
3468 # This code is free software; you can redistribute it and/or modify it
3469 # under the terms of the GNU General Public License version 2 only, as
3470 # published by the Free Software Foundation.  Oracle designates this
3471 # particular file as subject to the "Classpath" exception as provided
3472 # by Oracle in the LICENSE file that accompanied this code.
3473 #
3474 # This code is distributed in the hope that it will be useful, but WITHOUT
3475 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3476 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3477 # version 2 for more details (a copy is included in the LICENSE file that
3478 # accompanied this code).
3479 #
3480 # You should have received a copy of the GNU General Public License version
3481 # 2 along with this work; if not, write to the Free Software Foundation,
3482 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3483 #
3484 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3485 # or visit www.oracle.com if you need additional information or have any
3486 # questions.
3487 #
3488 
3489 #
3490 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3491 #
3492 # This program is free software; you can redistribute it and/or modify
3493 # it under the terms of the GNU General Public License as published by
3494 # the Free Software Foundation; either version 2 of the License, or
3495 # (at your option) any later version.
3496 #
3497 # This program is distributed in the hope that it will be useful, but
3498 # WITHOUT ANY WARRANTY; without even the implied warranty of
3499 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3500 # General Public License for more details.
3501 #
3502 # You should have received a copy of the GNU General Public License
3503 # along with this program; if not, write to the Free Software
3504 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3505 #
3506 # As a special exception to the GNU General Public License, if you
3507 # distribute this file as part of a program that contains a
3508 # configuration script generated by Autoconf, you may include it under
3509 # the same distribution terms that you use for the rest of that program.
3510 
3511 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3512 # ----------------------------------
3513 # PKG_PROG_PKG_CONFIG
3514 
3515 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3516 #
3517 # Check to see whether a particular set of modules exists.  Similar
3518 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3519 #
3520 #
3521 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3522 # this or PKG_CHECK_MODULES is called, or make sure to call
3523 # PKG_CHECK_EXISTS manually
3524 # --------------------------------------------------------------
3525 
3526 
3527 
3528 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3529 # ---------------------------------------------
3530 # _PKG_CONFIG
3531 
3532 # _PKG_SHORT_ERRORS_SUPPORTED
3533 # -----------------------------
3534 # _PKG_SHORT_ERRORS_SUPPORTED
3535 
3536 
3537 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3538 # [ACTION-IF-NOT-FOUND])
3539 #
3540 #
3541 # Note that if there is a possibility the first call to
3542 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3543 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3544 #
3545 #
3546 # --------------------------------------------------------------
3547 # PKG_CHECK_MODULES
3548 
3549 
3550 # Include these first...
3551 #
3552 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3553 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3554 #
3555 # This code is free software; you can redistribute it and/or modify it
3556 # under the terms of the GNU General Public License version 2 only, as
3557 # published by the Free Software Foundation.  Oracle designates this
3558 # particular file as subject to the "Classpath" exception as provided
3559 # by Oracle in the LICENSE file that accompanied this code.
3560 #
3561 # This code is distributed in the hope that it will be useful, but WITHOUT
3562 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3563 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3564 # version 2 for more details (a copy is included in the LICENSE file that
3565 # accompanied this code).
3566 #
3567 # You should have received a copy of the GNU General Public License version
3568 # 2 along with this work; if not, write to the Free Software Foundation,
3569 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3570 #
3571 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3572 # or visit www.oracle.com if you need additional information or have any
3573 # questions.
3574 #
3575 
3576 # Create a function/macro that takes a series of named arguments. The call is
3577 # similar to AC_DEFUN, but the setup of the function looks like this:
3578 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3579 # ... do something
3580 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3581 # ])
3582 # A star (*) in front of a named argument means that it is required and it's
3583 # presence will be verified. To pass e.g. the first value as a normal indexed
3584 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3585 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3586 # "ARG_FOO".
3587 #
3588 # The generated function can be called like this:
3589 # MYFUNC(FOO: [foo-val],
3590 #     BAR: [
3591 #         $ECHO hello world
3592 #     ])
3593 # Note that the argument value must start on the same line as the argument name.
3594 #
3595 # Argument 1: Name of the function to define
3596 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3597 # Argument 3: Argument array to treat as named, typically $@
3598 # Argument 4: The main function body
3599 
3600 
3601 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3602 # If so, then append $1 to $2 \
3603 # Also set JVM_ARG_OK to true/false depending on outcome.
3604 
3605 
3606 # Appends a string to a path variable, only adding the : when needed.
3607 
3608 
3609 # Prepends a string to a path variable, only adding the : when needed.
3610 
3611 
3612 # This will make sure the given variable points to a full and proper
3613 # path. This means:
3614 # 1) There will be no spaces in the path. On unix platforms,
3615 #    spaces in the path will result in an error. On Windows,
3616 #    the path will be rewritten using short-style to be space-free.
3617 # 2) The path will be absolute, and it will be in unix-style (on
3618 #     cygwin).
3619 # $1: The name of the variable to fix
3620 
3621 
3622 # This will make sure the given variable points to a executable
3623 # with a full and proper path. This means:
3624 # 1) There will be no spaces in the path. On unix platforms,
3625 #    spaces in the path will result in an error. On Windows,
3626 #    the path will be rewritten using short-style to be space-free.
3627 # 2) The path will be absolute, and it will be in unix-style (on
3628 #     cygwin).
3629 # Any arguments given to the executable is preserved.
3630 # If the input variable does not have a directory specification, then
3631 # it need to be in the PATH.
3632 # $1: The name of the variable to fix
3633 
3634 
3635 
3636 
3637 # Register a --with argument but mark it as deprecated
3638 # $1: The name of the with argument to deprecate, not including --with-
3639 
3640 
3641 # Register a --enable argument but mark it as deprecated
3642 # $1: The name of the with argument to deprecate, not including --enable-
3643 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3644 # $3: Messages to user.
3645 
3646 
3647 
3648 
3649 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3650 # $1: variable to check
3651 
3652 
3653 # Check that there are no unprocessed overridden variables left.
3654 # If so, they are an incorrect argument and we will exit with an error.
3655 
3656 
3657 # Setup a tool for the given variable. If correctly specified by the user,
3658 # use that value, otherwise search for the tool using the supplied code snippet.
3659 # $1: variable to set
3660 # $2: code snippet to call to look for the tool
3661 # $3: code snippet to call if variable was used to find tool
3662 
3663 
3664 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3665 # $1: variable to set
3666 # $2: executable name (or list of names) to look for
3667 # $3: [path]
3668 
3669 
3670 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3671 # $1: variable to set
3672 # $2: executable name (or list of names) to look for
3673 
3674 
3675 # Like BASIC_PATH_PROGS but fails if no tool was found.
3676 # $1: variable to set
3677 # $2: executable name (or list of names) to look for
3678 # $3: [path]
3679 
3680 
3681 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3682 # $1: variable to set
3683 # $2: autoconf macro to call to look for the special tool
3684 
3685 
3686 # Setup the most fundamental tools that relies on not much else to set up,
3687 # but is used by much of the early bootstrap code.
3688 
3689 
3690 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3691 
3692 
3693 # Evaluates platform specific overrides for devkit variables.
3694 # $1: Name of variable
3695 
3696 
3697 
3698 
3699 
3700 
3701 #%%% Simple tools %%%
3702 
3703 # Check if we have found a usable version of make
3704 # $1: the path to a potential make binary (or empty)
3705 # $2: the description on how we found this
3706 
3707 
3708 
3709 
3710 # Goes looking for a usable version of GNU make.
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 # Check if build directory is on local disk. If not possible to determine,
3720 # we prefer to claim it's local.
3721 # Argument 1: directory to test
3722 # Argument 2: what to do if it is on local disk
3723 # Argument 3: what to do otherwise (remote disk or failure)
3724 
3725 
3726 # Check that source files have basic read permissions set. This might
3727 # not be the case in cygwin in certain conditions.
3728 
3729 
3730 
3731 
3732 # Check for support for specific options in bash
3733 
3734 
3735 ################################################################################
3736 #
3737 # Default make target
3738 #
3739 
3740 
3741 # Code to run after AC_OUTPUT
3742 
3743 
3744 #
3745 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3746 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3747 #
3748 # This code is free software; you can redistribute it and/or modify it
3749 # under the terms of the GNU General Public License version 2 only, as
3750 # published by the Free Software Foundation.  Oracle designates this
3751 # particular file as subject to the "Classpath" exception as provided
3752 # by Oracle in the LICENSE file that accompanied this code.
3753 #
3754 # This code is distributed in the hope that it will be useful, but WITHOUT
3755 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3756 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3757 # version 2 for more details (a copy is included in the LICENSE file that
3758 # accompanied this code).
3759 #
3760 # You should have received a copy of the GNU General Public License version
3761 # 2 along with this work; if not, write to the Free Software Foundation,
3762 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3763 #
3764 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3765 # or visit www.oracle.com if you need additional information or have any
3766 # questions.
3767 #
3768 
3769 
3770 
3771 
3772 
3773 # Helper function which possibly converts a path using DOS-style short mode.
3774 # If so, the updated path is stored in $new_path.
3775 # $1: The path to check
3776 
3777 
3778 # Helper function which possibly converts a path using DOS-style short mode.
3779 # If so, the updated path is stored in $new_path.
3780 # $1: The path to check
3781 
3782 
3783 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3784 # and could probably be heavily simplified. However, all changes in this
3785 # area tend to need lot of testing in different scenarios, and in lack of
3786 # proper unit testing, cleaning this up has not been deemed worth the effort
3787 # at the moment.
3788 
3789 
3790 
3791 
3792 
3793 
3794 
3795 
3796 
3797 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3798 
3799 
3800 
3801 
3802 # ... then the rest
3803 #
3804 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3805 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3806 #
3807 # This code is free software; you can redistribute it and/or modify it
3808 # under the terms of the GNU General Public License version 2 only, as
3809 # published by the Free Software Foundation.  Oracle designates this
3810 # particular file as subject to the "Classpath" exception as provided
3811 # by Oracle in the LICENSE file that accompanied this code.
3812 #
3813 # This code is distributed in the hope that it will be useful, but WITHOUT
3814 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3815 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3816 # version 2 for more details (a copy is included in the LICENSE file that
3817 # accompanied this code).
3818 #
3819 # You should have received a copy of the GNU General Public License version
3820 # 2 along with this work; if not, write to the Free Software Foundation,
3821 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3822 #
3823 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3824 # or visit www.oracle.com if you need additional information or have any
3825 # questions.
3826 #
3827 
3828 ########################################################################
3829 # This file handles detection of the Boot JDK. The Boot JDK detection
3830 # process has been developed as a response to solve a complex real-world
3831 # problem. Initially, it was simple, but it has grown as platform after
3832 # platform, idiosyncracy after idiosyncracy has been supported.
3833 #
3834 # The basic idea is this:
3835 # 1) You need an acceptable *) JDK to use as a Boot JDK
3836 # 2) There are several ways to locate a JDK, that are mostly platform
3837 #    dependent **)
3838 # 3) You can have multiple JDKs installed
3839 # 4) If possible, configure should try to dig out an acceptable JDK
3840 #    automatically, without having to resort to command-line options
3841 #
3842 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3843 #     javac) and not a JRE, etc.
3844 #
3845 # **) On Windows we typically use a well-known path.
3846 #     On MacOSX we typically use the tool java_home.
3847 #     On Linux we typically find javac in the $PATH, and then follow a
3848 #     chain of symlinks that often ends up in a real JDK.
3849 #
3850 # This leads to the code where we check in different ways to locate a
3851 # JDK, and if one is found, check if it is acceptable. If not, we print
3852 # our reasons for rejecting it (useful when debugging non-working
3853 # configure situations) and continue checking the next one.
3854 ########################################################################
3855 
3856 # Execute the check given as argument, and verify the result
3857 # If the Boot JDK was previously found, do nothing
3858 # $1 A command line (typically autoconf macro) to execute
3859 
3860 
3861 # Test: Is bootjdk explicitely set by command line arguments?
3862 
3863 
3864 # Test: Is $JAVA_HOME set?
3865 
3866 
3867 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3868 
3869 
3870 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3871 # $1: Argument to the java_home binary (optional)
3872 
3873 
3874 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3875 
3876 
3877 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3878 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3879 # $1 = Path to directory containing jdk installations.
3880 # $2 = String to append to the found JDK directory to get the proper JDK home
3881 
3882 
3883 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3884 # environmental variable as base for where to look.
3885 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3886 
3887 
3888 # Test: Is there a JDK installed in default, well-known locations?
3889 
3890 
3891 # Check that a command-line tool in the Boot JDK is correct
3892 # $1 = name of variable to assign
3893 # $2 = name of binary
3894 
3895 
3896 ###############################################################################
3897 #
3898 # We need a Boot JDK to bootstrap the build.
3899 #
3900 
3901 
3902 
3903 
3904 
3905 # BUILD_JDK: the location of the latest JDK that can run
3906 #   on the host system and supports the target class file version
3907 #   generated in this JDK build.  This variable should only be
3908 #   used after the launchers are built.
3909 #
3910 
3911 # Execute the check given as argument, and verify the result.
3912 # If the JDK was previously found, do nothing.
3913 # $1 A command line (typically autoconf macro) to execute
3914 
3915 
3916 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3917 # is different than the host system doing the build (e.g. cross-compilation),
3918 # a special BUILD_JDK is built as part of the build process.  An external
3919 # prebuilt BUILD_JDK can also be supplied.
3920 
3921 
3922 #
3923 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3924 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3925 #
3926 # This code is free software; you can redistribute it and/or modify it
3927 # under the terms of the GNU General Public License version 2 only, as
3928 # published by the Free Software Foundation.  Oracle designates this
3929 # particular file as subject to the "Classpath" exception as provided
3930 # by Oracle in the LICENSE file that accompanied this code.
3931 #
3932 # This code is distributed in the hope that it will be useful, but WITHOUT
3933 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3934 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3935 # version 2 for more details (a copy is included in the LICENSE file that
3936 # accompanied this code).
3937 #
3938 # You should have received a copy of the GNU General Public License version
3939 # 2 along with this work; if not, write to the Free Software Foundation,
3940 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3941 #
3942 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3943 # or visit www.oracle.com if you need additional information or have any
3944 # questions.
3945 #
3946 
3947 
3948 
3949 
3950 
3951 
3952 
3953 
3954 
3955 
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 ################################################################################
3964 #
3965 # Runs icecc-create-env once and prints the error if it fails
3966 #
3967 # $1: arguments to icecc-create-env
3968 # $2: log file
3969 #
3970 
3971 
3972 ################################################################################
3973 #
3974 # Optionally enable distributed compilation of native code using icecc/icecream
3975 #
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 #
3984 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3985 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3986 #
3987 # This code is free software; you can redistribute it and/or modify it
3988 # under the terms of the GNU General Public License version 2 only, as
3989 # published by the Free Software Foundation.  Oracle designates this
3990 # particular file as subject to the "Classpath" exception as provided
3991 # by Oracle in the LICENSE file that accompanied this code.
3992 #
3993 # This code is distributed in the hope that it will be useful, but WITHOUT
3994 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3995 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3996 # version 2 for more details (a copy is included in the LICENSE file that
3997 # accompanied this code).
3998 #
3999 # You should have received a copy of the GNU General Public License version
4000 # 2 along with this work; if not, write to the Free Software Foundation,
4001 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4002 #
4003 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4004 # or visit www.oracle.com if you need additional information or have any
4005 # questions.
4006 #
4007 
4008 ################################################################################
4009 #
4010 # Setup ABI profile (for arm)
4011 #
4012 
4013 
4014 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4015 # corresponding configure arguments instead
4016 
4017 
4018 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4019 # that configure can use them while detecting compilers.
4020 # TOOLCHAIN_TYPE is available here.
4021 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4022 
4023 
4024 
4025 
4026 
4027 
4028 # Documentation on common flags used for solstudio in HIGHEST.
4029 #
4030 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4031 #          done with care, there are some assumptions below that need to
4032 #          be understood about the use of pointers, and IEEE behavior.
4033 #
4034 # -fns: Use non-standard floating point mode (not IEEE 754)
4035 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4036 # -fsingle: Use single precision floating point with 'float'
4037 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4038 #   (Source with excessing pointer casting and data access with mixed
4039 #    pointer types are not recommended)
4040 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4041 #   (If you expect perfect errno behavior, do not use this)
4042 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4043 # -xrestrict: Pointer parameters to functions do not overlap
4044 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4045 #    If you pass in multiple pointers to the same data, do not use this)
4046 # -xlibmil: Inline some library routines
4047 #   (If you expect perfect errno behavior, do not use this)
4048 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4049 #   (If you expect perfect errno behavior, do not use this)
4050 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4051 
4052     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4053     # Bug?
4054     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4055     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4056     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4057     #fi
4058 
4059 
4060 
4061 
4062 
4063 
4064 ################################################################################
4065 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4066 #      conditionals against.
4067 # $2 - Optional prefix for each variable defined.
4068 
4069 
4070 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4071 #                                  IF_FALSE: [RUN-IF-FALSE])
4072 # ------------------------------------------------------------
4073 # Check that the C compiler supports an argument
4074 
4075 
4076 
4077 
4078 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4079 #                                    IF_FALSE: [RUN-IF-FALSE])
4080 # ------------------------------------------------------------
4081 # Check that the C++ compiler supports an argument
4082 
4083 
4084 
4085 
4086 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4087 #                                IF_FALSE: [RUN-IF-FALSE])
4088 # ------------------------------------------------------------
4089 # Check that the C and C++ compilers support an argument
4090 
4091 
4092 
4093 
4094 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4095 #                                   IF_FALSE: [RUN-IF-FALSE])
4096 # ------------------------------------------------------------
4097 # Check that the linker support an argument
4098 
4099 
4100 
4101 
4102 
4103 
4104 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4105 # Arguments:
4106 # $1 - Optional prefix for each variable defined.
4107 
4108 
4109 #
4110 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4111 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4112 #
4113 # This code is free software; you can redistribute it and/or modify it
4114 # under the terms of the GNU General Public License version 2 only, as
4115 # published by the Free Software Foundation.  Oracle designates this
4116 # particular file as subject to the "Classpath" exception as provided
4117 # by Oracle in the LICENSE file that accompanied this code.
4118 #
4119 # This code is distributed in the hope that it will be useful, but WITHOUT
4120 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4121 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4122 # version 2 for more details (a copy is included in the LICENSE file that
4123 # accompanied this code).
4124 #
4125 # You should have received a copy of the GNU General Public License version
4126 # 2 along with this work; if not, write to the Free Software Foundation,
4127 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4128 #
4129 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4130 # or visit www.oracle.com if you need additional information or have any
4131 # questions.
4132 #
4133 
4134 
4135 
4136 
4137 
4138 cygwin_help() {
4139   case $1 in
4140     unzip)
4141       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4143       ;;
4144     zip)
4145       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4146       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4147       ;;
4148     make)
4149       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4150       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4151       ;;
4152     freetype)
4153       HELP_MSG="
4154 The freetype library can now be build during the configure process.
4155 Download the freetype sources and unpack them into an arbitrary directory:
4156 
4157 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4158 tar -xzf freetype-2.5.3.tar.gz
4159 
4160 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4161 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4162 builds or into '<freetype_src>/lib32' for 32-bit builds.
4163 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4164 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4165 
4166 Alternatively you can unpack the sources like this to use the default directory:
4167 
4168 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4169       ;;
4170   esac
4171 }
4172 
4173 msys_help() {
4174   PKGHANDLER_COMMAND=""
4175 }
4176 
4177 apt_help() {
4178   case $1 in
4179     reduced)
4180       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4181     devkit)
4182       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4183     openjdk)
4184       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4185     alsa)
4186       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4187     cups)
4188       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4189     freetype)
4190       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4191     ffi)
4192       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4193     x11)
4194       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4195     ccache)
4196       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4197     dtrace)
4198       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4199   esac
4200 }
4201 
4202 yum_help() {
4203   case $1 in
4204     devkit)
4205       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4206     openjdk)
4207       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4208     alsa)
4209       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4210     cups)
4211       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4212     freetype)
4213       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4214     x11)
4215       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4216     ccache)
4217       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4218   esac
4219 }
4220 
4221 port_help() {
4222   PKGHANDLER_COMMAND=""
4223 }
4224 
4225 pkgutil_help() {
4226   PKGHANDLER_COMMAND=""
4227 }
4228 
4229 pkgadd_help() {
4230   PKGHANDLER_COMMAND=""
4231 }
4232 
4233 # This function will check if we're called from the "configure" wrapper while
4234 # printing --help. If so, we will print out additional information that can
4235 # only be extracted within the autoconf script, and then exit. This must be
4236 # called at the very beginning in configure.ac.
4237 
4238 
4239 
4240 
4241 
4242 
4243 #
4244 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4245 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4246 #
4247 # This code is free software; you can redistribute it and/or modify it
4248 # under the terms of the GNU General Public License version 2 only, as
4249 # published by the Free Software Foundation.  Oracle designates this
4250 # particular file as subject to the "Classpath" exception as provided
4251 # by Oracle in the LICENSE file that accompanied this code.
4252 #
4253 # This code is distributed in the hope that it will be useful, but WITHOUT
4254 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4255 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4256 # version 2 for more details (a copy is included in the LICENSE file that
4257 # accompanied this code).
4258 #
4259 # You should have received a copy of the GNU General Public License version
4260 # 2 along with this work; if not, write to the Free Software Foundation,
4261 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4262 #
4263 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4264 # or visit www.oracle.com if you need additional information or have any
4265 # questions.
4266 #
4267 
4268 # All valid JVM features, regardless of platform
4269 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4270     fprof vm-structs jni-check services management all-gcs nmt cds \
4271     static-build link-time-opt"
4272 
4273 # All valid JVM variants
4274 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4275 
4276 ###############################################################################
4277 # Check if the specified JVM variant should be built. To be used in shell if
4278 # constructs, like this:
4279 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4280 #
4281 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4282 
4283 # Definition kept in one line to allow inlining in if statements.
4284 # Additional [] needed to keep m4 from mangling shell constructs.
4285 
4286 
4287 ###############################################################################
4288 # Check if the specified JVM features are explicitly enabled. To be used in
4289 # shell if constructs, like this:
4290 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4291 #
4292 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4293 
4294 # Definition kept in one line to allow inlining in if statements.
4295 # Additional [] needed to keep m4 from mangling shell constructs.
4296 
4297 
4298 ###############################################################################
4299 # Check which variants of the JVM that we want to build. Available variants are:
4300 #   server: normal interpreter, and a tiered C1/C2 compiler
4301 #   client: normal interpreter, and C1 (no C2 compiler)
4302 #   minimal: reduced form of client with optional features stripped out
4303 #   core: normal interpreter only, no compiler
4304 #   zero: C++ based interpreter only, no compiler
4305 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4306 #   custom: baseline JVM with no default features
4307 #
4308 
4309 
4310 ###############################################################################
4311 # Check if dtrace should be enabled and has all prerequisites present.
4312 #
4313 
4314 
4315 ###############################################################################
4316 # Set up all JVM features for each JVM variant.
4317 #
4318 
4319 
4320 ###############################################################################
4321 # Validate JVM features once all setup is complete, including custom setup.
4322 #
4323 
4324 
4325 ################################################################################
4326 #
4327 # Specify which sources will be used to build the 64-bit ARM port
4328 #
4329 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4330 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4331 #
4332 
4333 
4334 
4335 ################################################################################
4336 # Check if gtest should be built
4337 #
4338 
4339 
4340 #
4341 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4342 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343 #
4344 # This code is free software; you can redistribute it and/or modify it
4345 # under the terms of the GNU General Public License version 2 only, as
4346 # published by the Free Software Foundation.  Oracle designates this
4347 # particular file as subject to the "Classpath" exception as provided
4348 # by Oracle in the LICENSE file that accompanied this code.
4349 #
4350 # This code is distributed in the hope that it will be useful, but WITHOUT
4351 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353 # version 2 for more details (a copy is included in the LICENSE file that
4354 # accompanied this code).
4355 #
4356 # You should have received a copy of the GNU General Public License version
4357 # 2 along with this work; if not, write to the Free Software Foundation,
4358 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359 #
4360 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361 # or visit www.oracle.com if you need additional information or have any
4362 # questions.
4363 #
4364 
4365 ###############################################################################
4366 # Check which variant of the JDK that we want to build.
4367 # Currently we have:
4368 #    normal:   standard edition
4369 # but the custom make system may add other variants
4370 #
4371 # Effectively the JDK variant gives a name to a specific set of
4372 # modules to compile into the JDK.
4373 
4374 
4375 ###############################################################################
4376 # Set the debug level
4377 #    release: no debug information, all optimizations, no asserts.
4378 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4379 #    fastdebug: debug information (-g), all optimizations, all asserts
4380 #    slowdebug: debug information (-g), no optimizations, all asserts
4381 
4382 
4383 ###############################################################################
4384 #
4385 # Should we build only OpenJDK even if closed sources are present?
4386 #
4387 
4388 
4389 
4390 
4391 ###############################################################################
4392 #
4393 # Enable or disable the elliptic curve crypto implementation
4394 #
4395 
4396 
4397 
4398 
4399 ################################################################################
4400 #
4401 # Gcov coverage data for hotspot
4402 #
4403 
4404 
4405 ################################################################################
4406 #
4407 # Static build support.  When enabled will generate static
4408 # libraries instead of shared libraries for all JDK libs.
4409 #
4410 
4411 
4412 ################################################################################
4413 #
4414 # jlink options.
4415 # We always keep packaged modules in JDK image.
4416 #
4417 
4418 
4419 ################################################################################
4420 #
4421 # Check if building of the jtreg failure handler should be enabled.
4422 #
4423 
4424 
4425 ################################################################################
4426 #
4427 # Enable or disable generation of the classlist at build time
4428 #
4429 
4430 
4431 #
4432 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4433 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4434 #
4435 # This code is free software; you can redistribute it and/or modify it
4436 # under the terms of the GNU General Public License version 2 only, as
4437 # published by the Free Software Foundation.  Oracle designates this
4438 # particular file as subject to the "Classpath" exception as provided
4439 # by Oracle in the LICENSE file that accompanied this code.
4440 #
4441 # This code is distributed in the hope that it will be useful, but WITHOUT
4442 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4443 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4444 # version 2 for more details (a copy is included in the LICENSE file that
4445 # accompanied this code).
4446 #
4447 # You should have received a copy of the GNU General Public License version
4448 # 2 along with this work; if not, write to the Free Software Foundation,
4449 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4450 #
4451 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4452 # or visit www.oracle.com if you need additional information or have any
4453 # questions.
4454 #
4455 
4456 ###############################################################################
4457 #
4458 # Setup version numbers
4459 #
4460 
4461 # Verify that a given string represents a valid version number, and assign it
4462 # to a variable.
4463 
4464 # Argument 1: the variable to assign to
4465 # Argument 2: the value given by the user
4466 
4467 
4468 
4469 
4470 #
4471 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4473 #
4474 # This code is free software; you can redistribute it and/or modify it
4475 # under the terms of the GNU General Public License version 2 only, as
4476 # published by the Free Software Foundation.  Oracle designates this
4477 # particular file as subject to the "Classpath" exception as provided
4478 # by Oracle in the LICENSE file that accompanied this code.
4479 #
4480 # This code is distributed in the hope that it will be useful, but WITHOUT
4481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4482 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4483 # version 2 for more details (a copy is included in the LICENSE file that
4484 # accompanied this code).
4485 #
4486 # You should have received a copy of the GNU General Public License version
4487 # 2 along with this work; if not, write to the Free Software Foundation,
4488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4489 #
4490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4491 # or visit www.oracle.com if you need additional information or have any
4492 # questions.
4493 #
4494 
4495 # Major library component reside in separate files.
4496 #
4497 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4498 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4499 #
4500 # This code is free software; you can redistribute it and/or modify it
4501 # under the terms of the GNU General Public License version 2 only, as
4502 # published by the Free Software Foundation.  Oracle designates this
4503 # particular file as subject to the "Classpath" exception as provided
4504 # by Oracle in the LICENSE file that accompanied this code.
4505 #
4506 # This code is distributed in the hope that it will be useful, but WITHOUT
4507 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4508 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4509 # version 2 for more details (a copy is included in the LICENSE file that
4510 # accompanied this code).
4511 #
4512 # You should have received a copy of the GNU General Public License version
4513 # 2 along with this work; if not, write to the Free Software Foundation,
4514 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4515 #
4516 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4517 # or visit www.oracle.com if you need additional information or have any
4518 # questions.
4519 #
4520 
4521 ################################################################################
4522 # Setup alsa (Advanced Linux Sound Architecture)
4523 ################################################################################
4524 
4525 
4526 #
4527 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4528 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4529 #
4530 # This code is free software; you can redistribute it and/or modify it
4531 # under the terms of the GNU General Public License version 2 only, as
4532 # published by the Free Software Foundation.  Oracle designates this
4533 # particular file as subject to the "Classpath" exception as provided
4534 # by Oracle in the LICENSE file that accompanied this code.
4535 #
4536 # This code is distributed in the hope that it will be useful, but WITHOUT
4537 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4538 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4539 # version 2 for more details (a copy is included in the LICENSE file that
4540 # accompanied this code).
4541 #
4542 # You should have received a copy of the GNU General Public License version
4543 # 2 along with this work; if not, write to the Free Software Foundation,
4544 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4545 #
4546 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4547 # or visit www.oracle.com if you need additional information or have any
4548 # questions.
4549 #
4550 
4551 ################################################################################
4552 # Setup bundled libraries.
4553 #
4554 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4555 # OpenJDK repository. Default is to use these libraries as bundled, but they
4556 # might be replaced by en external version by the user.
4557 ################################################################################
4558 
4559 
4560 ################################################################################
4561 # Setup libjpeg
4562 ################################################################################
4563 
4564 
4565 ################################################################################
4566 # Setup giflib
4567 ################################################################################
4568 
4569 
4570 ################################################################################
4571 # Setup libpng
4572 ################################################################################
4573 
4574 
4575 ################################################################################
4576 # Setup zlib
4577 ################################################################################
4578 
4579 
4580 ################################################################################
4581 # Setup lcms (Little CMS)
4582 ################################################################################
4583 
4584 
4585 #
4586 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4587 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4588 #
4589 # This code is free software; you can redistribute it and/or modify it
4590 # under the terms of the GNU General Public License version 2 only, as
4591 # published by the Free Software Foundation.  Oracle designates this
4592 # particular file as subject to the "Classpath" exception as provided
4593 # by Oracle in the LICENSE file that accompanied this code.
4594 #
4595 # This code is distributed in the hope that it will be useful, but WITHOUT
4596 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4597 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4598 # version 2 for more details (a copy is included in the LICENSE file that
4599 # accompanied this code).
4600 #
4601 # You should have received a copy of the GNU General Public License version
4602 # 2 along with this work; if not, write to the Free Software Foundation,
4603 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4604 #
4605 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4606 # or visit www.oracle.com if you need additional information or have any
4607 # questions.
4608 #
4609 
4610 ################################################################################
4611 # Setup cups (Common Unix Printing System)
4612 ################################################################################
4613 
4614 
4615 #
4616 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4617 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4618 #
4619 # This code is free software; you can redistribute it and/or modify it
4620 # under the terms of the GNU General Public License version 2 only, as
4621 # published by the Free Software Foundation.  Oracle designates this
4622 # particular file as subject to the "Classpath" exception as provided
4623 # by Oracle in the LICENSE file that accompanied this code.
4624 #
4625 # This code is distributed in the hope that it will be useful, but WITHOUT
4626 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4627 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4628 # version 2 for more details (a copy is included in the LICENSE file that
4629 # accompanied this code).
4630 #
4631 # You should have received a copy of the GNU General Public License version
4632 # 2 along with this work; if not, write to the Free Software Foundation,
4633 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4634 #
4635 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4636 # or visit www.oracle.com if you need additional information or have any
4637 # questions.
4638 #
4639 
4640 ################################################################################
4641 # Setup libffi (Foreign Function Interface)
4642 ################################################################################
4643 
4644 
4645 #
4646 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4647 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4648 #
4649 # This code is free software; you can redistribute it and/or modify it
4650 # under the terms of the GNU General Public License version 2 only, as
4651 # published by the Free Software Foundation.  Oracle designates this
4652 # particular file as subject to the "Classpath" exception as provided
4653 # by Oracle in the LICENSE file that accompanied this code.
4654 #
4655 # This code is distributed in the hope that it will be useful, but WITHOUT
4656 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4657 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4658 # version 2 for more details (a copy is included in the LICENSE file that
4659 # accompanied this code).
4660 #
4661 # You should have received a copy of the GNU General Public License version
4662 # 2 along with this work; if not, write to the Free Software Foundation,
4663 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4664 #
4665 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4666 # or visit www.oracle.com if you need additional information or have any
4667 # questions.
4668 #
4669 
4670 ################################################################################
4671 # Build the freetype lib from source
4672 ################################################################################
4673 
4674 
4675 ################################################################################
4676 # Check if a potential freeype library match is correct and usable
4677 ################################################################################
4678 
4679 
4680 ################################################################################
4681 # Setup freetype (The FreeType2 font rendering library)
4682 ################################################################################
4683 
4684 
4685 #
4686 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4687 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4688 #
4689 # This code is free software; you can redistribute it and/or modify it
4690 # under the terms of the GNU General Public License version 2 only, as
4691 # published by the Free Software Foundation.  Oracle designates this
4692 # particular file as subject to the "Classpath" exception as provided
4693 # by Oracle in the LICENSE file that accompanied this code.
4694 #
4695 # This code is distributed in the hope that it will be useful, but WITHOUT
4696 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4697 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4698 # version 2 for more details (a copy is included in the LICENSE file that
4699 # accompanied this code).
4700 #
4701 # You should have received a copy of the GNU General Public License version
4702 # 2 along with this work; if not, write to the Free Software Foundation,
4703 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4704 #
4705 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4706 # or visit www.oracle.com if you need additional information or have any
4707 # questions.
4708 #
4709 
4710 ################################################################################
4711 # Setup the standard C/C++ runtime libraries.
4712 #
4713 # Most importantly, determine if stdc++ should be linked statically or
4714 # dynamically.
4715 ################################################################################
4716 
4717 
4718 #
4719 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4720 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721 #
4722 # This code is free software; you can redistribute it and/or modify it
4723 # under the terms of the GNU General Public License version 2 only, as
4724 # published by the Free Software Foundation.  Oracle designates this
4725 # particular file as subject to the "Classpath" exception as provided
4726 # by Oracle in the LICENSE file that accompanied this code.
4727 #
4728 # This code is distributed in the hope that it will be useful, but WITHOUT
4729 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731 # version 2 for more details (a copy is included in the LICENSE file that
4732 # accompanied this code).
4733 #
4734 # You should have received a copy of the GNU General Public License version
4735 # 2 along with this work; if not, write to the Free Software Foundation,
4736 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737 #
4738 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739 # or visit www.oracle.com if you need additional information or have any
4740 # questions.
4741 #
4742 
4743 ################################################################################
4744 # Setup X11 Windows system
4745 ################################################################################
4746 
4747 
4748 
4749 ################################################################################
4750 # Determine which libraries are needed for this configuration
4751 ################################################################################
4752 
4753 
4754 ################################################################################
4755 # Parse library options, and setup needed libraries
4756 ################################################################################
4757 
4758 
4759 ################################################################################
4760 # Setup llvm (Low-Level VM)
4761 ################################################################################
4762 
4763 
4764 ################################################################################
4765 # Setup various libraries, typically small system libraries
4766 ################################################################################
4767 
4768 
4769 ################################################################################
4770 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4771 # redistribute it in the test image.
4772 ################################################################################
4773 
4774 
4775 
4776 #
4777 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4778 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4779 #
4780 # This code is free software; you can redistribute it and/or modify it
4781 # under the terms of the GNU General Public License version 2 only, as
4782 # published by the Free Software Foundation.  Oracle designates this
4783 # particular file as subject to the "Classpath" exception as provided
4784 # by Oracle in the LICENSE file that accompanied this code.
4785 #
4786 # This code is distributed in the hope that it will be useful, but WITHOUT
4787 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4788 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4789 # version 2 for more details (a copy is included in the LICENSE file that
4790 # accompanied this code).
4791 #
4792 # You should have received a copy of the GNU General Public License version
4793 # 2 along with this work; if not, write to the Free Software Foundation,
4794 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4795 #
4796 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4797 # or visit www.oracle.com if you need additional information or have any
4798 # questions.
4799 #
4800 
4801 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4802 # Converts autoconf style CPU name to OpenJDK style, into
4803 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4804 
4805 
4806 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4807 # Converts autoconf style OS name to OpenJDK style, into
4808 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4809 
4810 
4811 # Expects $host_os $host_cpu $build_os and $build_cpu
4812 # and $with_target_bits to have been setup!
4813 #
4814 # Translate the standard triplet(quadruplet) definition
4815 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4816 # OPENJDK_BUILD_OS, etc.
4817 
4818 
4819 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4820 # accordingly. Must be done after setting up build and target system, but before
4821 # doing anything else with these values.
4822 
4823 
4824 # Setup the legacy variables, for controlling the old makefiles.
4825 #
4826 
4827 
4828 # $1 - Either TARGET or BUILD to setup the variables for.
4829 
4830 
4831 
4832 
4833 #%%% Build and target systems %%%
4834 
4835 
4836 
4837 
4838 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4839 # Add -mX to various FLAGS variables.
4840 
4841 
4842 
4843 
4844 
4845 
4846 #
4847 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4848 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4849 #
4850 # This code is free software; you can redistribute it and/or modify it
4851 # under the terms of the GNU General Public License version 2 only, as
4852 # published by the Free Software Foundation.  Oracle designates this
4853 # particular file as subject to the "Classpath" exception as provided
4854 # by Oracle in the LICENSE file that accompanied this code.
4855 #
4856 # This code is distributed in the hope that it will be useful, but WITHOUT
4857 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4858 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4859 # version 2 for more details (a copy is included in the LICENSE file that
4860 # accompanied this code).
4861 #
4862 # You should have received a copy of the GNU General Public License version
4863 # 2 along with this work; if not, write to the Free Software Foundation,
4864 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4865 #
4866 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4867 # or visit www.oracle.com if you need additional information or have any
4868 # questions.
4869 #
4870 
4871 
4872 
4873 
4874 
4875 
4876 
4877 ################################################################################
4878 # Define a mechanism for importing extra prebuilt modules
4879 #
4880 
4881 
4882 
4883 #
4884 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4885 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4886 #
4887 # This code is free software; you can redistribute it and/or modify it
4888 # under the terms of the GNU General Public License version 2 only, as
4889 # published by the Free Software Foundation.  Oracle designates this
4890 # particular file as subject to the "Classpath" exception as provided
4891 # by Oracle in the LICENSE file that accompanied this code.
4892 #
4893 # This code is distributed in the hope that it will be useful, but WITHOUT
4894 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4895 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4896 # version 2 for more details (a copy is included in the LICENSE file that
4897 # accompanied this code).
4898 #
4899 # You should have received a copy of the GNU General Public License version
4900 # 2 along with this work; if not, write to the Free Software Foundation,
4901 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4902 #
4903 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4904 # or visit www.oracle.com if you need additional information or have any
4905 # questions.
4906 #
4907 
4908 ########################################################################
4909 # This file is responsible for detecting, verifying and setting up the
4910 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4911 # proper paths to the binaries, but it will not setup any flags.
4912 #
4913 # The binaries used is determined by the toolchain type, which is the family of
4914 # compilers and related tools that are used.
4915 ########################################################################
4916 
4917 
4918 # All valid toolchains, regardless of platform (used by help.m4)
4919 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4920 
4921 # These toolchains are valid on different platforms
4922 VALID_TOOLCHAINS_linux="gcc clang"
4923 VALID_TOOLCHAINS_solaris="solstudio"
4924 VALID_TOOLCHAINS_macosx="gcc clang"
4925 VALID_TOOLCHAINS_aix="xlc"
4926 VALID_TOOLCHAINS_windows="microsoft"
4927 
4928 # Toolchain descriptions
4929 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4930 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4931 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4932 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4933 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4934 
4935 # Minimum supported versions, empty means unspecified
4936 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4937 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4938 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4939 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4940 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4941 
4942 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4943 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4944 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4945 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4946 
4947 
4948 # Check if the configured compiler (C and C++) is of a specific version or
4949 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4950 #
4951 # Arguments:
4952 #   VERSION:   The version string to check against the found version
4953 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4954 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4955 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4956 
4957 
4958 
4959 
4960 # Setup a number of variables describing how native output files are
4961 # named on this platform/toolchain.
4962 
4963 
4964 # Determine which toolchain type to use, and make sure it is valid for this
4965 # platform. Setup various information about the selected toolchain.
4966 
4967 
4968 # Before we start detecting the toolchain executables, we might need some
4969 # special setup, e.g. additional paths etc.
4970 
4971 
4972 # Restore path, etc
4973 
4974 
4975 # Check if a compiler is of the toolchain type we expect, and save the version
4976 # information from it. If the compiler does not match the expected type,
4977 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4978 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4979 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4980 #
4981 # $1 = compiler to test (CC or CXX)
4982 # $2 = human readable name of compiler (C or C++)
4983 
4984 
4985 # Try to locate the given C or C++ compiler in the path, or otherwise.
4986 #
4987 # $1 = compiler to test (CC or CXX)
4988 # $2 = human readable name of compiler (C or C++)
4989 # $3 = list of compiler names to search for
4990 
4991 
4992 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4993 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4994 # archiver (AR). Verify that the compilers are correct according to the
4995 # toolchain type.
4996 
4997 
4998 # Setup additional tools that is considered a part of the toolchain, but not the
4999 # core part. Many of these are highly platform-specific and do not exist,
5000 # and/or are not needed on all platforms.
5001 
5002 
5003 # Setup the build tools (i.e, the compiler and linker used to build programs
5004 # that should be run on the build platform, not the target platform, as a build
5005 # helper). Since the non-cross-compile case uses the normal, target compilers
5006 # for this, we can only do this after these have been setup.
5007 
5008 
5009 # Setup legacy variables that are still needed as alternative ways to refer to
5010 # parts of the toolchain.
5011 
5012 
5013 # Do some additional checks on the detected tools.
5014 
5015 
5016 # Setup the JTReg Regression Test Harness.
5017 
5018 
5019 #
5020 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5021 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5022 #
5023 # This code is free software; you can redistribute it and/or modify it
5024 # under the terms of the GNU General Public License version 2 only, as
5025 # published by the Free Software Foundation.  Oracle designates this
5026 # particular file as subject to the "Classpath" exception as provided
5027 # by Oracle in the LICENSE file that accompanied this code.
5028 #
5029 # This code is distributed in the hope that it will be useful, but WITHOUT
5030 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5031 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5032 # version 2 for more details (a copy is included in the LICENSE file that
5033 # accompanied this code).
5034 #
5035 # You should have received a copy of the GNU General Public License version
5036 # 2 along with this work; if not, write to the Free Software Foundation,
5037 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5038 #
5039 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5040 # or visit www.oracle.com if you need additional information or have any
5041 # questions.
5042 #
5043 
5044 ################################################################################
5045 # The order of these defines the priority by which we try to find them.
5046 VALID_VS_VERSIONS="2013 2012 2010"
5047 
5048 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5049 VS_VERSION_INTERNAL_2010=100
5050 VS_MSVCR_2010=msvcr100.dll
5051 # We don't use msvcp on Visual Studio 2010
5052 #VS_MSVCP_2010=msvcp100.dll
5053 VS_ENVVAR_2010="VS100COMNTOOLS"
5054 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5055 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5056 VS_VS_PLATFORM_NAME_2010="v100"
5057 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5058 
5059 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5060 VS_VERSION_INTERNAL_2012=110
5061 VS_MSVCR_2012=msvcr110.dll
5062 VS_MSVCP_2012=msvcp110.dll
5063 VS_ENVVAR_2012="VS110COMNTOOLS"
5064 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5065 VS_SDK_INSTALLDIR_2012=
5066 VS_VS_PLATFORM_NAME_2012="v110"
5067 VS_SDK_PLATFORM_NAME_2012=
5068 
5069 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5070 VS_VERSION_INTERNAL_2013=120
5071 VS_MSVCR_2013=msvcr120.dll
5072 VS_MSVCP_2013=msvcp120.dll
5073 VS_ENVVAR_2013="VS120COMNTOOLS"
5074 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5075 VS_SDK_INSTALLDIR_2013=
5076 VS_VS_PLATFORM_NAME_2013="v120"
5077 VS_SDK_PLATFORM_NAME_2013=
5078 
5079 ################################################################################
5080 
5081 
5082 
5083 ################################################################################
5084 
5085 
5086 
5087 ################################################################################
5088 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5089 # build environment and assigns it to VS_ENV_CMD
5090 
5091 
5092 ################################################################################
5093 
5094 
5095 
5096 ################################################################################
5097 # Check if the VS env variables were setup prior to running configure.
5098 # If not, then find vcvarsall.bat and run it automatically, and integrate
5099 # the set env variables into the spec file.
5100 
5101 
5102 
5103 
5104 
5105 
5106 
5107 
5108 
5109 
5110 
5111 
5112 
5113 
5114 # This line needs to be here, verbatim, after all includes and the dummy hook
5115 # definitions. It is replaced with custom functionality when building
5116 # custom sources.
5117 #CUSTOM_AUTOCONF_INCLUDE
5118 
5119 # Do not change or remove the following line, it is needed for consistency checks:
5120 DATE_WHEN_GENERATED=1480631660
5121 
5122 ###############################################################################
5123 #
5124 # Initialization / Boot-strapping
5125 #
5126 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5127 # thus it jumps back and forth, each time gaining something needed later on.
5128 #
5129 ###############################################################################
5130 
5131 # If we are requested to print additional help, do that and then exit.
5132 # This must be the very first call.
5133 
5134   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5135 
5136     # Print available toolchains
5137     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5138     $PRINTF "Which are valid to use depends on the build platform.\n"
5139     for toolchain in $VALID_TOOLCHAINS_all; do
5140       # Use indirect variable referencing
5141       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5142       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5143       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5144     done
5145     $PRINTF "\n"
5146 
5147     # Print available jvm features
5148     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5149     $PRINTF "Which are valid to use depends on the target platform.\n  "
5150     $PRINTF "%s " $VALID_JVM_FEATURES
5151     $PRINTF "\n"
5152 
5153     # And now exit directly
5154     exit 0
5155   fi
5156 
5157 
5158 # Basic initialization that must happen first of all in the normal process.
5159 
5160   # Save the original command line. This is passed to us by the wrapper configure script.
5161 
5162   # Save the path variable before it gets changed
5163   ORIGINAL_PATH="$PATH"
5164 
5165   DATE_WHEN_CONFIGURED=`LANG=C date`
5166 
5167   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5168 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5169   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5170 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5171 
5172 
5173   # Start with tools that do not need have cross compilation support
5174   # and can be expected to be found in the default PATH. These tools are
5175   # used by configure.
5176 
5177   # First are all the simple required tools.
5178 
5179 
5180 
5181   # Publish this variable in the help.
5182 
5183 
5184   if [ -z "${BASENAME+x}" ]; then
5185     # The variable is not set by user, try to locate tool using the code snippet
5186     for ac_prog in basename
5187 do
5188   # Extract the first word of "$ac_prog", so it can be a program name with args.
5189 set dummy $ac_prog; ac_word=$2
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191 $as_echo_n "checking for $ac_word... " >&6; }
5192 if ${ac_cv_path_BASENAME+:} false; then :
5193   $as_echo_n "(cached) " >&6
5194 else
5195   case $BASENAME in
5196   [\\/]* | ?:[\\/]*)
5197   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5198   ;;
5199   *)
5200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201 for as_dir in $PATH
5202 do
5203   IFS=$as_save_IFS
5204   test -z "$as_dir" && as_dir=.
5205     for ac_exec_ext in '' $ac_executable_extensions; do
5206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5207     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209     break 2
5210   fi
5211 done
5212   done
5213 IFS=$as_save_IFS
5214 
5215   ;;
5216 esac
5217 fi
5218 BASENAME=$ac_cv_path_BASENAME
5219 if test -n "$BASENAME"; then
5220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5221 $as_echo "$BASENAME" >&6; }
5222 else
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224 $as_echo "no" >&6; }
5225 fi
5226 
5227 
5228   test -n "$BASENAME" && break
5229 done
5230 
5231   else
5232     # The variable is set, but is it from the command line or the environment?
5233 
5234     # Try to remove the string !BASENAME! from our list.
5235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5237       # If it failed, the variable was not from the command line. Ignore it,
5238       # but warn the user (except for BASH, which is always set by the calling BASH).
5239       if test "xBASENAME" != xBASH; then
5240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5241 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5242       fi
5243       # Try to locate tool using the code snippet
5244       for ac_prog in basename
5245 do
5246   # Extract the first word of "$ac_prog", so it can be a program name with args.
5247 set dummy $ac_prog; ac_word=$2
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249 $as_echo_n "checking for $ac_word... " >&6; }
5250 if ${ac_cv_path_BASENAME+:} false; then :
5251   $as_echo_n "(cached) " >&6
5252 else
5253   case $BASENAME in
5254   [\\/]* | ?:[\\/]*)
5255   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5256   ;;
5257   *)
5258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259 for as_dir in $PATH
5260 do
5261   IFS=$as_save_IFS
5262   test -z "$as_dir" && as_dir=.
5263     for ac_exec_ext in '' $ac_executable_extensions; do
5264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267     break 2
5268   fi
5269 done
5270   done
5271 IFS=$as_save_IFS
5272 
5273   ;;
5274 esac
5275 fi
5276 BASENAME=$ac_cv_path_BASENAME
5277 if test -n "$BASENAME"; then
5278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5279 $as_echo "$BASENAME" >&6; }
5280 else
5281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282 $as_echo "no" >&6; }
5283 fi
5284 
5285 
5286   test -n "$BASENAME" && break
5287 done
5288 
5289     else
5290       # If it succeeded, then it was overridden by the user. We will use it
5291       # for the tool.
5292 
5293       # First remove it from the list of overridden variables, so we can test
5294       # for unknown variables in the end.
5295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5296 
5297       # Check if we try to supply an empty value
5298       if test "x$BASENAME" = x; then
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5300 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5302 $as_echo_n "checking for BASENAME... " >&6; }
5303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5304 $as_echo "disabled" >&6; }
5305       else
5306         # Check if the provided tool contains a complete path.
5307         tool_specified="$BASENAME"
5308         tool_basename="${tool_specified##*/}"
5309         if test "x$tool_basename" = "x$tool_specified"; then
5310           # A command without a complete path is provided, search $PATH.
5311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5312 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5313           # Extract the first word of "$tool_basename", so it can be a program name with args.
5314 set dummy $tool_basename; ac_word=$2
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316 $as_echo_n "checking for $ac_word... " >&6; }
5317 if ${ac_cv_path_BASENAME+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   case $BASENAME in
5321   [\\/]* | ?:[\\/]*)
5322   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5323   ;;
5324   *)
5325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326 for as_dir in $PATH
5327 do
5328   IFS=$as_save_IFS
5329   test -z "$as_dir" && as_dir=.
5330     for ac_exec_ext in '' $ac_executable_extensions; do
5331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5332     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334     break 2
5335   fi
5336 done
5337   done
5338 IFS=$as_save_IFS
5339 
5340   ;;
5341 esac
5342 fi
5343 BASENAME=$ac_cv_path_BASENAME
5344 if test -n "$BASENAME"; then
5345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5346 $as_echo "$BASENAME" >&6; }
5347 else
5348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349 $as_echo "no" >&6; }
5350 fi
5351 
5352 
5353           if test "x$BASENAME" = x; then
5354             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5355           fi
5356         else
5357           # Otherwise we believe it is a complete path. Use it as it is.
5358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5359 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5360           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5361 $as_echo_n "checking for BASENAME... " >&6; }
5362           if test ! -x "$tool_specified"; then
5363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5364 $as_echo "not found" >&6; }
5365             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5366           fi
5367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5368 $as_echo "$tool_specified" >&6; }
5369         fi
5370       fi
5371     fi
5372 
5373   fi
5374 
5375 
5376 
5377   if test "x$BASENAME" = x; then
5378     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5379   fi
5380 
5381 
5382 
5383 
5384 
5385   # Publish this variable in the help.
5386 
5387 
5388   if [ -z "${BASH+x}" ]; then
5389     # The variable is not set by user, try to locate tool using the code snippet
5390     for ac_prog in bash
5391 do
5392   # Extract the first word of "$ac_prog", so it can be a program name with args.
5393 set dummy $ac_prog; ac_word=$2
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395 $as_echo_n "checking for $ac_word... " >&6; }
5396 if ${ac_cv_path_BASH+:} false; then :
5397   $as_echo_n "(cached) " >&6
5398 else
5399   case $BASH in
5400   [\\/]* | ?:[\\/]*)
5401   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5402   ;;
5403   *)
5404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405 for as_dir in $PATH
5406 do
5407   IFS=$as_save_IFS
5408   test -z "$as_dir" && as_dir=.
5409     for ac_exec_ext in '' $ac_executable_extensions; do
5410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413     break 2
5414   fi
5415 done
5416   done
5417 IFS=$as_save_IFS
5418 
5419   ;;
5420 esac
5421 fi
5422 BASH=$ac_cv_path_BASH
5423 if test -n "$BASH"; then
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5425 $as_echo "$BASH" >&6; }
5426 else
5427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428 $as_echo "no" >&6; }
5429 fi
5430 
5431 
5432   test -n "$BASH" && break
5433 done
5434 
5435   else
5436     # The variable is set, but is it from the command line or the environment?
5437 
5438     # Try to remove the string !BASH! from our list.
5439     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5440     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5441       # If it failed, the variable was not from the command line. Ignore it,
5442       # but warn the user (except for BASH, which is always set by the calling BASH).
5443       if test "xBASH" != xBASH; then
5444         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5445 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5446       fi
5447       # Try to locate tool using the code snippet
5448       for ac_prog in bash
5449 do
5450   # Extract the first word of "$ac_prog", so it can be a program name with args.
5451 set dummy $ac_prog; ac_word=$2
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453 $as_echo_n "checking for $ac_word... " >&6; }
5454 if ${ac_cv_path_BASH+:} false; then :
5455   $as_echo_n "(cached) " >&6
5456 else
5457   case $BASH in
5458   [\\/]* | ?:[\\/]*)
5459   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5460   ;;
5461   *)
5462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463 for as_dir in $PATH
5464 do
5465   IFS=$as_save_IFS
5466   test -z "$as_dir" && as_dir=.
5467     for ac_exec_ext in '' $ac_executable_extensions; do
5468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471     break 2
5472   fi
5473 done
5474   done
5475 IFS=$as_save_IFS
5476 
5477   ;;
5478 esac
5479 fi
5480 BASH=$ac_cv_path_BASH
5481 if test -n "$BASH"; then
5482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5483 $as_echo "$BASH" >&6; }
5484 else
5485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486 $as_echo "no" >&6; }
5487 fi
5488 
5489 
5490   test -n "$BASH" && break
5491 done
5492 
5493     else
5494       # If it succeeded, then it was overridden by the user. We will use it
5495       # for the tool.
5496 
5497       # First remove it from the list of overridden variables, so we can test
5498       # for unknown variables in the end.
5499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5500 
5501       # Check if we try to supply an empty value
5502       if test "x$BASH" = x; then
5503         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5504 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5506 $as_echo_n "checking for BASH... " >&6; }
5507         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5508 $as_echo "disabled" >&6; }
5509       else
5510         # Check if the provided tool contains a complete path.
5511         tool_specified="$BASH"
5512         tool_basename="${tool_specified##*/}"
5513         if test "x$tool_basename" = "x$tool_specified"; then
5514           # A command without a complete path is provided, search $PATH.
5515           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5516 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5517           # Extract the first word of "$tool_basename", so it can be a program name with args.
5518 set dummy $tool_basename; ac_word=$2
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5520 $as_echo_n "checking for $ac_word... " >&6; }
5521 if ${ac_cv_path_BASH+:} false; then :
5522   $as_echo_n "(cached) " >&6
5523 else
5524   case $BASH in
5525   [\\/]* | ?:[\\/]*)
5526   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5527   ;;
5528   *)
5529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5530 for as_dir in $PATH
5531 do
5532   IFS=$as_save_IFS
5533   test -z "$as_dir" && as_dir=.
5534     for ac_exec_ext in '' $ac_executable_extensions; do
5535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5536     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5538     break 2
5539   fi
5540 done
5541   done
5542 IFS=$as_save_IFS
5543 
5544   ;;
5545 esac
5546 fi
5547 BASH=$ac_cv_path_BASH
5548 if test -n "$BASH"; then
5549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5550 $as_echo "$BASH" >&6; }
5551 else
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5553 $as_echo "no" >&6; }
5554 fi
5555 
5556 
5557           if test "x$BASH" = x; then
5558             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5559           fi
5560         else
5561           # Otherwise we believe it is a complete path. Use it as it is.
5562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5563 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5564           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5565 $as_echo_n "checking for BASH... " >&6; }
5566           if test ! -x "$tool_specified"; then
5567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5568 $as_echo "not found" >&6; }
5569             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5570           fi
5571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5572 $as_echo "$tool_specified" >&6; }
5573         fi
5574       fi
5575     fi
5576 
5577   fi
5578 
5579 
5580 
5581   if test "x$BASH" = x; then
5582     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5583   fi
5584 
5585 
5586 
5587 
5588 
5589   # Publish this variable in the help.
5590 
5591 
5592   if [ -z "${CAT+x}" ]; then
5593     # The variable is not set by user, try to locate tool using the code snippet
5594     for ac_prog in cat
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599 $as_echo_n "checking for $ac_word... " >&6; }
5600 if ${ac_cv_path_CAT+:} false; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   case $CAT in
5604   [\\/]* | ?:[\\/]*)
5605   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5606   ;;
5607   *)
5608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609 for as_dir in $PATH
5610 do
5611   IFS=$as_save_IFS
5612   test -z "$as_dir" && as_dir=.
5613     for ac_exec_ext in '' $ac_executable_extensions; do
5614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5615     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617     break 2
5618   fi
5619 done
5620   done
5621 IFS=$as_save_IFS
5622 
5623   ;;
5624 esac
5625 fi
5626 CAT=$ac_cv_path_CAT
5627 if test -n "$CAT"; then
5628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5629 $as_echo "$CAT" >&6; }
5630 else
5631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632 $as_echo "no" >&6; }
5633 fi
5634 
5635 
5636   test -n "$CAT" && break
5637 done
5638 
5639   else
5640     # The variable is set, but is it from the command line or the environment?
5641 
5642     # Try to remove the string !CAT! from our list.
5643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5645       # If it failed, the variable was not from the command line. Ignore it,
5646       # but warn the user (except for BASH, which is always set by the calling BASH).
5647       if test "xCAT" != xBASH; then
5648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5649 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5650       fi
5651       # Try to locate tool using the code snippet
5652       for ac_prog in cat
5653 do
5654   # Extract the first word of "$ac_prog", so it can be a program name with args.
5655 set dummy $ac_prog; ac_word=$2
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657 $as_echo_n "checking for $ac_word... " >&6; }
5658 if ${ac_cv_path_CAT+:} false; then :
5659   $as_echo_n "(cached) " >&6
5660 else
5661   case $CAT in
5662   [\\/]* | ?:[\\/]*)
5663   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5664   ;;
5665   *)
5666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667 for as_dir in $PATH
5668 do
5669   IFS=$as_save_IFS
5670   test -z "$as_dir" && as_dir=.
5671     for ac_exec_ext in '' $ac_executable_extensions; do
5672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5673     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675     break 2
5676   fi
5677 done
5678   done
5679 IFS=$as_save_IFS
5680 
5681   ;;
5682 esac
5683 fi
5684 CAT=$ac_cv_path_CAT
5685 if test -n "$CAT"; then
5686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5687 $as_echo "$CAT" >&6; }
5688 else
5689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690 $as_echo "no" >&6; }
5691 fi
5692 
5693 
5694   test -n "$CAT" && break
5695 done
5696 
5697     else
5698       # If it succeeded, then it was overridden by the user. We will use it
5699       # for the tool.
5700 
5701       # First remove it from the list of overridden variables, so we can test
5702       # for unknown variables in the end.
5703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5704 
5705       # Check if we try to supply an empty value
5706       if test "x$CAT" = x; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5708 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5710 $as_echo_n "checking for CAT... " >&6; }
5711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5712 $as_echo "disabled" >&6; }
5713       else
5714         # Check if the provided tool contains a complete path.
5715         tool_specified="$CAT"
5716         tool_basename="${tool_specified##*/}"
5717         if test "x$tool_basename" = "x$tool_specified"; then
5718           # A command without a complete path is provided, search $PATH.
5719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5720 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5721           # Extract the first word of "$tool_basename", so it can be a program name with args.
5722 set dummy $tool_basename; ac_word=$2
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5724 $as_echo_n "checking for $ac_word... " >&6; }
5725 if ${ac_cv_path_CAT+:} false; then :
5726   $as_echo_n "(cached) " >&6
5727 else
5728   case $CAT in
5729   [\\/]* | ?:[\\/]*)
5730   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5731   ;;
5732   *)
5733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5734 for as_dir in $PATH
5735 do
5736   IFS=$as_save_IFS
5737   test -z "$as_dir" && as_dir=.
5738     for ac_exec_ext in '' $ac_executable_extensions; do
5739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5740     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5742     break 2
5743   fi
5744 done
5745   done
5746 IFS=$as_save_IFS
5747 
5748   ;;
5749 esac
5750 fi
5751 CAT=$ac_cv_path_CAT
5752 if test -n "$CAT"; then
5753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5754 $as_echo "$CAT" >&6; }
5755 else
5756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5757 $as_echo "no" >&6; }
5758 fi
5759 
5760 
5761           if test "x$CAT" = x; then
5762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5763           fi
5764         else
5765           # Otherwise we believe it is a complete path. Use it as it is.
5766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5767 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5769 $as_echo_n "checking for CAT... " >&6; }
5770           if test ! -x "$tool_specified"; then
5771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5772 $as_echo "not found" >&6; }
5773             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5774           fi
5775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5776 $as_echo "$tool_specified" >&6; }
5777         fi
5778       fi
5779     fi
5780 
5781   fi
5782 
5783 
5784 
5785   if test "x$CAT" = x; then
5786     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5787   fi
5788 
5789 
5790 
5791 
5792 
5793   # Publish this variable in the help.
5794 
5795 
5796   if [ -z "${CHMOD+x}" ]; then
5797     # The variable is not set by user, try to locate tool using the code snippet
5798     for ac_prog in chmod
5799 do
5800   # Extract the first word of "$ac_prog", so it can be a program name with args.
5801 set dummy $ac_prog; ac_word=$2
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803 $as_echo_n "checking for $ac_word... " >&6; }
5804 if ${ac_cv_path_CHMOD+:} false; then :
5805   $as_echo_n "(cached) " >&6
5806 else
5807   case $CHMOD in
5808   [\\/]* | ?:[\\/]*)
5809   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5810   ;;
5811   *)
5812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813 for as_dir in $PATH
5814 do
5815   IFS=$as_save_IFS
5816   test -z "$as_dir" && as_dir=.
5817     for ac_exec_ext in '' $ac_executable_extensions; do
5818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821     break 2
5822   fi
5823 done
5824   done
5825 IFS=$as_save_IFS
5826 
5827   ;;
5828 esac
5829 fi
5830 CHMOD=$ac_cv_path_CHMOD
5831 if test -n "$CHMOD"; then
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5833 $as_echo "$CHMOD" >&6; }
5834 else
5835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836 $as_echo "no" >&6; }
5837 fi
5838 
5839 
5840   test -n "$CHMOD" && break
5841 done
5842 
5843   else
5844     # The variable is set, but is it from the command line or the environment?
5845 
5846     # Try to remove the string !CHMOD! from our list.
5847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5849       # If it failed, the variable was not from the command line. Ignore it,
5850       # but warn the user (except for BASH, which is always set by the calling BASH).
5851       if test "xCHMOD" != xBASH; then
5852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5853 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5854       fi
5855       # Try to locate tool using the code snippet
5856       for ac_prog in chmod
5857 do
5858   # Extract the first word of "$ac_prog", so it can be a program name with args.
5859 set dummy $ac_prog; ac_word=$2
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861 $as_echo_n "checking for $ac_word... " >&6; }
5862 if ${ac_cv_path_CHMOD+:} false; then :
5863   $as_echo_n "(cached) " >&6
5864 else
5865   case $CHMOD in
5866   [\\/]* | ?:[\\/]*)
5867   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5868   ;;
5869   *)
5870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871 for as_dir in $PATH
5872 do
5873   IFS=$as_save_IFS
5874   test -z "$as_dir" && as_dir=.
5875     for ac_exec_ext in '' $ac_executable_extensions; do
5876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879     break 2
5880   fi
5881 done
5882   done
5883 IFS=$as_save_IFS
5884 
5885   ;;
5886 esac
5887 fi
5888 CHMOD=$ac_cv_path_CHMOD
5889 if test -n "$CHMOD"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5891 $as_echo "$CHMOD" >&6; }
5892 else
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5895 fi
5896 
5897 
5898   test -n "$CHMOD" && break
5899 done
5900 
5901     else
5902       # If it succeeded, then it was overridden by the user. We will use it
5903       # for the tool.
5904 
5905       # First remove it from the list of overridden variables, so we can test
5906       # for unknown variables in the end.
5907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5908 
5909       # Check if we try to supply an empty value
5910       if test "x$CHMOD" = x; then
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5912 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5914 $as_echo_n "checking for CHMOD... " >&6; }
5915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5916 $as_echo "disabled" >&6; }
5917       else
5918         # Check if the provided tool contains a complete path.
5919         tool_specified="$CHMOD"
5920         tool_basename="${tool_specified##*/}"
5921         if test "x$tool_basename" = "x$tool_specified"; then
5922           # A command without a complete path is provided, search $PATH.
5923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5924 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5925           # Extract the first word of "$tool_basename", so it can be a program name with args.
5926 set dummy $tool_basename; ac_word=$2
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5928 $as_echo_n "checking for $ac_word... " >&6; }
5929 if ${ac_cv_path_CHMOD+:} false; then :
5930   $as_echo_n "(cached) " >&6
5931 else
5932   case $CHMOD in
5933   [\\/]* | ?:[\\/]*)
5934   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5935   ;;
5936   *)
5937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938 for as_dir in $PATH
5939 do
5940   IFS=$as_save_IFS
5941   test -z "$as_dir" && as_dir=.
5942     for ac_exec_ext in '' $ac_executable_extensions; do
5943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5946     break 2
5947   fi
5948 done
5949   done
5950 IFS=$as_save_IFS
5951 
5952   ;;
5953 esac
5954 fi
5955 CHMOD=$ac_cv_path_CHMOD
5956 if test -n "$CHMOD"; then
5957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5958 $as_echo "$CHMOD" >&6; }
5959 else
5960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961 $as_echo "no" >&6; }
5962 fi
5963 
5964 
5965           if test "x$CHMOD" = x; then
5966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5967           fi
5968         else
5969           # Otherwise we believe it is a complete path. Use it as it is.
5970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5971 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5973 $as_echo_n "checking for CHMOD... " >&6; }
5974           if test ! -x "$tool_specified"; then
5975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5976 $as_echo "not found" >&6; }
5977             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5978           fi
5979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5980 $as_echo "$tool_specified" >&6; }
5981         fi
5982       fi
5983     fi
5984 
5985   fi
5986 
5987 
5988 
5989   if test "x$CHMOD" = x; then
5990     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5991   fi
5992 
5993 
5994 
5995 
5996 
5997   # Publish this variable in the help.
5998 
5999 
6000   if [ -z "${CMP+x}" ]; then
6001     # The variable is not set by user, try to locate tool using the code snippet
6002     for ac_prog in cmp
6003 do
6004   # Extract the first word of "$ac_prog", so it can be a program name with args.
6005 set dummy $ac_prog; ac_word=$2
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007 $as_echo_n "checking for $ac_word... " >&6; }
6008 if ${ac_cv_path_CMP+:} false; then :
6009   $as_echo_n "(cached) " >&6
6010 else
6011   case $CMP in
6012   [\\/]* | ?:[\\/]*)
6013   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6014   ;;
6015   *)
6016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017 for as_dir in $PATH
6018 do
6019   IFS=$as_save_IFS
6020   test -z "$as_dir" && as_dir=.
6021     for ac_exec_ext in '' $ac_executable_extensions; do
6022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025     break 2
6026   fi
6027 done
6028   done
6029 IFS=$as_save_IFS
6030 
6031   ;;
6032 esac
6033 fi
6034 CMP=$ac_cv_path_CMP
6035 if test -n "$CMP"; then
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6037 $as_echo "$CMP" >&6; }
6038 else
6039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040 $as_echo "no" >&6; }
6041 fi
6042 
6043 
6044   test -n "$CMP" && break
6045 done
6046 
6047   else
6048     # The variable is set, but is it from the command line or the environment?
6049 
6050     # Try to remove the string !CMP! from our list.
6051     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6052     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6053       # If it failed, the variable was not from the command line. Ignore it,
6054       # but warn the user (except for BASH, which is always set by the calling BASH).
6055       if test "xCMP" != xBASH; then
6056         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6057 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6058       fi
6059       # Try to locate tool using the code snippet
6060       for ac_prog in cmp
6061 do
6062   # Extract the first word of "$ac_prog", so it can be a program name with args.
6063 set dummy $ac_prog; ac_word=$2
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065 $as_echo_n "checking for $ac_word... " >&6; }
6066 if ${ac_cv_path_CMP+:} false; then :
6067   $as_echo_n "(cached) " >&6
6068 else
6069   case $CMP in
6070   [\\/]* | ?:[\\/]*)
6071   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6072   ;;
6073   *)
6074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075 for as_dir in $PATH
6076 do
6077   IFS=$as_save_IFS
6078   test -z "$as_dir" && as_dir=.
6079     for ac_exec_ext in '' $ac_executable_extensions; do
6080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6081     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083     break 2
6084   fi
6085 done
6086   done
6087 IFS=$as_save_IFS
6088 
6089   ;;
6090 esac
6091 fi
6092 CMP=$ac_cv_path_CMP
6093 if test -n "$CMP"; then
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6095 $as_echo "$CMP" >&6; }
6096 else
6097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098 $as_echo "no" >&6; }
6099 fi
6100 
6101 
6102   test -n "$CMP" && break
6103 done
6104 
6105     else
6106       # If it succeeded, then it was overridden by the user. We will use it
6107       # for the tool.
6108 
6109       # First remove it from the list of overridden variables, so we can test
6110       # for unknown variables in the end.
6111       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6112 
6113       # Check if we try to supply an empty value
6114       if test "x$CMP" = x; then
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6116 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6118 $as_echo_n "checking for CMP... " >&6; }
6119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6120 $as_echo "disabled" >&6; }
6121       else
6122         # Check if the provided tool contains a complete path.
6123         tool_specified="$CMP"
6124         tool_basename="${tool_specified##*/}"
6125         if test "x$tool_basename" = "x$tool_specified"; then
6126           # A command without a complete path is provided, search $PATH.
6127           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6128 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6129           # Extract the first word of "$tool_basename", so it can be a program name with args.
6130 set dummy $tool_basename; ac_word=$2
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132 $as_echo_n "checking for $ac_word... " >&6; }
6133 if ${ac_cv_path_CMP+:} false; then :
6134   $as_echo_n "(cached) " >&6
6135 else
6136   case $CMP in
6137   [\\/]* | ?:[\\/]*)
6138   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6139   ;;
6140   *)
6141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142 for as_dir in $PATH
6143 do
6144   IFS=$as_save_IFS
6145   test -z "$as_dir" && as_dir=.
6146     for ac_exec_ext in '' $ac_executable_extensions; do
6147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150     break 2
6151   fi
6152 done
6153   done
6154 IFS=$as_save_IFS
6155 
6156   ;;
6157 esac
6158 fi
6159 CMP=$ac_cv_path_CMP
6160 if test -n "$CMP"; then
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6162 $as_echo "$CMP" >&6; }
6163 else
6164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165 $as_echo "no" >&6; }
6166 fi
6167 
6168 
6169           if test "x$CMP" = x; then
6170             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6171           fi
6172         else
6173           # Otherwise we believe it is a complete path. Use it as it is.
6174           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6175 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6176           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6177 $as_echo_n "checking for CMP... " >&6; }
6178           if test ! -x "$tool_specified"; then
6179             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6180 $as_echo "not found" >&6; }
6181             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6182           fi
6183           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6184 $as_echo "$tool_specified" >&6; }
6185         fi
6186       fi
6187     fi
6188 
6189   fi
6190 
6191 
6192 
6193   if test "x$CMP" = x; then
6194     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6195   fi
6196 
6197 
6198 
6199 
6200 
6201   # Publish this variable in the help.
6202 
6203 
6204   if [ -z "${COMM+x}" ]; then
6205     # The variable is not set by user, try to locate tool using the code snippet
6206     for ac_prog in comm
6207 do
6208   # Extract the first word of "$ac_prog", so it can be a program name with args.
6209 set dummy $ac_prog; ac_word=$2
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6211 $as_echo_n "checking for $ac_word... " >&6; }
6212 if ${ac_cv_path_COMM+:} false; then :
6213   $as_echo_n "(cached) " >&6
6214 else
6215   case $COMM in
6216   [\\/]* | ?:[\\/]*)
6217   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6218   ;;
6219   *)
6220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221 for as_dir in $PATH
6222 do
6223   IFS=$as_save_IFS
6224   test -z "$as_dir" && as_dir=.
6225     for ac_exec_ext in '' $ac_executable_extensions; do
6226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6227     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6229     break 2
6230   fi
6231 done
6232   done
6233 IFS=$as_save_IFS
6234 
6235   ;;
6236 esac
6237 fi
6238 COMM=$ac_cv_path_COMM
6239 if test -n "$COMM"; then
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6241 $as_echo "$COMM" >&6; }
6242 else
6243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244 $as_echo "no" >&6; }
6245 fi
6246 
6247 
6248   test -n "$COMM" && break
6249 done
6250 
6251   else
6252     # The variable is set, but is it from the command line or the environment?
6253 
6254     # Try to remove the string !COMM! from our list.
6255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6257       # If it failed, the variable was not from the command line. Ignore it,
6258       # but warn the user (except for BASH, which is always set by the calling BASH).
6259       if test "xCOMM" != xBASH; then
6260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6261 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6262       fi
6263       # Try to locate tool using the code snippet
6264       for ac_prog in comm
6265 do
6266   # Extract the first word of "$ac_prog", so it can be a program name with args.
6267 set dummy $ac_prog; ac_word=$2
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6269 $as_echo_n "checking for $ac_word... " >&6; }
6270 if ${ac_cv_path_COMM+:} false; then :
6271   $as_echo_n "(cached) " >&6
6272 else
6273   case $COMM in
6274   [\\/]* | ?:[\\/]*)
6275   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6276   ;;
6277   *)
6278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279 for as_dir in $PATH
6280 do
6281   IFS=$as_save_IFS
6282   test -z "$as_dir" && as_dir=.
6283     for ac_exec_ext in '' $ac_executable_extensions; do
6284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6285     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6287     break 2
6288   fi
6289 done
6290   done
6291 IFS=$as_save_IFS
6292 
6293   ;;
6294 esac
6295 fi
6296 COMM=$ac_cv_path_COMM
6297 if test -n "$COMM"; then
6298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6299 $as_echo "$COMM" >&6; }
6300 else
6301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 $as_echo "no" >&6; }
6303 fi
6304 
6305 
6306   test -n "$COMM" && break
6307 done
6308 
6309     else
6310       # If it succeeded, then it was overridden by the user. We will use it
6311       # for the tool.
6312 
6313       # First remove it from the list of overridden variables, so we can test
6314       # for unknown variables in the end.
6315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6316 
6317       # Check if we try to supply an empty value
6318       if test "x$COMM" = x; then
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6320 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6322 $as_echo_n "checking for COMM... " >&6; }
6323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6324 $as_echo "disabled" >&6; }
6325       else
6326         # Check if the provided tool contains a complete path.
6327         tool_specified="$COMM"
6328         tool_basename="${tool_specified##*/}"
6329         if test "x$tool_basename" = "x$tool_specified"; then
6330           # A command without a complete path is provided, search $PATH.
6331           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6332 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6333           # Extract the first word of "$tool_basename", so it can be a program name with args.
6334 set dummy $tool_basename; ac_word=$2
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6336 $as_echo_n "checking for $ac_word... " >&6; }
6337 if ${ac_cv_path_COMM+:} false; then :
6338   $as_echo_n "(cached) " >&6
6339 else
6340   case $COMM in
6341   [\\/]* | ?:[\\/]*)
6342   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6343   ;;
6344   *)
6345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346 for as_dir in $PATH
6347 do
6348   IFS=$as_save_IFS
6349   test -z "$as_dir" && as_dir=.
6350     for ac_exec_ext in '' $ac_executable_extensions; do
6351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6352     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354     break 2
6355   fi
6356 done
6357   done
6358 IFS=$as_save_IFS
6359 
6360   ;;
6361 esac
6362 fi
6363 COMM=$ac_cv_path_COMM
6364 if test -n "$COMM"; then
6365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6366 $as_echo "$COMM" >&6; }
6367 else
6368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369 $as_echo "no" >&6; }
6370 fi
6371 
6372 
6373           if test "x$COMM" = x; then
6374             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6375           fi
6376         else
6377           # Otherwise we believe it is a complete path. Use it as it is.
6378           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6379 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6380           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6381 $as_echo_n "checking for COMM... " >&6; }
6382           if test ! -x "$tool_specified"; then
6383             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6384 $as_echo "not found" >&6; }
6385             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6386           fi
6387           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6388 $as_echo "$tool_specified" >&6; }
6389         fi
6390       fi
6391     fi
6392 
6393   fi
6394 
6395 
6396 
6397   if test "x$COMM" = x; then
6398     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6399   fi
6400 
6401 
6402 
6403 
6404 
6405   # Publish this variable in the help.
6406 
6407 
6408   if [ -z "${CP+x}" ]; then
6409     # The variable is not set by user, try to locate tool using the code snippet
6410     for ac_prog in cp
6411 do
6412   # Extract the first word of "$ac_prog", so it can be a program name with args.
6413 set dummy $ac_prog; ac_word=$2
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415 $as_echo_n "checking for $ac_word... " >&6; }
6416 if ${ac_cv_path_CP+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   case $CP in
6420   [\\/]* | ?:[\\/]*)
6421   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6422   ;;
6423   *)
6424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425 for as_dir in $PATH
6426 do
6427   IFS=$as_save_IFS
6428   test -z "$as_dir" && as_dir=.
6429     for ac_exec_ext in '' $ac_executable_extensions; do
6430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6431     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6433     break 2
6434   fi
6435 done
6436   done
6437 IFS=$as_save_IFS
6438 
6439   ;;
6440 esac
6441 fi
6442 CP=$ac_cv_path_CP
6443 if test -n "$CP"; then
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6445 $as_echo "$CP" >&6; }
6446 else
6447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448 $as_echo "no" >&6; }
6449 fi
6450 
6451 
6452   test -n "$CP" && break
6453 done
6454 
6455   else
6456     # The variable is set, but is it from the command line or the environment?
6457 
6458     # Try to remove the string !CP! from our list.
6459     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6460     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6461       # If it failed, the variable was not from the command line. Ignore it,
6462       # but warn the user (except for BASH, which is always set by the calling BASH).
6463       if test "xCP" != xBASH; then
6464         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6465 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6466       fi
6467       # Try to locate tool using the code snippet
6468       for ac_prog in cp
6469 do
6470   # Extract the first word of "$ac_prog", so it can be a program name with args.
6471 set dummy $ac_prog; ac_word=$2
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if ${ac_cv_path_CP+:} false; then :
6475   $as_echo_n "(cached) " >&6
6476 else
6477   case $CP in
6478   [\\/]* | ?:[\\/]*)
6479   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6480   ;;
6481   *)
6482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483 for as_dir in $PATH
6484 do
6485   IFS=$as_save_IFS
6486   test -z "$as_dir" && as_dir=.
6487     for ac_exec_ext in '' $ac_executable_extensions; do
6488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6489     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491     break 2
6492   fi
6493 done
6494   done
6495 IFS=$as_save_IFS
6496 
6497   ;;
6498 esac
6499 fi
6500 CP=$ac_cv_path_CP
6501 if test -n "$CP"; then
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6503 $as_echo "$CP" >&6; }
6504 else
6505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6506 $as_echo "no" >&6; }
6507 fi
6508 
6509 
6510   test -n "$CP" && break
6511 done
6512 
6513     else
6514       # If it succeeded, then it was overridden by the user. We will use it
6515       # for the tool.
6516 
6517       # First remove it from the list of overridden variables, so we can test
6518       # for unknown variables in the end.
6519       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6520 
6521       # Check if we try to supply an empty value
6522       if test "x$CP" = x; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6524 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6526 $as_echo_n "checking for CP... " >&6; }
6527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6528 $as_echo "disabled" >&6; }
6529       else
6530         # Check if the provided tool contains a complete path.
6531         tool_specified="$CP"
6532         tool_basename="${tool_specified##*/}"
6533         if test "x$tool_basename" = "x$tool_specified"; then
6534           # A command without a complete path is provided, search $PATH.
6535           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6536 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6537           # Extract the first word of "$tool_basename", so it can be a program name with args.
6538 set dummy $tool_basename; ac_word=$2
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6540 $as_echo_n "checking for $ac_word... " >&6; }
6541 if ${ac_cv_path_CP+:} false; then :
6542   $as_echo_n "(cached) " >&6
6543 else
6544   case $CP in
6545   [\\/]* | ?:[\\/]*)
6546   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6547   ;;
6548   *)
6549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6550 for as_dir in $PATH
6551 do
6552   IFS=$as_save_IFS
6553   test -z "$as_dir" && as_dir=.
6554     for ac_exec_ext in '' $ac_executable_extensions; do
6555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6556     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6558     break 2
6559   fi
6560 done
6561   done
6562 IFS=$as_save_IFS
6563 
6564   ;;
6565 esac
6566 fi
6567 CP=$ac_cv_path_CP
6568 if test -n "$CP"; then
6569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6570 $as_echo "$CP" >&6; }
6571 else
6572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573 $as_echo "no" >&6; }
6574 fi
6575 
6576 
6577           if test "x$CP" = x; then
6578             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6579           fi
6580         else
6581           # Otherwise we believe it is a complete path. Use it as it is.
6582           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6583 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6584           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6585 $as_echo_n "checking for CP... " >&6; }
6586           if test ! -x "$tool_specified"; then
6587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6588 $as_echo "not found" >&6; }
6589             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6590           fi
6591           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6592 $as_echo "$tool_specified" >&6; }
6593         fi
6594       fi
6595     fi
6596 
6597   fi
6598 
6599 
6600 
6601   if test "x$CP" = x; then
6602     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6603   fi
6604 
6605 
6606 
6607 
6608 
6609   # Publish this variable in the help.
6610 
6611 
6612   if [ -z "${CUT+x}" ]; then
6613     # The variable is not set by user, try to locate tool using the code snippet
6614     for ac_prog in cut
6615 do
6616   # Extract the first word of "$ac_prog", so it can be a program name with args.
6617 set dummy $ac_prog; ac_word=$2
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619 $as_echo_n "checking for $ac_word... " >&6; }
6620 if ${ac_cv_path_CUT+:} false; then :
6621   $as_echo_n "(cached) " >&6
6622 else
6623   case $CUT in
6624   [\\/]* | ?:[\\/]*)
6625   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6626   ;;
6627   *)
6628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629 for as_dir in $PATH
6630 do
6631   IFS=$as_save_IFS
6632   test -z "$as_dir" && as_dir=.
6633     for ac_exec_ext in '' $ac_executable_extensions; do
6634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637     break 2
6638   fi
6639 done
6640   done
6641 IFS=$as_save_IFS
6642 
6643   ;;
6644 esac
6645 fi
6646 CUT=$ac_cv_path_CUT
6647 if test -n "$CUT"; then
6648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6649 $as_echo "$CUT" >&6; }
6650 else
6651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652 $as_echo "no" >&6; }
6653 fi
6654 
6655 
6656   test -n "$CUT" && break
6657 done
6658 
6659   else
6660     # The variable is set, but is it from the command line or the environment?
6661 
6662     # Try to remove the string !CUT! from our list.
6663     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6664     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6665       # If it failed, the variable was not from the command line. Ignore it,
6666       # but warn the user (except for BASH, which is always set by the calling BASH).
6667       if test "xCUT" != xBASH; then
6668         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6669 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6670       fi
6671       # Try to locate tool using the code snippet
6672       for ac_prog in cut
6673 do
6674   # Extract the first word of "$ac_prog", so it can be a program name with args.
6675 set dummy $ac_prog; ac_word=$2
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6677 $as_echo_n "checking for $ac_word... " >&6; }
6678 if ${ac_cv_path_CUT+:} false; then :
6679   $as_echo_n "(cached) " >&6
6680 else
6681   case $CUT in
6682   [\\/]* | ?:[\\/]*)
6683   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6684   ;;
6685   *)
6686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687 for as_dir in $PATH
6688 do
6689   IFS=$as_save_IFS
6690   test -z "$as_dir" && as_dir=.
6691     for ac_exec_ext in '' $ac_executable_extensions; do
6692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695     break 2
6696   fi
6697 done
6698   done
6699 IFS=$as_save_IFS
6700 
6701   ;;
6702 esac
6703 fi
6704 CUT=$ac_cv_path_CUT
6705 if test -n "$CUT"; then
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6707 $as_echo "$CUT" >&6; }
6708 else
6709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6711 fi
6712 
6713 
6714   test -n "$CUT" && break
6715 done
6716 
6717     else
6718       # If it succeeded, then it was overridden by the user. We will use it
6719       # for the tool.
6720 
6721       # First remove it from the list of overridden variables, so we can test
6722       # for unknown variables in the end.
6723       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6724 
6725       # Check if we try to supply an empty value
6726       if test "x$CUT" = x; then
6727         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6728 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6730 $as_echo_n "checking for CUT... " >&6; }
6731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6732 $as_echo "disabled" >&6; }
6733       else
6734         # Check if the provided tool contains a complete path.
6735         tool_specified="$CUT"
6736         tool_basename="${tool_specified##*/}"
6737         if test "x$tool_basename" = "x$tool_specified"; then
6738           # A command without a complete path is provided, search $PATH.
6739           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6740 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6741           # Extract the first word of "$tool_basename", so it can be a program name with args.
6742 set dummy $tool_basename; ac_word=$2
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744 $as_echo_n "checking for $ac_word... " >&6; }
6745 if ${ac_cv_path_CUT+:} false; then :
6746   $as_echo_n "(cached) " >&6
6747 else
6748   case $CUT in
6749   [\\/]* | ?:[\\/]*)
6750   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6751   ;;
6752   *)
6753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754 for as_dir in $PATH
6755 do
6756   IFS=$as_save_IFS
6757   test -z "$as_dir" && as_dir=.
6758     for ac_exec_ext in '' $ac_executable_extensions; do
6759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762     break 2
6763   fi
6764 done
6765   done
6766 IFS=$as_save_IFS
6767 
6768   ;;
6769 esac
6770 fi
6771 CUT=$ac_cv_path_CUT
6772 if test -n "$CUT"; then
6773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6774 $as_echo "$CUT" >&6; }
6775 else
6776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777 $as_echo "no" >&6; }
6778 fi
6779 
6780 
6781           if test "x$CUT" = x; then
6782             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783           fi
6784         else
6785           # Otherwise we believe it is a complete path. Use it as it is.
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6787 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6788           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6789 $as_echo_n "checking for CUT... " >&6; }
6790           if test ! -x "$tool_specified"; then
6791             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792 $as_echo "not found" >&6; }
6793             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6794           fi
6795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796 $as_echo "$tool_specified" >&6; }
6797         fi
6798       fi
6799     fi
6800 
6801   fi
6802 
6803 
6804 
6805   if test "x$CUT" = x; then
6806     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6807   fi
6808 
6809 
6810 
6811 
6812 
6813   # Publish this variable in the help.
6814 
6815 
6816   if [ -z "${DATE+x}" ]; then
6817     # The variable is not set by user, try to locate tool using the code snippet
6818     for ac_prog in date
6819 do
6820   # Extract the first word of "$ac_prog", so it can be a program name with args.
6821 set dummy $ac_prog; ac_word=$2
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6823 $as_echo_n "checking for $ac_word... " >&6; }
6824 if ${ac_cv_path_DATE+:} false; then :
6825   $as_echo_n "(cached) " >&6
6826 else
6827   case $DATE in
6828   [\\/]* | ?:[\\/]*)
6829   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6830   ;;
6831   *)
6832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6833 for as_dir in $PATH
6834 do
6835   IFS=$as_save_IFS
6836   test -z "$as_dir" && as_dir=.
6837     for ac_exec_ext in '' $ac_executable_extensions; do
6838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6839     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6841     break 2
6842   fi
6843 done
6844   done
6845 IFS=$as_save_IFS
6846 
6847   ;;
6848 esac
6849 fi
6850 DATE=$ac_cv_path_DATE
6851 if test -n "$DATE"; then
6852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6853 $as_echo "$DATE" >&6; }
6854 else
6855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6856 $as_echo "no" >&6; }
6857 fi
6858 
6859 
6860   test -n "$DATE" && break
6861 done
6862 
6863   else
6864     # The variable is set, but is it from the command line or the environment?
6865 
6866     # Try to remove the string !DATE! from our list.
6867     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6868     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6869       # If it failed, the variable was not from the command line. Ignore it,
6870       # but warn the user (except for BASH, which is always set by the calling BASH).
6871       if test "xDATE" != xBASH; then
6872         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6873 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6874       fi
6875       # Try to locate tool using the code snippet
6876       for ac_prog in date
6877 do
6878   # Extract the first word of "$ac_prog", so it can be a program name with args.
6879 set dummy $ac_prog; ac_word=$2
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881 $as_echo_n "checking for $ac_word... " >&6; }
6882 if ${ac_cv_path_DATE+:} false; then :
6883   $as_echo_n "(cached) " >&6
6884 else
6885   case $DATE in
6886   [\\/]* | ?:[\\/]*)
6887   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6888   ;;
6889   *)
6890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891 for as_dir in $PATH
6892 do
6893   IFS=$as_save_IFS
6894   test -z "$as_dir" && as_dir=.
6895     for ac_exec_ext in '' $ac_executable_extensions; do
6896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899     break 2
6900   fi
6901 done
6902   done
6903 IFS=$as_save_IFS
6904 
6905   ;;
6906 esac
6907 fi
6908 DATE=$ac_cv_path_DATE
6909 if test -n "$DATE"; then
6910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6911 $as_echo "$DATE" >&6; }
6912 else
6913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914 $as_echo "no" >&6; }
6915 fi
6916 
6917 
6918   test -n "$DATE" && break
6919 done
6920 
6921     else
6922       # If it succeeded, then it was overridden by the user. We will use it
6923       # for the tool.
6924 
6925       # First remove it from the list of overridden variables, so we can test
6926       # for unknown variables in the end.
6927       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6928 
6929       # Check if we try to supply an empty value
6930       if test "x$DATE" = x; then
6931         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6932 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6934 $as_echo_n "checking for DATE... " >&6; }
6935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6936 $as_echo "disabled" >&6; }
6937       else
6938         # Check if the provided tool contains a complete path.
6939         tool_specified="$DATE"
6940         tool_basename="${tool_specified##*/}"
6941         if test "x$tool_basename" = "x$tool_specified"; then
6942           # A command without a complete path is provided, search $PATH.
6943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6944 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6945           # Extract the first word of "$tool_basename", so it can be a program name with args.
6946 set dummy $tool_basename; ac_word=$2
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6948 $as_echo_n "checking for $ac_word... " >&6; }
6949 if ${ac_cv_path_DATE+:} false; then :
6950   $as_echo_n "(cached) " >&6
6951 else
6952   case $DATE in
6953   [\\/]* | ?:[\\/]*)
6954   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6955   ;;
6956   *)
6957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6958 for as_dir in $PATH
6959 do
6960   IFS=$as_save_IFS
6961   test -z "$as_dir" && as_dir=.
6962     for ac_exec_ext in '' $ac_executable_extensions; do
6963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6964     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6966     break 2
6967   fi
6968 done
6969   done
6970 IFS=$as_save_IFS
6971 
6972   ;;
6973 esac
6974 fi
6975 DATE=$ac_cv_path_DATE
6976 if test -n "$DATE"; then
6977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6978 $as_echo "$DATE" >&6; }
6979 else
6980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6981 $as_echo "no" >&6; }
6982 fi
6983 
6984 
6985           if test "x$DATE" = x; then
6986             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6987           fi
6988         else
6989           # Otherwise we believe it is a complete path. Use it as it is.
6990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6991 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6992           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6993 $as_echo_n "checking for DATE... " >&6; }
6994           if test ! -x "$tool_specified"; then
6995             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6996 $as_echo "not found" >&6; }
6997             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6998           fi
6999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7000 $as_echo "$tool_specified" >&6; }
7001         fi
7002       fi
7003     fi
7004 
7005   fi
7006 
7007 
7008 
7009   if test "x$DATE" = x; then
7010     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7011   fi
7012 
7013 
7014 
7015 
7016 
7017   # Publish this variable in the help.
7018 
7019 
7020   if [ -z "${DIFF+x}" ]; then
7021     # The variable is not set by user, try to locate tool using the code snippet
7022     for ac_prog in gdiff diff
7023 do
7024   # Extract the first word of "$ac_prog", so it can be a program name with args.
7025 set dummy $ac_prog; ac_word=$2
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if ${ac_cv_path_DIFF+:} false; then :
7029   $as_echo_n "(cached) " >&6
7030 else
7031   case $DIFF in
7032   [\\/]* | ?:[\\/]*)
7033   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7034   ;;
7035   *)
7036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050 
7051   ;;
7052 esac
7053 fi
7054 DIFF=$ac_cv_path_DIFF
7055 if test -n "$DIFF"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7057 $as_echo "$DIFF" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062 
7063 
7064   test -n "$DIFF" && break
7065 done
7066 
7067   else
7068     # The variable is set, but is it from the command line or the environment?
7069 
7070     # Try to remove the string !DIFF! from our list.
7071     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7072     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7073       # If it failed, the variable was not from the command line. Ignore it,
7074       # but warn the user (except for BASH, which is always set by the calling BASH).
7075       if test "xDIFF" != xBASH; then
7076         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7077 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7078       fi
7079       # Try to locate tool using the code snippet
7080       for ac_prog in gdiff diff
7081 do
7082   # Extract the first word of "$ac_prog", so it can be a program name with args.
7083 set dummy $ac_prog; ac_word=$2
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085 $as_echo_n "checking for $ac_word... " >&6; }
7086 if ${ac_cv_path_DIFF+:} false; then :
7087   $as_echo_n "(cached) " >&6
7088 else
7089   case $DIFF in
7090   [\\/]* | ?:[\\/]*)
7091   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7092   ;;
7093   *)
7094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 for as_dir in $PATH
7096 do
7097   IFS=$as_save_IFS
7098   test -z "$as_dir" && as_dir=.
7099     for ac_exec_ext in '' $ac_executable_extensions; do
7100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103     break 2
7104   fi
7105 done
7106   done
7107 IFS=$as_save_IFS
7108 
7109   ;;
7110 esac
7111 fi
7112 DIFF=$ac_cv_path_DIFF
7113 if test -n "$DIFF"; then
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7115 $as_echo "$DIFF" >&6; }
7116 else
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 $as_echo "no" >&6; }
7119 fi
7120 
7121 
7122   test -n "$DIFF" && break
7123 done
7124 
7125     else
7126       # If it succeeded, then it was overridden by the user. We will use it
7127       # for the tool.
7128 
7129       # First remove it from the list of overridden variables, so we can test
7130       # for unknown variables in the end.
7131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7132 
7133       # Check if we try to supply an empty value
7134       if test "x$DIFF" = x; then
7135         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7136 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7138 $as_echo_n "checking for DIFF... " >&6; }
7139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7140 $as_echo "disabled" >&6; }
7141       else
7142         # Check if the provided tool contains a complete path.
7143         tool_specified="$DIFF"
7144         tool_basename="${tool_specified##*/}"
7145         if test "x$tool_basename" = "x$tool_specified"; then
7146           # A command without a complete path is provided, search $PATH.
7147           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7148 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7149           # Extract the first word of "$tool_basename", so it can be a program name with args.
7150 set dummy $tool_basename; ac_word=$2
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152 $as_echo_n "checking for $ac_word... " >&6; }
7153 if ${ac_cv_path_DIFF+:} false; then :
7154   $as_echo_n "(cached) " >&6
7155 else
7156   case $DIFF in
7157   [\\/]* | ?:[\\/]*)
7158   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7159   ;;
7160   *)
7161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162 for as_dir in $PATH
7163 do
7164   IFS=$as_save_IFS
7165   test -z "$as_dir" && as_dir=.
7166     for ac_exec_ext in '' $ac_executable_extensions; do
7167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170     break 2
7171   fi
7172 done
7173   done
7174 IFS=$as_save_IFS
7175 
7176   ;;
7177 esac
7178 fi
7179 DIFF=$ac_cv_path_DIFF
7180 if test -n "$DIFF"; then
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7182 $as_echo "$DIFF" >&6; }
7183 else
7184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185 $as_echo "no" >&6; }
7186 fi
7187 
7188 
7189           if test "x$DIFF" = x; then
7190             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7191           fi
7192         else
7193           # Otherwise we believe it is a complete path. Use it as it is.
7194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7195 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7196           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7197 $as_echo_n "checking for DIFF... " >&6; }
7198           if test ! -x "$tool_specified"; then
7199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7200 $as_echo "not found" >&6; }
7201             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7202           fi
7203           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7204 $as_echo "$tool_specified" >&6; }
7205         fi
7206       fi
7207     fi
7208 
7209   fi
7210 
7211 
7212 
7213   if test "x$DIFF" = x; then
7214     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7215   fi
7216 
7217 
7218 
7219 
7220 
7221   # Publish this variable in the help.
7222 
7223 
7224   if [ -z "${DIRNAME+x}" ]; then
7225     # The variable is not set by user, try to locate tool using the code snippet
7226     for ac_prog in dirname
7227 do
7228   # Extract the first word of "$ac_prog", so it can be a program name with args.
7229 set dummy $ac_prog; ac_word=$2
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231 $as_echo_n "checking for $ac_word... " >&6; }
7232 if ${ac_cv_path_DIRNAME+:} false; then :
7233   $as_echo_n "(cached) " >&6
7234 else
7235   case $DIRNAME in
7236   [\\/]* | ?:[\\/]*)
7237   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7238   ;;
7239   *)
7240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241 for as_dir in $PATH
7242 do
7243   IFS=$as_save_IFS
7244   test -z "$as_dir" && as_dir=.
7245     for ac_exec_ext in '' $ac_executable_extensions; do
7246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249     break 2
7250   fi
7251 done
7252   done
7253 IFS=$as_save_IFS
7254 
7255   ;;
7256 esac
7257 fi
7258 DIRNAME=$ac_cv_path_DIRNAME
7259 if test -n "$DIRNAME"; then
7260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7261 $as_echo "$DIRNAME" >&6; }
7262 else
7263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264 $as_echo "no" >&6; }
7265 fi
7266 
7267 
7268   test -n "$DIRNAME" && break
7269 done
7270 
7271   else
7272     # The variable is set, but is it from the command line or the environment?
7273 
7274     # Try to remove the string !DIRNAME! from our list.
7275     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7276     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7277       # If it failed, the variable was not from the command line. Ignore it,
7278       # but warn the user (except for BASH, which is always set by the calling BASH).
7279       if test "xDIRNAME" != xBASH; then
7280         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7281 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7282       fi
7283       # Try to locate tool using the code snippet
7284       for ac_prog in dirname
7285 do
7286   # Extract the first word of "$ac_prog", so it can be a program name with args.
7287 set dummy $ac_prog; ac_word=$2
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289 $as_echo_n "checking for $ac_word... " >&6; }
7290 if ${ac_cv_path_DIRNAME+:} false; then :
7291   $as_echo_n "(cached) " >&6
7292 else
7293   case $DIRNAME in
7294   [\\/]* | ?:[\\/]*)
7295   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7296   ;;
7297   *)
7298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301   IFS=$as_save_IFS
7302   test -z "$as_dir" && as_dir=.
7303     for ac_exec_ext in '' $ac_executable_extensions; do
7304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307     break 2
7308   fi
7309 done
7310   done
7311 IFS=$as_save_IFS
7312 
7313   ;;
7314 esac
7315 fi
7316 DIRNAME=$ac_cv_path_DIRNAME
7317 if test -n "$DIRNAME"; then
7318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7319 $as_echo "$DIRNAME" >&6; }
7320 else
7321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322 $as_echo "no" >&6; }
7323 fi
7324 
7325 
7326   test -n "$DIRNAME" && break
7327 done
7328 
7329     else
7330       # If it succeeded, then it was overridden by the user. We will use it
7331       # for the tool.
7332 
7333       # First remove it from the list of overridden variables, so we can test
7334       # for unknown variables in the end.
7335       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7336 
7337       # Check if we try to supply an empty value
7338       if test "x$DIRNAME" = x; then
7339         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7340 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7341         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7342 $as_echo_n "checking for DIRNAME... " >&6; }
7343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7344 $as_echo "disabled" >&6; }
7345       else
7346         # Check if the provided tool contains a complete path.
7347         tool_specified="$DIRNAME"
7348         tool_basename="${tool_specified##*/}"
7349         if test "x$tool_basename" = "x$tool_specified"; then
7350           # A command without a complete path is provided, search $PATH.
7351           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7352 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7353           # Extract the first word of "$tool_basename", so it can be a program name with args.
7354 set dummy $tool_basename; ac_word=$2
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356 $as_echo_n "checking for $ac_word... " >&6; }
7357 if ${ac_cv_path_DIRNAME+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   case $DIRNAME in
7361   [\\/]* | ?:[\\/]*)
7362   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7363   ;;
7364   *)
7365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368   IFS=$as_save_IFS
7369   test -z "$as_dir" && as_dir=.
7370     for ac_exec_ext in '' $ac_executable_extensions; do
7371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374     break 2
7375   fi
7376 done
7377   done
7378 IFS=$as_save_IFS
7379 
7380   ;;
7381 esac
7382 fi
7383 DIRNAME=$ac_cv_path_DIRNAME
7384 if test -n "$DIRNAME"; then
7385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7386 $as_echo "$DIRNAME" >&6; }
7387 else
7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389 $as_echo "no" >&6; }
7390 fi
7391 
7392 
7393           if test "x$DIRNAME" = x; then
7394             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7395           fi
7396         else
7397           # Otherwise we believe it is a complete path. Use it as it is.
7398           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7399 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7400           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7401 $as_echo_n "checking for DIRNAME... " >&6; }
7402           if test ! -x "$tool_specified"; then
7403             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7404 $as_echo "not found" >&6; }
7405             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7406           fi
7407           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7408 $as_echo "$tool_specified" >&6; }
7409         fi
7410       fi
7411     fi
7412 
7413   fi
7414 
7415 
7416 
7417   if test "x$DIRNAME" = x; then
7418     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7419   fi
7420 
7421 
7422 
7423 
7424 
7425   # Publish this variable in the help.
7426 
7427 
7428   if [ -z "${ECHO+x}" ]; then
7429     # The variable is not set by user, try to locate tool using the code snippet
7430     for ac_prog in echo
7431 do
7432   # Extract the first word of "$ac_prog", so it can be a program name with args.
7433 set dummy $ac_prog; ac_word=$2
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435 $as_echo_n "checking for $ac_word... " >&6; }
7436 if ${ac_cv_path_ECHO+:} false; then :
7437   $as_echo_n "(cached) " >&6
7438 else
7439   case $ECHO in
7440   [\\/]* | ?:[\\/]*)
7441   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7442   ;;
7443   *)
7444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7445 for as_dir in $PATH
7446 do
7447   IFS=$as_save_IFS
7448   test -z "$as_dir" && as_dir=.
7449     for ac_exec_ext in '' $ac_executable_extensions; do
7450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7451     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7453     break 2
7454   fi
7455 done
7456   done
7457 IFS=$as_save_IFS
7458 
7459   ;;
7460 esac
7461 fi
7462 ECHO=$ac_cv_path_ECHO
7463 if test -n "$ECHO"; then
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7465 $as_echo "$ECHO" >&6; }
7466 else
7467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470 
7471 
7472   test -n "$ECHO" && break
7473 done
7474 
7475   else
7476     # The variable is set, but is it from the command line or the environment?
7477 
7478     # Try to remove the string !ECHO! from our list.
7479     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7480     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7481       # If it failed, the variable was not from the command line. Ignore it,
7482       # but warn the user (except for BASH, which is always set by the calling BASH).
7483       if test "xECHO" != xBASH; then
7484         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7485 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7486       fi
7487       # Try to locate tool using the code snippet
7488       for ac_prog in echo
7489 do
7490   # Extract the first word of "$ac_prog", so it can be a program name with args.
7491 set dummy $ac_prog; ac_word=$2
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7493 $as_echo_n "checking for $ac_word... " >&6; }
7494 if ${ac_cv_path_ECHO+:} false; then :
7495   $as_echo_n "(cached) " >&6
7496 else
7497   case $ECHO in
7498   [\\/]* | ?:[\\/]*)
7499   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7500   ;;
7501   *)
7502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503 for as_dir in $PATH
7504 do
7505   IFS=$as_save_IFS
7506   test -z "$as_dir" && as_dir=.
7507     for ac_exec_ext in '' $ac_executable_extensions; do
7508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7509     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7511     break 2
7512   fi
7513 done
7514   done
7515 IFS=$as_save_IFS
7516 
7517   ;;
7518 esac
7519 fi
7520 ECHO=$ac_cv_path_ECHO
7521 if test -n "$ECHO"; then
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7523 $as_echo "$ECHO" >&6; }
7524 else
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527 fi
7528 
7529 
7530   test -n "$ECHO" && break
7531 done
7532 
7533     else
7534       # If it succeeded, then it was overridden by the user. We will use it
7535       # for the tool.
7536 
7537       # First remove it from the list of overridden variables, so we can test
7538       # for unknown variables in the end.
7539       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7540 
7541       # Check if we try to supply an empty value
7542       if test "x$ECHO" = x; then
7543         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7544 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7545         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7546 $as_echo_n "checking for ECHO... " >&6; }
7547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7548 $as_echo "disabled" >&6; }
7549       else
7550         # Check if the provided tool contains a complete path.
7551         tool_specified="$ECHO"
7552         tool_basename="${tool_specified##*/}"
7553         if test "x$tool_basename" = "x$tool_specified"; then
7554           # A command without a complete path is provided, search $PATH.
7555           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7556 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7557           # Extract the first word of "$tool_basename", so it can be a program name with args.
7558 set dummy $tool_basename; ac_word=$2
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7560 $as_echo_n "checking for $ac_word... " >&6; }
7561 if ${ac_cv_path_ECHO+:} false; then :
7562   $as_echo_n "(cached) " >&6
7563 else
7564   case $ECHO in
7565   [\\/]* | ?:[\\/]*)
7566   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7567   ;;
7568   *)
7569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570 for as_dir in $PATH
7571 do
7572   IFS=$as_save_IFS
7573   test -z "$as_dir" && as_dir=.
7574     for ac_exec_ext in '' $ac_executable_extensions; do
7575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7576     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7578     break 2
7579   fi
7580 done
7581   done
7582 IFS=$as_save_IFS
7583 
7584   ;;
7585 esac
7586 fi
7587 ECHO=$ac_cv_path_ECHO
7588 if test -n "$ECHO"; then
7589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7590 $as_echo "$ECHO" >&6; }
7591 else
7592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7593 $as_echo "no" >&6; }
7594 fi
7595 
7596 
7597           if test "x$ECHO" = x; then
7598             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7599           fi
7600         else
7601           # Otherwise we believe it is a complete path. Use it as it is.
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7603 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7604           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7605 $as_echo_n "checking for ECHO... " >&6; }
7606           if test ! -x "$tool_specified"; then
7607             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7608 $as_echo "not found" >&6; }
7609             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7610           fi
7611           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7612 $as_echo "$tool_specified" >&6; }
7613         fi
7614       fi
7615     fi
7616 
7617   fi
7618 
7619 
7620 
7621   if test "x$ECHO" = x; then
7622     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7623   fi
7624 
7625 
7626 
7627 
7628 
7629   # Publish this variable in the help.
7630 
7631 
7632   if [ -z "${EXPR+x}" ]; then
7633     # The variable is not set by user, try to locate tool using the code snippet
7634     for ac_prog in expr
7635 do
7636   # Extract the first word of "$ac_prog", so it can be a program name with args.
7637 set dummy $ac_prog; ac_word=$2
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639 $as_echo_n "checking for $ac_word... " >&6; }
7640 if ${ac_cv_path_EXPR+:} false; then :
7641   $as_echo_n "(cached) " >&6
7642 else
7643   case $EXPR in
7644   [\\/]* | ?:[\\/]*)
7645   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7646   ;;
7647   *)
7648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649 for as_dir in $PATH
7650 do
7651   IFS=$as_save_IFS
7652   test -z "$as_dir" && as_dir=.
7653     for ac_exec_ext in '' $ac_executable_extensions; do
7654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7655     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7657     break 2
7658   fi
7659 done
7660   done
7661 IFS=$as_save_IFS
7662 
7663   ;;
7664 esac
7665 fi
7666 EXPR=$ac_cv_path_EXPR
7667 if test -n "$EXPR"; then
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7669 $as_echo "$EXPR" >&6; }
7670 else
7671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7672 $as_echo "no" >&6; }
7673 fi
7674 
7675 
7676   test -n "$EXPR" && break
7677 done
7678 
7679   else
7680     # The variable is set, but is it from the command line or the environment?
7681 
7682     # Try to remove the string !EXPR! from our list.
7683     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7684     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7685       # If it failed, the variable was not from the command line. Ignore it,
7686       # but warn the user (except for BASH, which is always set by the calling BASH).
7687       if test "xEXPR" != xBASH; then
7688         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7689 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7690       fi
7691       # Try to locate tool using the code snippet
7692       for ac_prog in expr
7693 do
7694   # Extract the first word of "$ac_prog", so it can be a program name with args.
7695 set dummy $ac_prog; ac_word=$2
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697 $as_echo_n "checking for $ac_word... " >&6; }
7698 if ${ac_cv_path_EXPR+:} false; then :
7699   $as_echo_n "(cached) " >&6
7700 else
7701   case $EXPR in
7702   [\\/]* | ?:[\\/]*)
7703   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7704   ;;
7705   *)
7706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707 for as_dir in $PATH
7708 do
7709   IFS=$as_save_IFS
7710   test -z "$as_dir" && as_dir=.
7711     for ac_exec_ext in '' $ac_executable_extensions; do
7712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7713     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7715     break 2
7716   fi
7717 done
7718   done
7719 IFS=$as_save_IFS
7720 
7721   ;;
7722 esac
7723 fi
7724 EXPR=$ac_cv_path_EXPR
7725 if test -n "$EXPR"; then
7726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7727 $as_echo "$EXPR" >&6; }
7728 else
7729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730 $as_echo "no" >&6; }
7731 fi
7732 
7733 
7734   test -n "$EXPR" && break
7735 done
7736 
7737     else
7738       # If it succeeded, then it was overridden by the user. We will use it
7739       # for the tool.
7740 
7741       # First remove it from the list of overridden variables, so we can test
7742       # for unknown variables in the end.
7743       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7744 
7745       # Check if we try to supply an empty value
7746       if test "x$EXPR" = x; then
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7748 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7750 $as_echo_n "checking for EXPR... " >&6; }
7751         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7752 $as_echo "disabled" >&6; }
7753       else
7754         # Check if the provided tool contains a complete path.
7755         tool_specified="$EXPR"
7756         tool_basename="${tool_specified##*/}"
7757         if test "x$tool_basename" = "x$tool_specified"; then
7758           # A command without a complete path is provided, search $PATH.
7759           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7760 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7761           # Extract the first word of "$tool_basename", so it can be a program name with args.
7762 set dummy $tool_basename; ac_word=$2
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7764 $as_echo_n "checking for $ac_word... " >&6; }
7765 if ${ac_cv_path_EXPR+:} false; then :
7766   $as_echo_n "(cached) " >&6
7767 else
7768   case $EXPR in
7769   [\\/]* | ?:[\\/]*)
7770   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7771   ;;
7772   *)
7773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7774 for as_dir in $PATH
7775 do
7776   IFS=$as_save_IFS
7777   test -z "$as_dir" && as_dir=.
7778     for ac_exec_ext in '' $ac_executable_extensions; do
7779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7780     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7782     break 2
7783   fi
7784 done
7785   done
7786 IFS=$as_save_IFS
7787 
7788   ;;
7789 esac
7790 fi
7791 EXPR=$ac_cv_path_EXPR
7792 if test -n "$EXPR"; then
7793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7794 $as_echo "$EXPR" >&6; }
7795 else
7796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797 $as_echo "no" >&6; }
7798 fi
7799 
7800 
7801           if test "x$EXPR" = x; then
7802             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7803           fi
7804         else
7805           # Otherwise we believe it is a complete path. Use it as it is.
7806           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7807 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7808           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7809 $as_echo_n "checking for EXPR... " >&6; }
7810           if test ! -x "$tool_specified"; then
7811             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7812 $as_echo "not found" >&6; }
7813             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7814           fi
7815           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7816 $as_echo "$tool_specified" >&6; }
7817         fi
7818       fi
7819     fi
7820 
7821   fi
7822 
7823 
7824 
7825   if test "x$EXPR" = x; then
7826     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7827   fi
7828 
7829 
7830 
7831 
7832 
7833   # Publish this variable in the help.
7834 
7835 
7836   if [ -z "${FILE+x}" ]; then
7837     # The variable is not set by user, try to locate tool using the code snippet
7838     for ac_prog in file
7839 do
7840   # Extract the first word of "$ac_prog", so it can be a program name with args.
7841 set dummy $ac_prog; ac_word=$2
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843 $as_echo_n "checking for $ac_word... " >&6; }
7844 if ${ac_cv_path_FILE+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   case $FILE in
7848   [\\/]* | ?:[\\/]*)
7849   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7850   ;;
7851   *)
7852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853 for as_dir in $PATH
7854 do
7855   IFS=$as_save_IFS
7856   test -z "$as_dir" && as_dir=.
7857     for ac_exec_ext in '' $ac_executable_extensions; do
7858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861     break 2
7862   fi
7863 done
7864   done
7865 IFS=$as_save_IFS
7866 
7867   ;;
7868 esac
7869 fi
7870 FILE=$ac_cv_path_FILE
7871 if test -n "$FILE"; then
7872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7873 $as_echo "$FILE" >&6; }
7874 else
7875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876 $as_echo "no" >&6; }
7877 fi
7878 
7879 
7880   test -n "$FILE" && break
7881 done
7882 
7883   else
7884     # The variable is set, but is it from the command line or the environment?
7885 
7886     # Try to remove the string !FILE! from our list.
7887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7889       # If it failed, the variable was not from the command line. Ignore it,
7890       # but warn the user (except for BASH, which is always set by the calling BASH).
7891       if test "xFILE" != xBASH; then
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7893 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7894       fi
7895       # Try to locate tool using the code snippet
7896       for ac_prog in file
7897 do
7898   # Extract the first word of "$ac_prog", so it can be a program name with args.
7899 set dummy $ac_prog; ac_word=$2
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901 $as_echo_n "checking for $ac_word... " >&6; }
7902 if ${ac_cv_path_FILE+:} false; then :
7903   $as_echo_n "(cached) " >&6
7904 else
7905   case $FILE in
7906   [\\/]* | ?:[\\/]*)
7907   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7908   ;;
7909   *)
7910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913   IFS=$as_save_IFS
7914   test -z "$as_dir" && as_dir=.
7915     for ac_exec_ext in '' $ac_executable_extensions; do
7916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919     break 2
7920   fi
7921 done
7922   done
7923 IFS=$as_save_IFS
7924 
7925   ;;
7926 esac
7927 fi
7928 FILE=$ac_cv_path_FILE
7929 if test -n "$FILE"; then
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7931 $as_echo "$FILE" >&6; }
7932 else
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934 $as_echo "no" >&6; }
7935 fi
7936 
7937 
7938   test -n "$FILE" && break
7939 done
7940 
7941     else
7942       # If it succeeded, then it was overridden by the user. We will use it
7943       # for the tool.
7944 
7945       # First remove it from the list of overridden variables, so we can test
7946       # for unknown variables in the end.
7947       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7948 
7949       # Check if we try to supply an empty value
7950       if test "x$FILE" = x; then
7951         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7952 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7954 $as_echo_n "checking for FILE... " >&6; }
7955         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7956 $as_echo "disabled" >&6; }
7957       else
7958         # Check if the provided tool contains a complete path.
7959         tool_specified="$FILE"
7960         tool_basename="${tool_specified##*/}"
7961         if test "x$tool_basename" = "x$tool_specified"; then
7962           # A command without a complete path is provided, search $PATH.
7963           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7964 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7965           # Extract the first word of "$tool_basename", so it can be a program name with args.
7966 set dummy $tool_basename; ac_word=$2
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968 $as_echo_n "checking for $ac_word... " >&6; }
7969 if ${ac_cv_path_FILE+:} false; then :
7970   $as_echo_n "(cached) " >&6
7971 else
7972   case $FILE in
7973   [\\/]* | ?:[\\/]*)
7974   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7975   ;;
7976   *)
7977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7978 for as_dir in $PATH
7979 do
7980   IFS=$as_save_IFS
7981   test -z "$as_dir" && as_dir=.
7982     for ac_exec_ext in '' $ac_executable_extensions; do
7983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7984     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7986     break 2
7987   fi
7988 done
7989   done
7990 IFS=$as_save_IFS
7991 
7992   ;;
7993 esac
7994 fi
7995 FILE=$ac_cv_path_FILE
7996 if test -n "$FILE"; then
7997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7998 $as_echo "$FILE" >&6; }
7999 else
8000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001 $as_echo "no" >&6; }
8002 fi
8003 
8004 
8005           if test "x$FILE" = x; then
8006             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8007           fi
8008         else
8009           # Otherwise we believe it is a complete path. Use it as it is.
8010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8011 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8012           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8013 $as_echo_n "checking for FILE... " >&6; }
8014           if test ! -x "$tool_specified"; then
8015             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8016 $as_echo "not found" >&6; }
8017             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8018           fi
8019           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8020 $as_echo "$tool_specified" >&6; }
8021         fi
8022       fi
8023     fi
8024 
8025   fi
8026 
8027 
8028 
8029   if test "x$FILE" = x; then
8030     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8031   fi
8032 
8033 
8034 
8035 
8036 
8037   # Publish this variable in the help.
8038 
8039 
8040   if [ -z "${FIND+x}" ]; then
8041     # The variable is not set by user, try to locate tool using the code snippet
8042     for ac_prog in find
8043 do
8044   # Extract the first word of "$ac_prog", so it can be a program name with args.
8045 set dummy $ac_prog; ac_word=$2
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8047 $as_echo_n "checking for $ac_word... " >&6; }
8048 if ${ac_cv_path_FIND+:} false; then :
8049   $as_echo_n "(cached) " >&6
8050 else
8051   case $FIND in
8052   [\\/]* | ?:[\\/]*)
8053   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8054   ;;
8055   *)
8056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8057 for as_dir in $PATH
8058 do
8059   IFS=$as_save_IFS
8060   test -z "$as_dir" && as_dir=.
8061     for ac_exec_ext in '' $ac_executable_extensions; do
8062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8063     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8065     break 2
8066   fi
8067 done
8068   done
8069 IFS=$as_save_IFS
8070 
8071   ;;
8072 esac
8073 fi
8074 FIND=$ac_cv_path_FIND
8075 if test -n "$FIND"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8077 $as_echo "$FIND" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082 
8083 
8084   test -n "$FIND" && break
8085 done
8086 
8087   else
8088     # The variable is set, but is it from the command line or the environment?
8089 
8090     # Try to remove the string !FIND! from our list.
8091     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8092     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8093       # If it failed, the variable was not from the command line. Ignore it,
8094       # but warn the user (except for BASH, which is always set by the calling BASH).
8095       if test "xFIND" != xBASH; then
8096         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8097 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8098       fi
8099       # Try to locate tool using the code snippet
8100       for ac_prog in find
8101 do
8102   # Extract the first word of "$ac_prog", so it can be a program name with args.
8103 set dummy $ac_prog; ac_word=$2
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8105 $as_echo_n "checking for $ac_word... " >&6; }
8106 if ${ac_cv_path_FIND+:} false; then :
8107   $as_echo_n "(cached) " >&6
8108 else
8109   case $FIND in
8110   [\\/]* | ?:[\\/]*)
8111   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8112   ;;
8113   *)
8114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115 for as_dir in $PATH
8116 do
8117   IFS=$as_save_IFS
8118   test -z "$as_dir" && as_dir=.
8119     for ac_exec_ext in '' $ac_executable_extensions; do
8120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8121     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8123     break 2
8124   fi
8125 done
8126   done
8127 IFS=$as_save_IFS
8128 
8129   ;;
8130 esac
8131 fi
8132 FIND=$ac_cv_path_FIND
8133 if test -n "$FIND"; then
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8135 $as_echo "$FIND" >&6; }
8136 else
8137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138 $as_echo "no" >&6; }
8139 fi
8140 
8141 
8142   test -n "$FIND" && break
8143 done
8144 
8145     else
8146       # If it succeeded, then it was overridden by the user. We will use it
8147       # for the tool.
8148 
8149       # First remove it from the list of overridden variables, so we can test
8150       # for unknown variables in the end.
8151       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8152 
8153       # Check if we try to supply an empty value
8154       if test "x$FIND" = x; then
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8156 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8158 $as_echo_n "checking for FIND... " >&6; }
8159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8160 $as_echo "disabled" >&6; }
8161       else
8162         # Check if the provided tool contains a complete path.
8163         tool_specified="$FIND"
8164         tool_basename="${tool_specified##*/}"
8165         if test "x$tool_basename" = "x$tool_specified"; then
8166           # A command without a complete path is provided, search $PATH.
8167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8168 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8169           # Extract the first word of "$tool_basename", so it can be a program name with args.
8170 set dummy $tool_basename; ac_word=$2
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172 $as_echo_n "checking for $ac_word... " >&6; }
8173 if ${ac_cv_path_FIND+:} false; then :
8174   $as_echo_n "(cached) " >&6
8175 else
8176   case $FIND in
8177   [\\/]* | ?:[\\/]*)
8178   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8179   ;;
8180   *)
8181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182 for as_dir in $PATH
8183 do
8184   IFS=$as_save_IFS
8185   test -z "$as_dir" && as_dir=.
8186     for ac_exec_ext in '' $ac_executable_extensions; do
8187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190     break 2
8191   fi
8192 done
8193   done
8194 IFS=$as_save_IFS
8195 
8196   ;;
8197 esac
8198 fi
8199 FIND=$ac_cv_path_FIND
8200 if test -n "$FIND"; then
8201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8202 $as_echo "$FIND" >&6; }
8203 else
8204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205 $as_echo "no" >&6; }
8206 fi
8207 
8208 
8209           if test "x$FIND" = x; then
8210             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8211           fi
8212         else
8213           # Otherwise we believe it is a complete path. Use it as it is.
8214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8215 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8216           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8217 $as_echo_n "checking for FIND... " >&6; }
8218           if test ! -x "$tool_specified"; then
8219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8220 $as_echo "not found" >&6; }
8221             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8222           fi
8223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8224 $as_echo "$tool_specified" >&6; }
8225         fi
8226       fi
8227     fi
8228 
8229   fi
8230 
8231 
8232 
8233   if test "x$FIND" = x; then
8234     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8235   fi
8236 
8237 
8238 
8239 
8240 
8241   # Publish this variable in the help.
8242 
8243 
8244   if [ -z "${HEAD+x}" ]; then
8245     # The variable is not set by user, try to locate tool using the code snippet
8246     for ac_prog in head
8247 do
8248   # Extract the first word of "$ac_prog", so it can be a program name with args.
8249 set dummy $ac_prog; ac_word=$2
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251 $as_echo_n "checking for $ac_word... " >&6; }
8252 if ${ac_cv_path_HEAD+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255   case $HEAD in
8256   [\\/]* | ?:[\\/]*)
8257   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8258   ;;
8259   *)
8260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261 for as_dir in $PATH
8262 do
8263   IFS=$as_save_IFS
8264   test -z "$as_dir" && as_dir=.
8265     for ac_exec_ext in '' $ac_executable_extensions; do
8266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269     break 2
8270   fi
8271 done
8272   done
8273 IFS=$as_save_IFS
8274 
8275   ;;
8276 esac
8277 fi
8278 HEAD=$ac_cv_path_HEAD
8279 if test -n "$HEAD"; then
8280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8281 $as_echo "$HEAD" >&6; }
8282 else
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284 $as_echo "no" >&6; }
8285 fi
8286 
8287 
8288   test -n "$HEAD" && break
8289 done
8290 
8291   else
8292     # The variable is set, but is it from the command line or the environment?
8293 
8294     # Try to remove the string !HEAD! from our list.
8295     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8296     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8297       # If it failed, the variable was not from the command line. Ignore it,
8298       # but warn the user (except for BASH, which is always set by the calling BASH).
8299       if test "xHEAD" != xBASH; then
8300         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8301 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8302       fi
8303       # Try to locate tool using the code snippet
8304       for ac_prog in head
8305 do
8306   # Extract the first word of "$ac_prog", so it can be a program name with args.
8307 set dummy $ac_prog; ac_word=$2
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8309 $as_echo_n "checking for $ac_word... " >&6; }
8310 if ${ac_cv_path_HEAD+:} false; then :
8311   $as_echo_n "(cached) " >&6
8312 else
8313   case $HEAD in
8314   [\\/]* | ?:[\\/]*)
8315   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8316   ;;
8317   *)
8318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319 for as_dir in $PATH
8320 do
8321   IFS=$as_save_IFS
8322   test -z "$as_dir" && as_dir=.
8323     for ac_exec_ext in '' $ac_executable_extensions; do
8324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327     break 2
8328   fi
8329 done
8330   done
8331 IFS=$as_save_IFS
8332 
8333   ;;
8334 esac
8335 fi
8336 HEAD=$ac_cv_path_HEAD
8337 if test -n "$HEAD"; then
8338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8339 $as_echo "$HEAD" >&6; }
8340 else
8341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342 $as_echo "no" >&6; }
8343 fi
8344 
8345 
8346   test -n "$HEAD" && break
8347 done
8348 
8349     else
8350       # If it succeeded, then it was overridden by the user. We will use it
8351       # for the tool.
8352 
8353       # First remove it from the list of overridden variables, so we can test
8354       # for unknown variables in the end.
8355       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8356 
8357       # Check if we try to supply an empty value
8358       if test "x$HEAD" = x; then
8359         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8360 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8362 $as_echo_n "checking for HEAD... " >&6; }
8363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8364 $as_echo "disabled" >&6; }
8365       else
8366         # Check if the provided tool contains a complete path.
8367         tool_specified="$HEAD"
8368         tool_basename="${tool_specified##*/}"
8369         if test "x$tool_basename" = "x$tool_specified"; then
8370           # A command without a complete path is provided, search $PATH.
8371           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8372 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8373           # Extract the first word of "$tool_basename", so it can be a program name with args.
8374 set dummy $tool_basename; ac_word=$2
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8376 $as_echo_n "checking for $ac_word... " >&6; }
8377 if ${ac_cv_path_HEAD+:} false; then :
8378   $as_echo_n "(cached) " >&6
8379 else
8380   case $HEAD in
8381   [\\/]* | ?:[\\/]*)
8382   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8383   ;;
8384   *)
8385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386 for as_dir in $PATH
8387 do
8388   IFS=$as_save_IFS
8389   test -z "$as_dir" && as_dir=.
8390     for ac_exec_ext in '' $ac_executable_extensions; do
8391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394     break 2
8395   fi
8396 done
8397   done
8398 IFS=$as_save_IFS
8399 
8400   ;;
8401 esac
8402 fi
8403 HEAD=$ac_cv_path_HEAD
8404 if test -n "$HEAD"; then
8405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8406 $as_echo "$HEAD" >&6; }
8407 else
8408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409 $as_echo "no" >&6; }
8410 fi
8411 
8412 
8413           if test "x$HEAD" = x; then
8414             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8415           fi
8416         else
8417           # Otherwise we believe it is a complete path. Use it as it is.
8418           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8419 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8420           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8421 $as_echo_n "checking for HEAD... " >&6; }
8422           if test ! -x "$tool_specified"; then
8423             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8424 $as_echo "not found" >&6; }
8425             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8426           fi
8427           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8428 $as_echo "$tool_specified" >&6; }
8429         fi
8430       fi
8431     fi
8432 
8433   fi
8434 
8435 
8436 
8437   if test "x$HEAD" = x; then
8438     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8439   fi
8440 
8441 
8442 
8443 
8444 
8445   # Publish this variable in the help.
8446 
8447 
8448   if [ -z "${GUNZIP+x}" ]; then
8449     # The variable is not set by user, try to locate tool using the code snippet
8450     for ac_prog in gunzip
8451 do
8452   # Extract the first word of "$ac_prog", so it can be a program name with args.
8453 set dummy $ac_prog; ac_word=$2
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455 $as_echo_n "checking for $ac_word... " >&6; }
8456 if ${ac_cv_path_GUNZIP+:} false; then :
8457   $as_echo_n "(cached) " >&6
8458 else
8459   case $GUNZIP in
8460   [\\/]* | ?:[\\/]*)
8461   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8462   ;;
8463   *)
8464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465 for as_dir in $PATH
8466 do
8467   IFS=$as_save_IFS
8468   test -z "$as_dir" && as_dir=.
8469     for ac_exec_ext in '' $ac_executable_extensions; do
8470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8471     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473     break 2
8474   fi
8475 done
8476   done
8477 IFS=$as_save_IFS
8478 
8479   ;;
8480 esac
8481 fi
8482 GUNZIP=$ac_cv_path_GUNZIP
8483 if test -n "$GUNZIP"; then
8484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8485 $as_echo "$GUNZIP" >&6; }
8486 else
8487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488 $as_echo "no" >&6; }
8489 fi
8490 
8491 
8492   test -n "$GUNZIP" && break
8493 done
8494 
8495   else
8496     # The variable is set, but is it from the command line or the environment?
8497 
8498     # Try to remove the string !GUNZIP! from our list.
8499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8501       # If it failed, the variable was not from the command line. Ignore it,
8502       # but warn the user (except for BASH, which is always set by the calling BASH).
8503       if test "xGUNZIP" != xBASH; then
8504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8505 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8506       fi
8507       # Try to locate tool using the code snippet
8508       for ac_prog in gunzip
8509 do
8510   # Extract the first word of "$ac_prog", so it can be a program name with args.
8511 set dummy $ac_prog; ac_word=$2
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513 $as_echo_n "checking for $ac_word... " >&6; }
8514 if ${ac_cv_path_GUNZIP+:} false; then :
8515   $as_echo_n "(cached) " >&6
8516 else
8517   case $GUNZIP in
8518   [\\/]* | ?:[\\/]*)
8519   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8520   ;;
8521   *)
8522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536 
8537   ;;
8538 esac
8539 fi
8540 GUNZIP=$ac_cv_path_GUNZIP
8541 if test -n "$GUNZIP"; then
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8543 $as_echo "$GUNZIP" >&6; }
8544 else
8545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546 $as_echo "no" >&6; }
8547 fi
8548 
8549 
8550   test -n "$GUNZIP" && break
8551 done
8552 
8553     else
8554       # If it succeeded, then it was overridden by the user. We will use it
8555       # for the tool.
8556 
8557       # First remove it from the list of overridden variables, so we can test
8558       # for unknown variables in the end.
8559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8560 
8561       # Check if we try to supply an empty value
8562       if test "x$GUNZIP" = x; then
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8564 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8566 $as_echo_n "checking for GUNZIP... " >&6; }
8567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8568 $as_echo "disabled" >&6; }
8569       else
8570         # Check if the provided tool contains a complete path.
8571         tool_specified="$GUNZIP"
8572         tool_basename="${tool_specified##*/}"
8573         if test "x$tool_basename" = "x$tool_specified"; then
8574           # A command without a complete path is provided, search $PATH.
8575           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8576 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8577           # Extract the first word of "$tool_basename", so it can be a program name with args.
8578 set dummy $tool_basename; ac_word=$2
8579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8580 $as_echo_n "checking for $ac_word... " >&6; }
8581 if ${ac_cv_path_GUNZIP+:} false; then :
8582   $as_echo_n "(cached) " >&6
8583 else
8584   case $GUNZIP in
8585   [\\/]* | ?:[\\/]*)
8586   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8587   ;;
8588   *)
8589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590 for as_dir in $PATH
8591 do
8592   IFS=$as_save_IFS
8593   test -z "$as_dir" && as_dir=.
8594     for ac_exec_ext in '' $ac_executable_extensions; do
8595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8596     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8598     break 2
8599   fi
8600 done
8601   done
8602 IFS=$as_save_IFS
8603 
8604   ;;
8605 esac
8606 fi
8607 GUNZIP=$ac_cv_path_GUNZIP
8608 if test -n "$GUNZIP"; then
8609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8610 $as_echo "$GUNZIP" >&6; }
8611 else
8612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8613 $as_echo "no" >&6; }
8614 fi
8615 
8616 
8617           if test "x$GUNZIP" = x; then
8618             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8619           fi
8620         else
8621           # Otherwise we believe it is a complete path. Use it as it is.
8622           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8623 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8624           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8625 $as_echo_n "checking for GUNZIP... " >&6; }
8626           if test ! -x "$tool_specified"; then
8627             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8628 $as_echo "not found" >&6; }
8629             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8630           fi
8631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8632 $as_echo "$tool_specified" >&6; }
8633         fi
8634       fi
8635     fi
8636 
8637   fi
8638 
8639 
8640 
8641   if test "x$GUNZIP" = x; then
8642     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8643   fi
8644 
8645 
8646 
8647 
8648 
8649   # Publish this variable in the help.
8650 
8651 
8652   if [ -z "${GZIP+x}" ]; then
8653     # The variable is not set by user, try to locate tool using the code snippet
8654     for ac_prog in pigz gzip
8655 do
8656   # Extract the first word of "$ac_prog", so it can be a program name with args.
8657 set dummy $ac_prog; ac_word=$2
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659 $as_echo_n "checking for $ac_word... " >&6; }
8660 if ${ac_cv_path_GZIP+:} false; then :
8661   $as_echo_n "(cached) " >&6
8662 else
8663   case $GZIP in
8664   [\\/]* | ?:[\\/]*)
8665   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8666   ;;
8667   *)
8668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669 for as_dir in $PATH
8670 do
8671   IFS=$as_save_IFS
8672   test -z "$as_dir" && as_dir=.
8673     for ac_exec_ext in '' $ac_executable_extensions; do
8674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677     break 2
8678   fi
8679 done
8680   done
8681 IFS=$as_save_IFS
8682 
8683   ;;
8684 esac
8685 fi
8686 GZIP=$ac_cv_path_GZIP
8687 if test -n "$GZIP"; then
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8689 $as_echo "$GZIP" >&6; }
8690 else
8691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692 $as_echo "no" >&6; }
8693 fi
8694 
8695 
8696   test -n "$GZIP" && break
8697 done
8698 
8699   else
8700     # The variable is set, but is it from the command line or the environment?
8701 
8702     # Try to remove the string !GZIP! from our list.
8703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8705       # If it failed, the variable was not from the command line. Ignore it,
8706       # but warn the user (except for BASH, which is always set by the calling BASH).
8707       if test "xGZIP" != xBASH; then
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8709 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8710       fi
8711       # Try to locate tool using the code snippet
8712       for ac_prog in pigz gzip
8713 do
8714   # Extract the first word of "$ac_prog", so it can be a program name with args.
8715 set dummy $ac_prog; ac_word=$2
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8717 $as_echo_n "checking for $ac_word... " >&6; }
8718 if ${ac_cv_path_GZIP+:} false; then :
8719   $as_echo_n "(cached) " >&6
8720 else
8721   case $GZIP in
8722   [\\/]* | ?:[\\/]*)
8723   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8724   ;;
8725   *)
8726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727 for as_dir in $PATH
8728 do
8729   IFS=$as_save_IFS
8730   test -z "$as_dir" && as_dir=.
8731     for ac_exec_ext in '' $ac_executable_extensions; do
8732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735     break 2
8736   fi
8737 done
8738   done
8739 IFS=$as_save_IFS
8740 
8741   ;;
8742 esac
8743 fi
8744 GZIP=$ac_cv_path_GZIP
8745 if test -n "$GZIP"; then
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8747 $as_echo "$GZIP" >&6; }
8748 else
8749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750 $as_echo "no" >&6; }
8751 fi
8752 
8753 
8754   test -n "$GZIP" && break
8755 done
8756 
8757     else
8758       # If it succeeded, then it was overridden by the user. We will use it
8759       # for the tool.
8760 
8761       # First remove it from the list of overridden variables, so we can test
8762       # for unknown variables in the end.
8763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8764 
8765       # Check if we try to supply an empty value
8766       if test "x$GZIP" = x; then
8767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8768 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8770 $as_echo_n "checking for GZIP... " >&6; }
8771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8772 $as_echo "disabled" >&6; }
8773       else
8774         # Check if the provided tool contains a complete path.
8775         tool_specified="$GZIP"
8776         tool_basename="${tool_specified##*/}"
8777         if test "x$tool_basename" = "x$tool_specified"; then
8778           # A command without a complete path is provided, search $PATH.
8779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8780 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8781           # Extract the first word of "$tool_basename", so it can be a program name with args.
8782 set dummy $tool_basename; ac_word=$2
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8784 $as_echo_n "checking for $ac_word... " >&6; }
8785 if ${ac_cv_path_GZIP+:} false; then :
8786   $as_echo_n "(cached) " >&6
8787 else
8788   case $GZIP in
8789   [\\/]* | ?:[\\/]*)
8790   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8791   ;;
8792   *)
8793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794 for as_dir in $PATH
8795 do
8796   IFS=$as_save_IFS
8797   test -z "$as_dir" && as_dir=.
8798     for ac_exec_ext in '' $ac_executable_extensions; do
8799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8800     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8802     break 2
8803   fi
8804 done
8805   done
8806 IFS=$as_save_IFS
8807 
8808   ;;
8809 esac
8810 fi
8811 GZIP=$ac_cv_path_GZIP
8812 if test -n "$GZIP"; then
8813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8814 $as_echo "$GZIP" >&6; }
8815 else
8816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817 $as_echo "no" >&6; }
8818 fi
8819 
8820 
8821           if test "x$GZIP" = x; then
8822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8823           fi
8824         else
8825           # Otherwise we believe it is a complete path. Use it as it is.
8826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8827 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8829 $as_echo_n "checking for GZIP... " >&6; }
8830           if test ! -x "$tool_specified"; then
8831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8832 $as_echo "not found" >&6; }
8833             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8834           fi
8835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8836 $as_echo "$tool_specified" >&6; }
8837         fi
8838       fi
8839     fi
8840 
8841   fi
8842 
8843 
8844 
8845   if test "x$GZIP" = x; then
8846     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8847   fi
8848 
8849 
8850 
8851 
8852 
8853   # Publish this variable in the help.
8854 
8855 
8856   if [ -z "${LN+x}" ]; then
8857     # The variable is not set by user, try to locate tool using the code snippet
8858     for ac_prog in ln
8859 do
8860   # Extract the first word of "$ac_prog", so it can be a program name with args.
8861 set dummy $ac_prog; ac_word=$2
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8863 $as_echo_n "checking for $ac_word... " >&6; }
8864 if ${ac_cv_path_LN+:} false; then :
8865   $as_echo_n "(cached) " >&6
8866 else
8867   case $LN in
8868   [\\/]* | ?:[\\/]*)
8869   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8870   ;;
8871   *)
8872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873 for as_dir in $PATH
8874 do
8875   IFS=$as_save_IFS
8876   test -z "$as_dir" && as_dir=.
8877     for ac_exec_ext in '' $ac_executable_extensions; do
8878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8881     break 2
8882   fi
8883 done
8884   done
8885 IFS=$as_save_IFS
8886 
8887   ;;
8888 esac
8889 fi
8890 LN=$ac_cv_path_LN
8891 if test -n "$LN"; then
8892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8893 $as_echo "$LN" >&6; }
8894 else
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896 $as_echo "no" >&6; }
8897 fi
8898 
8899 
8900   test -n "$LN" && break
8901 done
8902 
8903   else
8904     # The variable is set, but is it from the command line or the environment?
8905 
8906     # Try to remove the string !LN! from our list.
8907     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8908     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8909       # If it failed, the variable was not from the command line. Ignore it,
8910       # but warn the user (except for BASH, which is always set by the calling BASH).
8911       if test "xLN" != xBASH; then
8912         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8913 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8914       fi
8915       # Try to locate tool using the code snippet
8916       for ac_prog in ln
8917 do
8918   # Extract the first word of "$ac_prog", so it can be a program name with args.
8919 set dummy $ac_prog; ac_word=$2
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921 $as_echo_n "checking for $ac_word... " >&6; }
8922 if ${ac_cv_path_LN+:} false; then :
8923   $as_echo_n "(cached) " >&6
8924 else
8925   case $LN in
8926   [\\/]* | ?:[\\/]*)
8927   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8928   ;;
8929   *)
8930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931 for as_dir in $PATH
8932 do
8933   IFS=$as_save_IFS
8934   test -z "$as_dir" && as_dir=.
8935     for ac_exec_ext in '' $ac_executable_extensions; do
8936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939     break 2
8940   fi
8941 done
8942   done
8943 IFS=$as_save_IFS
8944 
8945   ;;
8946 esac
8947 fi
8948 LN=$ac_cv_path_LN
8949 if test -n "$LN"; then
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8951 $as_echo "$LN" >&6; }
8952 else
8953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954 $as_echo "no" >&6; }
8955 fi
8956 
8957 
8958   test -n "$LN" && break
8959 done
8960 
8961     else
8962       # If it succeeded, then it was overridden by the user. We will use it
8963       # for the tool.
8964 
8965       # First remove it from the list of overridden variables, so we can test
8966       # for unknown variables in the end.
8967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8968 
8969       # Check if we try to supply an empty value
8970       if test "x$LN" = x; then
8971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8972 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8974 $as_echo_n "checking for LN... " >&6; }
8975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8976 $as_echo "disabled" >&6; }
8977       else
8978         # Check if the provided tool contains a complete path.
8979         tool_specified="$LN"
8980         tool_basename="${tool_specified##*/}"
8981         if test "x$tool_basename" = "x$tool_specified"; then
8982           # A command without a complete path is provided, search $PATH.
8983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8984 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8985           # Extract the first word of "$tool_basename", so it can be a program name with args.
8986 set dummy $tool_basename; ac_word=$2
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8988 $as_echo_n "checking for $ac_word... " >&6; }
8989 if ${ac_cv_path_LN+:} false; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   case $LN in
8993   [\\/]* | ?:[\\/]*)
8994   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8995   ;;
8996   *)
8997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998 for as_dir in $PATH
8999 do
9000   IFS=$as_save_IFS
9001   test -z "$as_dir" && as_dir=.
9002     for ac_exec_ext in '' $ac_executable_extensions; do
9003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9004     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9006     break 2
9007   fi
9008 done
9009   done
9010 IFS=$as_save_IFS
9011 
9012   ;;
9013 esac
9014 fi
9015 LN=$ac_cv_path_LN
9016 if test -n "$LN"; then
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9018 $as_echo "$LN" >&6; }
9019 else
9020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021 $as_echo "no" >&6; }
9022 fi
9023 
9024 
9025           if test "x$LN" = x; then
9026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9027           fi
9028         else
9029           # Otherwise we believe it is a complete path. Use it as it is.
9030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9031 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9033 $as_echo_n "checking for LN... " >&6; }
9034           if test ! -x "$tool_specified"; then
9035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9036 $as_echo "not found" >&6; }
9037             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9038           fi
9039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9040 $as_echo "$tool_specified" >&6; }
9041         fi
9042       fi
9043     fi
9044 
9045   fi
9046 
9047 
9048 
9049   if test "x$LN" = x; then
9050     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9051   fi
9052 
9053 
9054 
9055 
9056 
9057   # Publish this variable in the help.
9058 
9059 
9060   if [ -z "${LS+x}" ]; then
9061     # The variable is not set by user, try to locate tool using the code snippet
9062     for ac_prog in ls
9063 do
9064   # Extract the first word of "$ac_prog", so it can be a program name with args.
9065 set dummy $ac_prog; ac_word=$2
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067 $as_echo_n "checking for $ac_word... " >&6; }
9068 if ${ac_cv_path_LS+:} false; then :
9069   $as_echo_n "(cached) " >&6
9070 else
9071   case $LS in
9072   [\\/]* | ?:[\\/]*)
9073   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9074   ;;
9075   *)
9076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077 for as_dir in $PATH
9078 do
9079   IFS=$as_save_IFS
9080   test -z "$as_dir" && as_dir=.
9081     for ac_exec_ext in '' $ac_executable_extensions; do
9082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085     break 2
9086   fi
9087 done
9088   done
9089 IFS=$as_save_IFS
9090 
9091   ;;
9092 esac
9093 fi
9094 LS=$ac_cv_path_LS
9095 if test -n "$LS"; then
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9097 $as_echo "$LS" >&6; }
9098 else
9099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100 $as_echo "no" >&6; }
9101 fi
9102 
9103 
9104   test -n "$LS" && break
9105 done
9106 
9107   else
9108     # The variable is set, but is it from the command line or the environment?
9109 
9110     # Try to remove the string !LS! from our list.
9111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9113       # If it failed, the variable was not from the command line. Ignore it,
9114       # but warn the user (except for BASH, which is always set by the calling BASH).
9115       if test "xLS" != xBASH; then
9116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9117 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9118       fi
9119       # Try to locate tool using the code snippet
9120       for ac_prog in ls
9121 do
9122   # Extract the first word of "$ac_prog", so it can be a program name with args.
9123 set dummy $ac_prog; ac_word=$2
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125 $as_echo_n "checking for $ac_word... " >&6; }
9126 if ${ac_cv_path_LS+:} false; then :
9127   $as_echo_n "(cached) " >&6
9128 else
9129   case $LS in
9130   [\\/]* | ?:[\\/]*)
9131   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9132   ;;
9133   *)
9134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135 for as_dir in $PATH
9136 do
9137   IFS=$as_save_IFS
9138   test -z "$as_dir" && as_dir=.
9139     for ac_exec_ext in '' $ac_executable_extensions; do
9140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143     break 2
9144   fi
9145 done
9146   done
9147 IFS=$as_save_IFS
9148 
9149   ;;
9150 esac
9151 fi
9152 LS=$ac_cv_path_LS
9153 if test -n "$LS"; then
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9155 $as_echo "$LS" >&6; }
9156 else
9157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158 $as_echo "no" >&6; }
9159 fi
9160 
9161 
9162   test -n "$LS" && break
9163 done
9164 
9165     else
9166       # If it succeeded, then it was overridden by the user. We will use it
9167       # for the tool.
9168 
9169       # First remove it from the list of overridden variables, so we can test
9170       # for unknown variables in the end.
9171       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9172 
9173       # Check if we try to supply an empty value
9174       if test "x$LS" = x; then
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9176 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9178 $as_echo_n "checking for LS... " >&6; }
9179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9180 $as_echo "disabled" >&6; }
9181       else
9182         # Check if the provided tool contains a complete path.
9183         tool_specified="$LS"
9184         tool_basename="${tool_specified##*/}"
9185         if test "x$tool_basename" = "x$tool_specified"; then
9186           # A command without a complete path is provided, search $PATH.
9187           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9188 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9189           # Extract the first word of "$tool_basename", so it can be a program name with args.
9190 set dummy $tool_basename; ac_word=$2
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9192 $as_echo_n "checking for $ac_word... " >&6; }
9193 if ${ac_cv_path_LS+:} false; then :
9194   $as_echo_n "(cached) " >&6
9195 else
9196   case $LS in
9197   [\\/]* | ?:[\\/]*)
9198   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9199   ;;
9200   *)
9201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9202 for as_dir in $PATH
9203 do
9204   IFS=$as_save_IFS
9205   test -z "$as_dir" && as_dir=.
9206     for ac_exec_ext in '' $ac_executable_extensions; do
9207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9208     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9210     break 2
9211   fi
9212 done
9213   done
9214 IFS=$as_save_IFS
9215 
9216   ;;
9217 esac
9218 fi
9219 LS=$ac_cv_path_LS
9220 if test -n "$LS"; then
9221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9222 $as_echo "$LS" >&6; }
9223 else
9224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225 $as_echo "no" >&6; }
9226 fi
9227 
9228 
9229           if test "x$LS" = x; then
9230             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9231           fi
9232         else
9233           # Otherwise we believe it is a complete path. Use it as it is.
9234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9235 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9236           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9237 $as_echo_n "checking for LS... " >&6; }
9238           if test ! -x "$tool_specified"; then
9239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9240 $as_echo "not found" >&6; }
9241             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9242           fi
9243           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9244 $as_echo "$tool_specified" >&6; }
9245         fi
9246       fi
9247     fi
9248 
9249   fi
9250 
9251 
9252 
9253   if test "x$LS" = x; then
9254     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9255   fi
9256 
9257 
9258 
9259 
9260 
9261   # Publish this variable in the help.
9262 
9263 
9264   if [ -z "${MKDIR+x}" ]; then
9265     # The variable is not set by user, try to locate tool using the code snippet
9266     for ac_prog in mkdir
9267 do
9268   # Extract the first word of "$ac_prog", so it can be a program name with args.
9269 set dummy $ac_prog; ac_word=$2
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9271 $as_echo_n "checking for $ac_word... " >&6; }
9272 if ${ac_cv_path_MKDIR+:} false; then :
9273   $as_echo_n "(cached) " >&6
9274 else
9275   case $MKDIR in
9276   [\\/]* | ?:[\\/]*)
9277   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9278   ;;
9279   *)
9280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9281 for as_dir in $PATH
9282 do
9283   IFS=$as_save_IFS
9284   test -z "$as_dir" && as_dir=.
9285     for ac_exec_ext in '' $ac_executable_extensions; do
9286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9287     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9289     break 2
9290   fi
9291 done
9292   done
9293 IFS=$as_save_IFS
9294 
9295   ;;
9296 esac
9297 fi
9298 MKDIR=$ac_cv_path_MKDIR
9299 if test -n "$MKDIR"; then
9300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9301 $as_echo "$MKDIR" >&6; }
9302 else
9303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304 $as_echo "no" >&6; }
9305 fi
9306 
9307 
9308   test -n "$MKDIR" && break
9309 done
9310 
9311   else
9312     # The variable is set, but is it from the command line or the environment?
9313 
9314     # Try to remove the string !MKDIR! from our list.
9315     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9316     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9317       # If it failed, the variable was not from the command line. Ignore it,
9318       # but warn the user (except for BASH, which is always set by the calling BASH).
9319       if test "xMKDIR" != xBASH; then
9320         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9321 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9322       fi
9323       # Try to locate tool using the code snippet
9324       for ac_prog in mkdir
9325 do
9326   # Extract the first word of "$ac_prog", so it can be a program name with args.
9327 set dummy $ac_prog; ac_word=$2
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9329 $as_echo_n "checking for $ac_word... " >&6; }
9330 if ${ac_cv_path_MKDIR+:} false; then :
9331   $as_echo_n "(cached) " >&6
9332 else
9333   case $MKDIR in
9334   [\\/]* | ?:[\\/]*)
9335   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9336   ;;
9337   *)
9338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339 for as_dir in $PATH
9340 do
9341   IFS=$as_save_IFS
9342   test -z "$as_dir" && as_dir=.
9343     for ac_exec_ext in '' $ac_executable_extensions; do
9344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9347     break 2
9348   fi
9349 done
9350   done
9351 IFS=$as_save_IFS
9352 
9353   ;;
9354 esac
9355 fi
9356 MKDIR=$ac_cv_path_MKDIR
9357 if test -n "$MKDIR"; then
9358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9359 $as_echo "$MKDIR" >&6; }
9360 else
9361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362 $as_echo "no" >&6; }
9363 fi
9364 
9365 
9366   test -n "$MKDIR" && break
9367 done
9368 
9369     else
9370       # If it succeeded, then it was overridden by the user. We will use it
9371       # for the tool.
9372 
9373       # First remove it from the list of overridden variables, so we can test
9374       # for unknown variables in the end.
9375       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9376 
9377       # Check if we try to supply an empty value
9378       if test "x$MKDIR" = x; then
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9380 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9382 $as_echo_n "checking for MKDIR... " >&6; }
9383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9384 $as_echo "disabled" >&6; }
9385       else
9386         # Check if the provided tool contains a complete path.
9387         tool_specified="$MKDIR"
9388         tool_basename="${tool_specified##*/}"
9389         if test "x$tool_basename" = "x$tool_specified"; then
9390           # A command without a complete path is provided, search $PATH.
9391           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9392 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9393           # Extract the first word of "$tool_basename", so it can be a program name with args.
9394 set dummy $tool_basename; ac_word=$2
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9396 $as_echo_n "checking for $ac_word... " >&6; }
9397 if ${ac_cv_path_MKDIR+:} false; then :
9398   $as_echo_n "(cached) " >&6
9399 else
9400   case $MKDIR in
9401   [\\/]* | ?:[\\/]*)
9402   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9403   ;;
9404   *)
9405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9406 for as_dir in $PATH
9407 do
9408   IFS=$as_save_IFS
9409   test -z "$as_dir" && as_dir=.
9410     for ac_exec_ext in '' $ac_executable_extensions; do
9411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9412     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9414     break 2
9415   fi
9416 done
9417   done
9418 IFS=$as_save_IFS
9419 
9420   ;;
9421 esac
9422 fi
9423 MKDIR=$ac_cv_path_MKDIR
9424 if test -n "$MKDIR"; then
9425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9426 $as_echo "$MKDIR" >&6; }
9427 else
9428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429 $as_echo "no" >&6; }
9430 fi
9431 
9432 
9433           if test "x$MKDIR" = x; then
9434             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9435           fi
9436         else
9437           # Otherwise we believe it is a complete path. Use it as it is.
9438           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9439 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9440           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9441 $as_echo_n "checking for MKDIR... " >&6; }
9442           if test ! -x "$tool_specified"; then
9443             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9444 $as_echo "not found" >&6; }
9445             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9446           fi
9447           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9448 $as_echo "$tool_specified" >&6; }
9449         fi
9450       fi
9451     fi
9452 
9453   fi
9454 
9455 
9456 
9457   if test "x$MKDIR" = x; then
9458     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9459   fi
9460 
9461 
9462 
9463 
9464 
9465   # Publish this variable in the help.
9466 
9467 
9468   if [ -z "${MKTEMP+x}" ]; then
9469     # The variable is not set by user, try to locate tool using the code snippet
9470     for ac_prog in mktemp
9471 do
9472   # Extract the first word of "$ac_prog", so it can be a program name with args.
9473 set dummy $ac_prog; ac_word=$2
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9475 $as_echo_n "checking for $ac_word... " >&6; }
9476 if ${ac_cv_path_MKTEMP+:} false; then :
9477   $as_echo_n "(cached) " >&6
9478 else
9479   case $MKTEMP in
9480   [\\/]* | ?:[\\/]*)
9481   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9482   ;;
9483   *)
9484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9485 for as_dir in $PATH
9486 do
9487   IFS=$as_save_IFS
9488   test -z "$as_dir" && as_dir=.
9489     for ac_exec_ext in '' $ac_executable_extensions; do
9490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9491     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9493     break 2
9494   fi
9495 done
9496   done
9497 IFS=$as_save_IFS
9498 
9499   ;;
9500 esac
9501 fi
9502 MKTEMP=$ac_cv_path_MKTEMP
9503 if test -n "$MKTEMP"; then
9504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9505 $as_echo "$MKTEMP" >&6; }
9506 else
9507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508 $as_echo "no" >&6; }
9509 fi
9510 
9511 
9512   test -n "$MKTEMP" && break
9513 done
9514 
9515   else
9516     # The variable is set, but is it from the command line or the environment?
9517 
9518     # Try to remove the string !MKTEMP! from our list.
9519     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9520     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9521       # If it failed, the variable was not from the command line. Ignore it,
9522       # but warn the user (except for BASH, which is always set by the calling BASH).
9523       if test "xMKTEMP" != xBASH; then
9524         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9525 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9526       fi
9527       # Try to locate tool using the code snippet
9528       for ac_prog in mktemp
9529 do
9530   # Extract the first word of "$ac_prog", so it can be a program name with args.
9531 set dummy $ac_prog; ac_word=$2
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9533 $as_echo_n "checking for $ac_word... " >&6; }
9534 if ${ac_cv_path_MKTEMP+:} false; then :
9535   $as_echo_n "(cached) " >&6
9536 else
9537   case $MKTEMP in
9538   [\\/]* | ?:[\\/]*)
9539   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9540   ;;
9541   *)
9542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9543 for as_dir in $PATH
9544 do
9545   IFS=$as_save_IFS
9546   test -z "$as_dir" && as_dir=.
9547     for ac_exec_ext in '' $ac_executable_extensions; do
9548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9549     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9551     break 2
9552   fi
9553 done
9554   done
9555 IFS=$as_save_IFS
9556 
9557   ;;
9558 esac
9559 fi
9560 MKTEMP=$ac_cv_path_MKTEMP
9561 if test -n "$MKTEMP"; then
9562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9563 $as_echo "$MKTEMP" >&6; }
9564 else
9565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9566 $as_echo "no" >&6; }
9567 fi
9568 
9569 
9570   test -n "$MKTEMP" && break
9571 done
9572 
9573     else
9574       # If it succeeded, then it was overridden by the user. We will use it
9575       # for the tool.
9576 
9577       # First remove it from the list of overridden variables, so we can test
9578       # for unknown variables in the end.
9579       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9580 
9581       # Check if we try to supply an empty value
9582       if test "x$MKTEMP" = x; then
9583         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9584 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9586 $as_echo_n "checking for MKTEMP... " >&6; }
9587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9588 $as_echo "disabled" >&6; }
9589       else
9590         # Check if the provided tool contains a complete path.
9591         tool_specified="$MKTEMP"
9592         tool_basename="${tool_specified##*/}"
9593         if test "x$tool_basename" = "x$tool_specified"; then
9594           # A command without a complete path is provided, search $PATH.
9595           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9596 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9597           # Extract the first word of "$tool_basename", so it can be a program name with args.
9598 set dummy $tool_basename; ac_word=$2
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9600 $as_echo_n "checking for $ac_word... " >&6; }
9601 if ${ac_cv_path_MKTEMP+:} false; then :
9602   $as_echo_n "(cached) " >&6
9603 else
9604   case $MKTEMP in
9605   [\\/]* | ?:[\\/]*)
9606   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9607   ;;
9608   *)
9609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9610 for as_dir in $PATH
9611 do
9612   IFS=$as_save_IFS
9613   test -z "$as_dir" && as_dir=.
9614     for ac_exec_ext in '' $ac_executable_extensions; do
9615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9616     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9618     break 2
9619   fi
9620 done
9621   done
9622 IFS=$as_save_IFS
9623 
9624   ;;
9625 esac
9626 fi
9627 MKTEMP=$ac_cv_path_MKTEMP
9628 if test -n "$MKTEMP"; then
9629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9630 $as_echo "$MKTEMP" >&6; }
9631 else
9632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633 $as_echo "no" >&6; }
9634 fi
9635 
9636 
9637           if test "x$MKTEMP" = x; then
9638             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9639           fi
9640         else
9641           # Otherwise we believe it is a complete path. Use it as it is.
9642           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9643 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9644           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9645 $as_echo_n "checking for MKTEMP... " >&6; }
9646           if test ! -x "$tool_specified"; then
9647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9648 $as_echo "not found" >&6; }
9649             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9650           fi
9651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9652 $as_echo "$tool_specified" >&6; }
9653         fi
9654       fi
9655     fi
9656 
9657   fi
9658 
9659 
9660 
9661   if test "x$MKTEMP" = x; then
9662     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9663   fi
9664 
9665 
9666 
9667 
9668 
9669   # Publish this variable in the help.
9670 
9671 
9672   if [ -z "${MV+x}" ]; then
9673     # The variable is not set by user, try to locate tool using the code snippet
9674     for ac_prog in mv
9675 do
9676   # Extract the first word of "$ac_prog", so it can be a program name with args.
9677 set dummy $ac_prog; ac_word=$2
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9679 $as_echo_n "checking for $ac_word... " >&6; }
9680 if ${ac_cv_path_MV+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   case $MV in
9684   [\\/]* | ?:[\\/]*)
9685   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9686   ;;
9687   *)
9688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689 for as_dir in $PATH
9690 do
9691   IFS=$as_save_IFS
9692   test -z "$as_dir" && as_dir=.
9693     for ac_exec_ext in '' $ac_executable_extensions; do
9694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697     break 2
9698   fi
9699 done
9700   done
9701 IFS=$as_save_IFS
9702 
9703   ;;
9704 esac
9705 fi
9706 MV=$ac_cv_path_MV
9707 if test -n "$MV"; then
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9709 $as_echo "$MV" >&6; }
9710 else
9711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712 $as_echo "no" >&6; }
9713 fi
9714 
9715 
9716   test -n "$MV" && break
9717 done
9718 
9719   else
9720     # The variable is set, but is it from the command line or the environment?
9721 
9722     # Try to remove the string !MV! from our list.
9723     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9724     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9725       # If it failed, the variable was not from the command line. Ignore it,
9726       # but warn the user (except for BASH, which is always set by the calling BASH).
9727       if test "xMV" != xBASH; then
9728         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9729 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9730       fi
9731       # Try to locate tool using the code snippet
9732       for ac_prog in mv
9733 do
9734   # Extract the first word of "$ac_prog", so it can be a program name with args.
9735 set dummy $ac_prog; ac_word=$2
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737 $as_echo_n "checking for $ac_word... " >&6; }
9738 if ${ac_cv_path_MV+:} false; then :
9739   $as_echo_n "(cached) " >&6
9740 else
9741   case $MV in
9742   [\\/]* | ?:[\\/]*)
9743   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9744   ;;
9745   *)
9746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747 for as_dir in $PATH
9748 do
9749   IFS=$as_save_IFS
9750   test -z "$as_dir" && as_dir=.
9751     for ac_exec_ext in '' $ac_executable_extensions; do
9752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755     break 2
9756   fi
9757 done
9758   done
9759 IFS=$as_save_IFS
9760 
9761   ;;
9762 esac
9763 fi
9764 MV=$ac_cv_path_MV
9765 if test -n "$MV"; then
9766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9767 $as_echo "$MV" >&6; }
9768 else
9769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770 $as_echo "no" >&6; }
9771 fi
9772 
9773 
9774   test -n "$MV" && break
9775 done
9776 
9777     else
9778       # If it succeeded, then it was overridden by the user. We will use it
9779       # for the tool.
9780 
9781       # First remove it from the list of overridden variables, so we can test
9782       # for unknown variables in the end.
9783       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9784 
9785       # Check if we try to supply an empty value
9786       if test "x$MV" = x; then
9787         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9788 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9790 $as_echo_n "checking for MV... " >&6; }
9791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9792 $as_echo "disabled" >&6; }
9793       else
9794         # Check if the provided tool contains a complete path.
9795         tool_specified="$MV"
9796         tool_basename="${tool_specified##*/}"
9797         if test "x$tool_basename" = "x$tool_specified"; then
9798           # A command without a complete path is provided, search $PATH.
9799           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9800 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9801           # Extract the first word of "$tool_basename", so it can be a program name with args.
9802 set dummy $tool_basename; ac_word=$2
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9804 $as_echo_n "checking for $ac_word... " >&6; }
9805 if ${ac_cv_path_MV+:} false; then :
9806   $as_echo_n "(cached) " >&6
9807 else
9808   case $MV in
9809   [\\/]* | ?:[\\/]*)
9810   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9811   ;;
9812   *)
9813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9814 for as_dir in $PATH
9815 do
9816   IFS=$as_save_IFS
9817   test -z "$as_dir" && as_dir=.
9818     for ac_exec_ext in '' $ac_executable_extensions; do
9819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9820     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9822     break 2
9823   fi
9824 done
9825   done
9826 IFS=$as_save_IFS
9827 
9828   ;;
9829 esac
9830 fi
9831 MV=$ac_cv_path_MV
9832 if test -n "$MV"; then
9833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9834 $as_echo "$MV" >&6; }
9835 else
9836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9837 $as_echo "no" >&6; }
9838 fi
9839 
9840 
9841           if test "x$MV" = x; then
9842             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9843           fi
9844         else
9845           # Otherwise we believe it is a complete path. Use it as it is.
9846           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9847 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9848           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9849 $as_echo_n "checking for MV... " >&6; }
9850           if test ! -x "$tool_specified"; then
9851             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9852 $as_echo "not found" >&6; }
9853             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9854           fi
9855           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9856 $as_echo "$tool_specified" >&6; }
9857         fi
9858       fi
9859     fi
9860 
9861   fi
9862 
9863 
9864 
9865   if test "x$MV" = x; then
9866     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9867   fi
9868 
9869 
9870 
9871 
9872 
9873   # Publish this variable in the help.
9874 
9875 
9876   if [ -z "${NAWK+x}" ]; then
9877     # The variable is not set by user, try to locate tool using the code snippet
9878     for ac_prog in nawk gawk awk
9879 do
9880   # Extract the first word of "$ac_prog", so it can be a program name with args.
9881 set dummy $ac_prog; ac_word=$2
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9883 $as_echo_n "checking for $ac_word... " >&6; }
9884 if ${ac_cv_path_NAWK+:} false; then :
9885   $as_echo_n "(cached) " >&6
9886 else
9887   case $NAWK in
9888   [\\/]* | ?:[\\/]*)
9889   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9890   ;;
9891   *)
9892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9893 for as_dir in $PATH
9894 do
9895   IFS=$as_save_IFS
9896   test -z "$as_dir" && as_dir=.
9897     for ac_exec_ext in '' $ac_executable_extensions; do
9898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9899     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9901     break 2
9902   fi
9903 done
9904   done
9905 IFS=$as_save_IFS
9906 
9907   ;;
9908 esac
9909 fi
9910 NAWK=$ac_cv_path_NAWK
9911 if test -n "$NAWK"; then
9912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9913 $as_echo "$NAWK" >&6; }
9914 else
9915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916 $as_echo "no" >&6; }
9917 fi
9918 
9919 
9920   test -n "$NAWK" && break
9921 done
9922 
9923   else
9924     # The variable is set, but is it from the command line or the environment?
9925 
9926     # Try to remove the string !NAWK! from our list.
9927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9929       # If it failed, the variable was not from the command line. Ignore it,
9930       # but warn the user (except for BASH, which is always set by the calling BASH).
9931       if test "xNAWK" != xBASH; then
9932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9933 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9934       fi
9935       # Try to locate tool using the code snippet
9936       for ac_prog in nawk gawk awk
9937 do
9938   # Extract the first word of "$ac_prog", so it can be a program name with args.
9939 set dummy $ac_prog; ac_word=$2
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9941 $as_echo_n "checking for $ac_word... " >&6; }
9942 if ${ac_cv_path_NAWK+:} false; then :
9943   $as_echo_n "(cached) " >&6
9944 else
9945   case $NAWK in
9946   [\\/]* | ?:[\\/]*)
9947   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9948   ;;
9949   *)
9950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9951 for as_dir in $PATH
9952 do
9953   IFS=$as_save_IFS
9954   test -z "$as_dir" && as_dir=.
9955     for ac_exec_ext in '' $ac_executable_extensions; do
9956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9957     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9959     break 2
9960   fi
9961 done
9962   done
9963 IFS=$as_save_IFS
9964 
9965   ;;
9966 esac
9967 fi
9968 NAWK=$ac_cv_path_NAWK
9969 if test -n "$NAWK"; then
9970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9971 $as_echo "$NAWK" >&6; }
9972 else
9973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974 $as_echo "no" >&6; }
9975 fi
9976 
9977 
9978   test -n "$NAWK" && break
9979 done
9980 
9981     else
9982       # If it succeeded, then it was overridden by the user. We will use it
9983       # for the tool.
9984 
9985       # First remove it from the list of overridden variables, so we can test
9986       # for unknown variables in the end.
9987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9988 
9989       # Check if we try to supply an empty value
9990       if test "x$NAWK" = x; then
9991         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9992 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9994 $as_echo_n "checking for NAWK... " >&6; }
9995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9996 $as_echo "disabled" >&6; }
9997       else
9998         # Check if the provided tool contains a complete path.
9999         tool_specified="$NAWK"
10000         tool_basename="${tool_specified##*/}"
10001         if test "x$tool_basename" = "x$tool_specified"; then
10002           # A command without a complete path is provided, search $PATH.
10003           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10004 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10005           # Extract the first word of "$tool_basename", so it can be a program name with args.
10006 set dummy $tool_basename; ac_word=$2
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10008 $as_echo_n "checking for $ac_word... " >&6; }
10009 if ${ac_cv_path_NAWK+:} false; then :
10010   $as_echo_n "(cached) " >&6
10011 else
10012   case $NAWK in
10013   [\\/]* | ?:[\\/]*)
10014   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10015   ;;
10016   *)
10017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10018 for as_dir in $PATH
10019 do
10020   IFS=$as_save_IFS
10021   test -z "$as_dir" && as_dir=.
10022     for ac_exec_ext in '' $ac_executable_extensions; do
10023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10024     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10026     break 2
10027   fi
10028 done
10029   done
10030 IFS=$as_save_IFS
10031 
10032   ;;
10033 esac
10034 fi
10035 NAWK=$ac_cv_path_NAWK
10036 if test -n "$NAWK"; then
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10038 $as_echo "$NAWK" >&6; }
10039 else
10040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041 $as_echo "no" >&6; }
10042 fi
10043 
10044 
10045           if test "x$NAWK" = x; then
10046             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10047           fi
10048         else
10049           # Otherwise we believe it is a complete path. Use it as it is.
10050           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10051 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10052           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10053 $as_echo_n "checking for NAWK... " >&6; }
10054           if test ! -x "$tool_specified"; then
10055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10056 $as_echo "not found" >&6; }
10057             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10058           fi
10059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10060 $as_echo "$tool_specified" >&6; }
10061         fi
10062       fi
10063     fi
10064 
10065   fi
10066 
10067 
10068 
10069   if test "x$NAWK" = x; then
10070     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10071   fi
10072 
10073 
10074 
10075 
10076 
10077   # Publish this variable in the help.
10078 
10079 
10080   if [ -z "${PRINTF+x}" ]; then
10081     # The variable is not set by user, try to locate tool using the code snippet
10082     for ac_prog in printf
10083 do
10084   # Extract the first word of "$ac_prog", so it can be a program name with args.
10085 set dummy $ac_prog; ac_word=$2
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087 $as_echo_n "checking for $ac_word... " >&6; }
10088 if ${ac_cv_path_PRINTF+:} false; then :
10089   $as_echo_n "(cached) " >&6
10090 else
10091   case $PRINTF in
10092   [\\/]* | ?:[\\/]*)
10093   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10094   ;;
10095   *)
10096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097 for as_dir in $PATH
10098 do
10099   IFS=$as_save_IFS
10100   test -z "$as_dir" && as_dir=.
10101     for ac_exec_ext in '' $ac_executable_extensions; do
10102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105     break 2
10106   fi
10107 done
10108   done
10109 IFS=$as_save_IFS
10110 
10111   ;;
10112 esac
10113 fi
10114 PRINTF=$ac_cv_path_PRINTF
10115 if test -n "$PRINTF"; then
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10117 $as_echo "$PRINTF" >&6; }
10118 else
10119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120 $as_echo "no" >&6; }
10121 fi
10122 
10123 
10124   test -n "$PRINTF" && break
10125 done
10126 
10127   else
10128     # The variable is set, but is it from the command line or the environment?
10129 
10130     # Try to remove the string !PRINTF! from our list.
10131     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10132     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10133       # If it failed, the variable was not from the command line. Ignore it,
10134       # but warn the user (except for BASH, which is always set by the calling BASH).
10135       if test "xPRINTF" != xBASH; then
10136         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10137 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10138       fi
10139       # Try to locate tool using the code snippet
10140       for ac_prog in printf
10141 do
10142   # Extract the first word of "$ac_prog", so it can be a program name with args.
10143 set dummy $ac_prog; ac_word=$2
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145 $as_echo_n "checking for $ac_word... " >&6; }
10146 if ${ac_cv_path_PRINTF+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   case $PRINTF in
10150   [\\/]* | ?:[\\/]*)
10151   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10152   ;;
10153   *)
10154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155 for as_dir in $PATH
10156 do
10157   IFS=$as_save_IFS
10158   test -z "$as_dir" && as_dir=.
10159     for ac_exec_ext in '' $ac_executable_extensions; do
10160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163     break 2
10164   fi
10165 done
10166   done
10167 IFS=$as_save_IFS
10168 
10169   ;;
10170 esac
10171 fi
10172 PRINTF=$ac_cv_path_PRINTF
10173 if test -n "$PRINTF"; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10175 $as_echo "$PRINTF" >&6; }
10176 else
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178 $as_echo "no" >&6; }
10179 fi
10180 
10181 
10182   test -n "$PRINTF" && break
10183 done
10184 
10185     else
10186       # If it succeeded, then it was overridden by the user. We will use it
10187       # for the tool.
10188 
10189       # First remove it from the list of overridden variables, so we can test
10190       # for unknown variables in the end.
10191       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10192 
10193       # Check if we try to supply an empty value
10194       if test "x$PRINTF" = x; then
10195         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10196 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10198 $as_echo_n "checking for PRINTF... " >&6; }
10199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10200 $as_echo "disabled" >&6; }
10201       else
10202         # Check if the provided tool contains a complete path.
10203         tool_specified="$PRINTF"
10204         tool_basename="${tool_specified##*/}"
10205         if test "x$tool_basename" = "x$tool_specified"; then
10206           # A command without a complete path is provided, search $PATH.
10207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10208 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10209           # Extract the first word of "$tool_basename", so it can be a program name with args.
10210 set dummy $tool_basename; ac_word=$2
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10212 $as_echo_n "checking for $ac_word... " >&6; }
10213 if ${ac_cv_path_PRINTF+:} false; then :
10214   $as_echo_n "(cached) " >&6
10215 else
10216   case $PRINTF in
10217   [\\/]* | ?:[\\/]*)
10218   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10219   ;;
10220   *)
10221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10222 for as_dir in $PATH
10223 do
10224   IFS=$as_save_IFS
10225   test -z "$as_dir" && as_dir=.
10226     for ac_exec_ext in '' $ac_executable_extensions; do
10227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10228     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10230     break 2
10231   fi
10232 done
10233   done
10234 IFS=$as_save_IFS
10235 
10236   ;;
10237 esac
10238 fi
10239 PRINTF=$ac_cv_path_PRINTF
10240 if test -n "$PRINTF"; then
10241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10242 $as_echo "$PRINTF" >&6; }
10243 else
10244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245 $as_echo "no" >&6; }
10246 fi
10247 
10248 
10249           if test "x$PRINTF" = x; then
10250             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10251           fi
10252         else
10253           # Otherwise we believe it is a complete path. Use it as it is.
10254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10255 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10256           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10257 $as_echo_n "checking for PRINTF... " >&6; }
10258           if test ! -x "$tool_specified"; then
10259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10260 $as_echo "not found" >&6; }
10261             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10262           fi
10263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10264 $as_echo "$tool_specified" >&6; }
10265         fi
10266       fi
10267     fi
10268 
10269   fi
10270 
10271 
10272 
10273   if test "x$PRINTF" = x; then
10274     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10275   fi
10276 
10277 
10278 
10279 
10280 
10281   # Publish this variable in the help.
10282 
10283 
10284   if [ -z "${RM+x}" ]; then
10285     # The variable is not set by user, try to locate tool using the code snippet
10286     for ac_prog in rm
10287 do
10288   # Extract the first word of "$ac_prog", so it can be a program name with args.
10289 set dummy $ac_prog; ac_word=$2
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291 $as_echo_n "checking for $ac_word... " >&6; }
10292 if ${ac_cv_path_RM+:} false; then :
10293   $as_echo_n "(cached) " >&6
10294 else
10295   case $RM in
10296   [\\/]* | ?:[\\/]*)
10297   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10298   ;;
10299   *)
10300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10301 for as_dir in $PATH
10302 do
10303   IFS=$as_save_IFS
10304   test -z "$as_dir" && as_dir=.
10305     for ac_exec_ext in '' $ac_executable_extensions; do
10306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10307     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10309     break 2
10310   fi
10311 done
10312   done
10313 IFS=$as_save_IFS
10314 
10315   ;;
10316 esac
10317 fi
10318 RM=$ac_cv_path_RM
10319 if test -n "$RM"; then
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10321 $as_echo "$RM" >&6; }
10322 else
10323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324 $as_echo "no" >&6; }
10325 fi
10326 
10327 
10328   test -n "$RM" && break
10329 done
10330 
10331   else
10332     # The variable is set, but is it from the command line or the environment?
10333 
10334     # Try to remove the string !RM! from our list.
10335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10337       # If it failed, the variable was not from the command line. Ignore it,
10338       # but warn the user (except for BASH, which is always set by the calling BASH).
10339       if test "xRM" != xBASH; then
10340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10341 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10342       fi
10343       # Try to locate tool using the code snippet
10344       for ac_prog in rm
10345 do
10346   # Extract the first word of "$ac_prog", so it can be a program name with args.
10347 set dummy $ac_prog; ac_word=$2
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10349 $as_echo_n "checking for $ac_word... " >&6; }
10350 if ${ac_cv_path_RM+:} false; then :
10351   $as_echo_n "(cached) " >&6
10352 else
10353   case $RM in
10354   [\\/]* | ?:[\\/]*)
10355   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10356   ;;
10357   *)
10358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10359 for as_dir in $PATH
10360 do
10361   IFS=$as_save_IFS
10362   test -z "$as_dir" && as_dir=.
10363     for ac_exec_ext in '' $ac_executable_extensions; do
10364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10365     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10367     break 2
10368   fi
10369 done
10370   done
10371 IFS=$as_save_IFS
10372 
10373   ;;
10374 esac
10375 fi
10376 RM=$ac_cv_path_RM
10377 if test -n "$RM"; then
10378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10379 $as_echo "$RM" >&6; }
10380 else
10381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382 $as_echo "no" >&6; }
10383 fi
10384 
10385 
10386   test -n "$RM" && break
10387 done
10388 
10389     else
10390       # If it succeeded, then it was overridden by the user. We will use it
10391       # for the tool.
10392 
10393       # First remove it from the list of overridden variables, so we can test
10394       # for unknown variables in the end.
10395       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10396 
10397       # Check if we try to supply an empty value
10398       if test "x$RM" = x; then
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10400 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10402 $as_echo_n "checking for RM... " >&6; }
10403         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10404 $as_echo "disabled" >&6; }
10405       else
10406         # Check if the provided tool contains a complete path.
10407         tool_specified="$RM"
10408         tool_basename="${tool_specified##*/}"
10409         if test "x$tool_basename" = "x$tool_specified"; then
10410           # A command without a complete path is provided, search $PATH.
10411           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10412 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10413           # Extract the first word of "$tool_basename", so it can be a program name with args.
10414 set dummy $tool_basename; ac_word=$2
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416 $as_echo_n "checking for $ac_word... " >&6; }
10417 if ${ac_cv_path_RM+:} false; then :
10418   $as_echo_n "(cached) " >&6
10419 else
10420   case $RM in
10421   [\\/]* | ?:[\\/]*)
10422   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10423   ;;
10424   *)
10425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426 for as_dir in $PATH
10427 do
10428   IFS=$as_save_IFS
10429   test -z "$as_dir" && as_dir=.
10430     for ac_exec_ext in '' $ac_executable_extensions; do
10431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434     break 2
10435   fi
10436 done
10437   done
10438 IFS=$as_save_IFS
10439 
10440   ;;
10441 esac
10442 fi
10443 RM=$ac_cv_path_RM
10444 if test -n "$RM"; then
10445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10446 $as_echo "$RM" >&6; }
10447 else
10448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449 $as_echo "no" >&6; }
10450 fi
10451 
10452 
10453           if test "x$RM" = x; then
10454             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10455           fi
10456         else
10457           # Otherwise we believe it is a complete path. Use it as it is.
10458           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10459 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10460           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10461 $as_echo_n "checking for RM... " >&6; }
10462           if test ! -x "$tool_specified"; then
10463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10464 $as_echo "not found" >&6; }
10465             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10466           fi
10467           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10468 $as_echo "$tool_specified" >&6; }
10469         fi
10470       fi
10471     fi
10472 
10473   fi
10474 
10475 
10476 
10477   if test "x$RM" = x; then
10478     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10479   fi
10480 
10481 
10482 
10483 
10484 
10485   # Publish this variable in the help.
10486 
10487 
10488   if [ -z "${RMDIR+x}" ]; then
10489     # The variable is not set by user, try to locate tool using the code snippet
10490     for ac_prog in rmdir
10491 do
10492   # Extract the first word of "$ac_prog", so it can be a program name with args.
10493 set dummy $ac_prog; ac_word=$2
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495 $as_echo_n "checking for $ac_word... " >&6; }
10496 if ${ac_cv_path_RMDIR+:} false; then :
10497   $as_echo_n "(cached) " >&6
10498 else
10499   case $RMDIR in
10500   [\\/]* | ?:[\\/]*)
10501   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10502   ;;
10503   *)
10504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505 for as_dir in $PATH
10506 do
10507   IFS=$as_save_IFS
10508   test -z "$as_dir" && as_dir=.
10509     for ac_exec_ext in '' $ac_executable_extensions; do
10510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513     break 2
10514   fi
10515 done
10516   done
10517 IFS=$as_save_IFS
10518 
10519   ;;
10520 esac
10521 fi
10522 RMDIR=$ac_cv_path_RMDIR
10523 if test -n "$RMDIR"; then
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10525 $as_echo "$RMDIR" >&6; }
10526 else
10527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529 fi
10530 
10531 
10532   test -n "$RMDIR" && break
10533 done
10534 
10535   else
10536     # The variable is set, but is it from the command line or the environment?
10537 
10538     # Try to remove the string !RMDIR! from our list.
10539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10541       # If it failed, the variable was not from the command line. Ignore it,
10542       # but warn the user (except for BASH, which is always set by the calling BASH).
10543       if test "xRMDIR" != xBASH; then
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10545 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10546       fi
10547       # Try to locate tool using the code snippet
10548       for ac_prog in rmdir
10549 do
10550   # Extract the first word of "$ac_prog", so it can be a program name with args.
10551 set dummy $ac_prog; ac_word=$2
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553 $as_echo_n "checking for $ac_word... " >&6; }
10554 if ${ac_cv_path_RMDIR+:} false; then :
10555   $as_echo_n "(cached) " >&6
10556 else
10557   case $RMDIR in
10558   [\\/]* | ?:[\\/]*)
10559   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10560   ;;
10561   *)
10562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563 for as_dir in $PATH
10564 do
10565   IFS=$as_save_IFS
10566   test -z "$as_dir" && as_dir=.
10567     for ac_exec_ext in '' $ac_executable_extensions; do
10568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571     break 2
10572   fi
10573 done
10574   done
10575 IFS=$as_save_IFS
10576 
10577   ;;
10578 esac
10579 fi
10580 RMDIR=$ac_cv_path_RMDIR
10581 if test -n "$RMDIR"; then
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10583 $as_echo "$RMDIR" >&6; }
10584 else
10585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586 $as_echo "no" >&6; }
10587 fi
10588 
10589 
10590   test -n "$RMDIR" && break
10591 done
10592 
10593     else
10594       # If it succeeded, then it was overridden by the user. We will use it
10595       # for the tool.
10596 
10597       # First remove it from the list of overridden variables, so we can test
10598       # for unknown variables in the end.
10599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10600 
10601       # Check if we try to supply an empty value
10602       if test "x$RMDIR" = x; then
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10604 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10606 $as_echo_n "checking for RMDIR... " >&6; }
10607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10608 $as_echo "disabled" >&6; }
10609       else
10610         # Check if the provided tool contains a complete path.
10611         tool_specified="$RMDIR"
10612         tool_basename="${tool_specified##*/}"
10613         if test "x$tool_basename" = "x$tool_specified"; then
10614           # A command without a complete path is provided, search $PATH.
10615           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10616 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10617           # Extract the first word of "$tool_basename", so it can be a program name with args.
10618 set dummy $tool_basename; ac_word=$2
10619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620 $as_echo_n "checking for $ac_word... " >&6; }
10621 if ${ac_cv_path_RMDIR+:} false; then :
10622   $as_echo_n "(cached) " >&6
10623 else
10624   case $RMDIR in
10625   [\\/]* | ?:[\\/]*)
10626   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10627   ;;
10628   *)
10629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10630 for as_dir in $PATH
10631 do
10632   IFS=$as_save_IFS
10633   test -z "$as_dir" && as_dir=.
10634     for ac_exec_ext in '' $ac_executable_extensions; do
10635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10636     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10638     break 2
10639   fi
10640 done
10641   done
10642 IFS=$as_save_IFS
10643 
10644   ;;
10645 esac
10646 fi
10647 RMDIR=$ac_cv_path_RMDIR
10648 if test -n "$RMDIR"; then
10649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10650 $as_echo "$RMDIR" >&6; }
10651 else
10652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10653 $as_echo "no" >&6; }
10654 fi
10655 
10656 
10657           if test "x$RMDIR" = x; then
10658             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10659           fi
10660         else
10661           # Otherwise we believe it is a complete path. Use it as it is.
10662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10663 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10665 $as_echo_n "checking for RMDIR... " >&6; }
10666           if test ! -x "$tool_specified"; then
10667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10668 $as_echo "not found" >&6; }
10669             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10670           fi
10671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10672 $as_echo "$tool_specified" >&6; }
10673         fi
10674       fi
10675     fi
10676 
10677   fi
10678 
10679 
10680 
10681   if test "x$RMDIR" = x; then
10682     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10683   fi
10684 
10685 
10686 
10687 
10688 
10689   # Publish this variable in the help.
10690 
10691 
10692   if [ -z "${SH+x}" ]; then
10693     # The variable is not set by user, try to locate tool using the code snippet
10694     for ac_prog in sh
10695 do
10696   # Extract the first word of "$ac_prog", so it can be a program name with args.
10697 set dummy $ac_prog; ac_word=$2
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10699 $as_echo_n "checking for $ac_word... " >&6; }
10700 if ${ac_cv_path_SH+:} false; then :
10701   $as_echo_n "(cached) " >&6
10702 else
10703   case $SH in
10704   [\\/]* | ?:[\\/]*)
10705   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10706   ;;
10707   *)
10708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10709 for as_dir in $PATH
10710 do
10711   IFS=$as_save_IFS
10712   test -z "$as_dir" && as_dir=.
10713     for ac_exec_ext in '' $ac_executable_extensions; do
10714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10715     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10717     break 2
10718   fi
10719 done
10720   done
10721 IFS=$as_save_IFS
10722 
10723   ;;
10724 esac
10725 fi
10726 SH=$ac_cv_path_SH
10727 if test -n "$SH"; then
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10729 $as_echo "$SH" >&6; }
10730 else
10731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732 $as_echo "no" >&6; }
10733 fi
10734 
10735 
10736   test -n "$SH" && break
10737 done
10738 
10739   else
10740     # The variable is set, but is it from the command line or the environment?
10741 
10742     # Try to remove the string !SH! from our list.
10743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10745       # If it failed, the variable was not from the command line. Ignore it,
10746       # but warn the user (except for BASH, which is always set by the calling BASH).
10747       if test "xSH" != xBASH; then
10748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10749 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10750       fi
10751       # Try to locate tool using the code snippet
10752       for ac_prog in sh
10753 do
10754   # Extract the first word of "$ac_prog", so it can be a program name with args.
10755 set dummy $ac_prog; ac_word=$2
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10757 $as_echo_n "checking for $ac_word... " >&6; }
10758 if ${ac_cv_path_SH+:} false; then :
10759   $as_echo_n "(cached) " >&6
10760 else
10761   case $SH in
10762   [\\/]* | ?:[\\/]*)
10763   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10764   ;;
10765   *)
10766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10767 for as_dir in $PATH
10768 do
10769   IFS=$as_save_IFS
10770   test -z "$as_dir" && as_dir=.
10771     for ac_exec_ext in '' $ac_executable_extensions; do
10772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10773     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10775     break 2
10776   fi
10777 done
10778   done
10779 IFS=$as_save_IFS
10780 
10781   ;;
10782 esac
10783 fi
10784 SH=$ac_cv_path_SH
10785 if test -n "$SH"; then
10786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10787 $as_echo "$SH" >&6; }
10788 else
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790 $as_echo "no" >&6; }
10791 fi
10792 
10793 
10794   test -n "$SH" && break
10795 done
10796 
10797     else
10798       # If it succeeded, then it was overridden by the user. We will use it
10799       # for the tool.
10800 
10801       # First remove it from the list of overridden variables, so we can test
10802       # for unknown variables in the end.
10803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10804 
10805       # Check if we try to supply an empty value
10806       if test "x$SH" = x; then
10807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10808 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10810 $as_echo_n "checking for SH... " >&6; }
10811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10812 $as_echo "disabled" >&6; }
10813       else
10814         # Check if the provided tool contains a complete path.
10815         tool_specified="$SH"
10816         tool_basename="${tool_specified##*/}"
10817         if test "x$tool_basename" = "x$tool_specified"; then
10818           # A command without a complete path is provided, search $PATH.
10819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10820 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10821           # Extract the first word of "$tool_basename", so it can be a program name with args.
10822 set dummy $tool_basename; ac_word=$2
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824 $as_echo_n "checking for $ac_word... " >&6; }
10825 if ${ac_cv_path_SH+:} false; then :
10826   $as_echo_n "(cached) " >&6
10827 else
10828   case $SH in
10829   [\\/]* | ?:[\\/]*)
10830   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10831   ;;
10832   *)
10833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834 for as_dir in $PATH
10835 do
10836   IFS=$as_save_IFS
10837   test -z "$as_dir" && as_dir=.
10838     for ac_exec_ext in '' $ac_executable_extensions; do
10839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842     break 2
10843   fi
10844 done
10845   done
10846 IFS=$as_save_IFS
10847 
10848   ;;
10849 esac
10850 fi
10851 SH=$ac_cv_path_SH
10852 if test -n "$SH"; then
10853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10854 $as_echo "$SH" >&6; }
10855 else
10856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857 $as_echo "no" >&6; }
10858 fi
10859 
10860 
10861           if test "x$SH" = x; then
10862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10863           fi
10864         else
10865           # Otherwise we believe it is a complete path. Use it as it is.
10866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10867 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10869 $as_echo_n "checking for SH... " >&6; }
10870           if test ! -x "$tool_specified"; then
10871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10872 $as_echo "not found" >&6; }
10873             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10874           fi
10875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10876 $as_echo "$tool_specified" >&6; }
10877         fi
10878       fi
10879     fi
10880 
10881   fi
10882 
10883 
10884 
10885   if test "x$SH" = x; then
10886     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10887   fi
10888 
10889 
10890 
10891 
10892 
10893   # Publish this variable in the help.
10894 
10895 
10896   if [ -z "${SORT+x}" ]; then
10897     # The variable is not set by user, try to locate tool using the code snippet
10898     for ac_prog in sort
10899 do
10900   # Extract the first word of "$ac_prog", so it can be a program name with args.
10901 set dummy $ac_prog; ac_word=$2
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10903 $as_echo_n "checking for $ac_word... " >&6; }
10904 if ${ac_cv_path_SORT+:} false; then :
10905   $as_echo_n "(cached) " >&6
10906 else
10907   case $SORT in
10908   [\\/]* | ?:[\\/]*)
10909   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10910   ;;
10911   *)
10912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10913 for as_dir in $PATH
10914 do
10915   IFS=$as_save_IFS
10916   test -z "$as_dir" && as_dir=.
10917     for ac_exec_ext in '' $ac_executable_extensions; do
10918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10919     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10921     break 2
10922   fi
10923 done
10924   done
10925 IFS=$as_save_IFS
10926 
10927   ;;
10928 esac
10929 fi
10930 SORT=$ac_cv_path_SORT
10931 if test -n "$SORT"; then
10932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10933 $as_echo "$SORT" >&6; }
10934 else
10935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936 $as_echo "no" >&6; }
10937 fi
10938 
10939 
10940   test -n "$SORT" && break
10941 done
10942 
10943   else
10944     # The variable is set, but is it from the command line or the environment?
10945 
10946     # Try to remove the string !SORT! from our list.
10947     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10948     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10949       # If it failed, the variable was not from the command line. Ignore it,
10950       # but warn the user (except for BASH, which is always set by the calling BASH).
10951       if test "xSORT" != xBASH; then
10952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10953 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10954       fi
10955       # Try to locate tool using the code snippet
10956       for ac_prog in sort
10957 do
10958   # Extract the first word of "$ac_prog", so it can be a program name with args.
10959 set dummy $ac_prog; ac_word=$2
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10961 $as_echo_n "checking for $ac_word... " >&6; }
10962 if ${ac_cv_path_SORT+:} false; then :
10963   $as_echo_n "(cached) " >&6
10964 else
10965   case $SORT in
10966   [\\/]* | ?:[\\/]*)
10967   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10968   ;;
10969   *)
10970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971 for as_dir in $PATH
10972 do
10973   IFS=$as_save_IFS
10974   test -z "$as_dir" && as_dir=.
10975     for ac_exec_ext in '' $ac_executable_extensions; do
10976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10977     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10979     break 2
10980   fi
10981 done
10982   done
10983 IFS=$as_save_IFS
10984 
10985   ;;
10986 esac
10987 fi
10988 SORT=$ac_cv_path_SORT
10989 if test -n "$SORT"; then
10990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10991 $as_echo "$SORT" >&6; }
10992 else
10993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994 $as_echo "no" >&6; }
10995 fi
10996 
10997 
10998   test -n "$SORT" && break
10999 done
11000 
11001     else
11002       # If it succeeded, then it was overridden by the user. We will use it
11003       # for the tool.
11004 
11005       # First remove it from the list of overridden variables, so we can test
11006       # for unknown variables in the end.
11007       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11008 
11009       # Check if we try to supply an empty value
11010       if test "x$SORT" = x; then
11011         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11012 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11014 $as_echo_n "checking for SORT... " >&6; }
11015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11016 $as_echo "disabled" >&6; }
11017       else
11018         # Check if the provided tool contains a complete path.
11019         tool_specified="$SORT"
11020         tool_basename="${tool_specified##*/}"
11021         if test "x$tool_basename" = "x$tool_specified"; then
11022           # A command without a complete path is provided, search $PATH.
11023           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11024 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11025           # Extract the first word of "$tool_basename", so it can be a program name with args.
11026 set dummy $tool_basename; ac_word=$2
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11028 $as_echo_n "checking for $ac_word... " >&6; }
11029 if ${ac_cv_path_SORT+:} false; then :
11030   $as_echo_n "(cached) " >&6
11031 else
11032   case $SORT in
11033   [\\/]* | ?:[\\/]*)
11034   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11035   ;;
11036   *)
11037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11038 for as_dir in $PATH
11039 do
11040   IFS=$as_save_IFS
11041   test -z "$as_dir" && as_dir=.
11042     for ac_exec_ext in '' $ac_executable_extensions; do
11043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11044     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11046     break 2
11047   fi
11048 done
11049   done
11050 IFS=$as_save_IFS
11051 
11052   ;;
11053 esac
11054 fi
11055 SORT=$ac_cv_path_SORT
11056 if test -n "$SORT"; then
11057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11058 $as_echo "$SORT" >&6; }
11059 else
11060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061 $as_echo "no" >&6; }
11062 fi
11063 
11064 
11065           if test "x$SORT" = x; then
11066             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11067           fi
11068         else
11069           # Otherwise we believe it is a complete path. Use it as it is.
11070           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11071 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11072           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11073 $as_echo_n "checking for SORT... " >&6; }
11074           if test ! -x "$tool_specified"; then
11075             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11076 $as_echo "not found" >&6; }
11077             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11078           fi
11079           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11080 $as_echo "$tool_specified" >&6; }
11081         fi
11082       fi
11083     fi
11084 
11085   fi
11086 
11087 
11088 
11089   if test "x$SORT" = x; then
11090     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11091   fi
11092 
11093 
11094 
11095 
11096 
11097   # Publish this variable in the help.
11098 
11099 
11100   if [ -z "${TAIL+x}" ]; then
11101     # The variable is not set by user, try to locate tool using the code snippet
11102     for ac_prog in tail
11103 do
11104   # Extract the first word of "$ac_prog", so it can be a program name with args.
11105 set dummy $ac_prog; ac_word=$2
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107 $as_echo_n "checking for $ac_word... " >&6; }
11108 if ${ac_cv_path_TAIL+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111   case $TAIL in
11112   [\\/]* | ?:[\\/]*)
11113   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11114   ;;
11115   *)
11116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117 for as_dir in $PATH
11118 do
11119   IFS=$as_save_IFS
11120   test -z "$as_dir" && as_dir=.
11121     for ac_exec_ext in '' $ac_executable_extensions; do
11122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125     break 2
11126   fi
11127 done
11128   done
11129 IFS=$as_save_IFS
11130 
11131   ;;
11132 esac
11133 fi
11134 TAIL=$ac_cv_path_TAIL
11135 if test -n "$TAIL"; then
11136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11137 $as_echo "$TAIL" >&6; }
11138 else
11139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140 $as_echo "no" >&6; }
11141 fi
11142 
11143 
11144   test -n "$TAIL" && break
11145 done
11146 
11147   else
11148     # The variable is set, but is it from the command line or the environment?
11149 
11150     # Try to remove the string !TAIL! from our list.
11151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11153       # If it failed, the variable was not from the command line. Ignore it,
11154       # but warn the user (except for BASH, which is always set by the calling BASH).
11155       if test "xTAIL" != xBASH; then
11156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11157 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11158       fi
11159       # Try to locate tool using the code snippet
11160       for ac_prog in tail
11161 do
11162   # Extract the first word of "$ac_prog", so it can be a program name with args.
11163 set dummy $ac_prog; ac_word=$2
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11165 $as_echo_n "checking for $ac_word... " >&6; }
11166 if ${ac_cv_path_TAIL+:} false; then :
11167   $as_echo_n "(cached) " >&6
11168 else
11169   case $TAIL in
11170   [\\/]* | ?:[\\/]*)
11171   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11172   ;;
11173   *)
11174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11175 for as_dir in $PATH
11176 do
11177   IFS=$as_save_IFS
11178   test -z "$as_dir" && as_dir=.
11179     for ac_exec_ext in '' $ac_executable_extensions; do
11180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11181     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11183     break 2
11184   fi
11185 done
11186   done
11187 IFS=$as_save_IFS
11188 
11189   ;;
11190 esac
11191 fi
11192 TAIL=$ac_cv_path_TAIL
11193 if test -n "$TAIL"; then
11194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11195 $as_echo "$TAIL" >&6; }
11196 else
11197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198 $as_echo "no" >&6; }
11199 fi
11200 
11201 
11202   test -n "$TAIL" && break
11203 done
11204 
11205     else
11206       # If it succeeded, then it was overridden by the user. We will use it
11207       # for the tool.
11208 
11209       # First remove it from the list of overridden variables, so we can test
11210       # for unknown variables in the end.
11211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11212 
11213       # Check if we try to supply an empty value
11214       if test "x$TAIL" = x; then
11215         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11216 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11218 $as_echo_n "checking for TAIL... " >&6; }
11219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11220 $as_echo "disabled" >&6; }
11221       else
11222         # Check if the provided tool contains a complete path.
11223         tool_specified="$TAIL"
11224         tool_basename="${tool_specified##*/}"
11225         if test "x$tool_basename" = "x$tool_specified"; then
11226           # A command without a complete path is provided, search $PATH.
11227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11228 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11229           # Extract the first word of "$tool_basename", so it can be a program name with args.
11230 set dummy $tool_basename; ac_word=$2
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11232 $as_echo_n "checking for $ac_word... " >&6; }
11233 if ${ac_cv_path_TAIL+:} false; then :
11234   $as_echo_n "(cached) " >&6
11235 else
11236   case $TAIL in
11237   [\\/]* | ?:[\\/]*)
11238   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11239   ;;
11240   *)
11241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11242 for as_dir in $PATH
11243 do
11244   IFS=$as_save_IFS
11245   test -z "$as_dir" && as_dir=.
11246     for ac_exec_ext in '' $ac_executable_extensions; do
11247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11248     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11250     break 2
11251   fi
11252 done
11253   done
11254 IFS=$as_save_IFS
11255 
11256   ;;
11257 esac
11258 fi
11259 TAIL=$ac_cv_path_TAIL
11260 if test -n "$TAIL"; then
11261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11262 $as_echo "$TAIL" >&6; }
11263 else
11264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265 $as_echo "no" >&6; }
11266 fi
11267 
11268 
11269           if test "x$TAIL" = x; then
11270             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11271           fi
11272         else
11273           # Otherwise we believe it is a complete path. Use it as it is.
11274           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11275 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11276           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11277 $as_echo_n "checking for TAIL... " >&6; }
11278           if test ! -x "$tool_specified"; then
11279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11280 $as_echo "not found" >&6; }
11281             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11282           fi
11283           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11284 $as_echo "$tool_specified" >&6; }
11285         fi
11286       fi
11287     fi
11288 
11289   fi
11290 
11291 
11292 
11293   if test "x$TAIL" = x; then
11294     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11295   fi
11296 
11297 
11298 
11299 
11300 
11301   # Publish this variable in the help.
11302 
11303 
11304   if [ -z "${TAR+x}" ]; then
11305     # The variable is not set by user, try to locate tool using the code snippet
11306     for ac_prog in gtar tar
11307 do
11308   # Extract the first word of "$ac_prog", so it can be a program name with args.
11309 set dummy $ac_prog; ac_word=$2
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11311 $as_echo_n "checking for $ac_word... " >&6; }
11312 if ${ac_cv_path_TAR+:} false; then :
11313   $as_echo_n "(cached) " >&6
11314 else
11315   case $TAR in
11316   [\\/]* | ?:[\\/]*)
11317   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11318   ;;
11319   *)
11320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11321 for as_dir in $PATH
11322 do
11323   IFS=$as_save_IFS
11324   test -z "$as_dir" && as_dir=.
11325     for ac_exec_ext in '' $ac_executable_extensions; do
11326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11327     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11329     break 2
11330   fi
11331 done
11332   done
11333 IFS=$as_save_IFS
11334 
11335   ;;
11336 esac
11337 fi
11338 TAR=$ac_cv_path_TAR
11339 if test -n "$TAR"; then
11340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11341 $as_echo "$TAR" >&6; }
11342 else
11343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344 $as_echo "no" >&6; }
11345 fi
11346 
11347 
11348   test -n "$TAR" && break
11349 done
11350 
11351   else
11352     # The variable is set, but is it from the command line or the environment?
11353 
11354     # Try to remove the string !TAR! from our list.
11355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11357       # If it failed, the variable was not from the command line. Ignore it,
11358       # but warn the user (except for BASH, which is always set by the calling BASH).
11359       if test "xTAR" != xBASH; then
11360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11361 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11362       fi
11363       # Try to locate tool using the code snippet
11364       for ac_prog in gtar tar
11365 do
11366   # Extract the first word of "$ac_prog", so it can be a program name with args.
11367 set dummy $ac_prog; ac_word=$2
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369 $as_echo_n "checking for $ac_word... " >&6; }
11370 if ${ac_cv_path_TAR+:} false; then :
11371   $as_echo_n "(cached) " >&6
11372 else
11373   case $TAR in
11374   [\\/]* | ?:[\\/]*)
11375   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11376   ;;
11377   *)
11378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379 for as_dir in $PATH
11380 do
11381   IFS=$as_save_IFS
11382   test -z "$as_dir" && as_dir=.
11383     for ac_exec_ext in '' $ac_executable_extensions; do
11384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387     break 2
11388   fi
11389 done
11390   done
11391 IFS=$as_save_IFS
11392 
11393   ;;
11394 esac
11395 fi
11396 TAR=$ac_cv_path_TAR
11397 if test -n "$TAR"; then
11398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11399 $as_echo "$TAR" >&6; }
11400 else
11401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402 $as_echo "no" >&6; }
11403 fi
11404 
11405 
11406   test -n "$TAR" && break
11407 done
11408 
11409     else
11410       # If it succeeded, then it was overridden by the user. We will use it
11411       # for the tool.
11412 
11413       # First remove it from the list of overridden variables, so we can test
11414       # for unknown variables in the end.
11415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11416 
11417       # Check if we try to supply an empty value
11418       if test "x$TAR" = x; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11420 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11422 $as_echo_n "checking for TAR... " >&6; }
11423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11424 $as_echo "disabled" >&6; }
11425       else
11426         # Check if the provided tool contains a complete path.
11427         tool_specified="$TAR"
11428         tool_basename="${tool_specified##*/}"
11429         if test "x$tool_basename" = "x$tool_specified"; then
11430           # A command without a complete path is provided, search $PATH.
11431           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11432 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11433           # Extract the first word of "$tool_basename", so it can be a program name with args.
11434 set dummy $tool_basename; ac_word=$2
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436 $as_echo_n "checking for $ac_word... " >&6; }
11437 if ${ac_cv_path_TAR+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   case $TAR in
11441   [\\/]* | ?:[\\/]*)
11442   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11443   ;;
11444   *)
11445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446 for as_dir in $PATH
11447 do
11448   IFS=$as_save_IFS
11449   test -z "$as_dir" && as_dir=.
11450     for ac_exec_ext in '' $ac_executable_extensions; do
11451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454     break 2
11455   fi
11456 done
11457   done
11458 IFS=$as_save_IFS
11459 
11460   ;;
11461 esac
11462 fi
11463 TAR=$ac_cv_path_TAR
11464 if test -n "$TAR"; then
11465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11466 $as_echo "$TAR" >&6; }
11467 else
11468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469 $as_echo "no" >&6; }
11470 fi
11471 
11472 
11473           if test "x$TAR" = x; then
11474             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475           fi
11476         else
11477           # Otherwise we believe it is a complete path. Use it as it is.
11478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11479 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11480           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11481 $as_echo_n "checking for TAR... " >&6; }
11482           if test ! -x "$tool_specified"; then
11483             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484 $as_echo "not found" >&6; }
11485             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11486           fi
11487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488 $as_echo "$tool_specified" >&6; }
11489         fi
11490       fi
11491     fi
11492 
11493   fi
11494 
11495 
11496 
11497   if test "x$TAR" = x; then
11498     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11499   fi
11500 
11501 
11502 
11503 
11504 
11505   # Publish this variable in the help.
11506 
11507 
11508   if [ -z "${TEE+x}" ]; then
11509     # The variable is not set by user, try to locate tool using the code snippet
11510     for ac_prog in tee
11511 do
11512   # Extract the first word of "$ac_prog", so it can be a program name with args.
11513 set dummy $ac_prog; ac_word=$2
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11515 $as_echo_n "checking for $ac_word... " >&6; }
11516 if ${ac_cv_path_TEE+:} false; then :
11517   $as_echo_n "(cached) " >&6
11518 else
11519   case $TEE in
11520   [\\/]* | ?:[\\/]*)
11521   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11522   ;;
11523   *)
11524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525 for as_dir in $PATH
11526 do
11527   IFS=$as_save_IFS
11528   test -z "$as_dir" && as_dir=.
11529     for ac_exec_ext in '' $ac_executable_extensions; do
11530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533     break 2
11534   fi
11535 done
11536   done
11537 IFS=$as_save_IFS
11538 
11539   ;;
11540 esac
11541 fi
11542 TEE=$ac_cv_path_TEE
11543 if test -n "$TEE"; then
11544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11545 $as_echo "$TEE" >&6; }
11546 else
11547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548 $as_echo "no" >&6; }
11549 fi
11550 
11551 
11552   test -n "$TEE" && break
11553 done
11554 
11555   else
11556     # The variable is set, but is it from the command line or the environment?
11557 
11558     # Try to remove the string !TEE! from our list.
11559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11561       # If it failed, the variable was not from the command line. Ignore it,
11562       # but warn the user (except for BASH, which is always set by the calling BASH).
11563       if test "xTEE" != xBASH; then
11564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11565 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11566       fi
11567       # Try to locate tool using the code snippet
11568       for ac_prog in tee
11569 do
11570   # Extract the first word of "$ac_prog", so it can be a program name with args.
11571 set dummy $ac_prog; ac_word=$2
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11573 $as_echo_n "checking for $ac_word... " >&6; }
11574 if ${ac_cv_path_TEE+:} false; then :
11575   $as_echo_n "(cached) " >&6
11576 else
11577   case $TEE in
11578   [\\/]* | ?:[\\/]*)
11579   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11580   ;;
11581   *)
11582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11583 for as_dir in $PATH
11584 do
11585   IFS=$as_save_IFS
11586   test -z "$as_dir" && as_dir=.
11587     for ac_exec_ext in '' $ac_executable_extensions; do
11588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11589     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11591     break 2
11592   fi
11593 done
11594   done
11595 IFS=$as_save_IFS
11596 
11597   ;;
11598 esac
11599 fi
11600 TEE=$ac_cv_path_TEE
11601 if test -n "$TEE"; then
11602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11603 $as_echo "$TEE" >&6; }
11604 else
11605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606 $as_echo "no" >&6; }
11607 fi
11608 
11609 
11610   test -n "$TEE" && break
11611 done
11612 
11613     else
11614       # If it succeeded, then it was overridden by the user. We will use it
11615       # for the tool.
11616 
11617       # First remove it from the list of overridden variables, so we can test
11618       # for unknown variables in the end.
11619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11620 
11621       # Check if we try to supply an empty value
11622       if test "x$TEE" = x; then
11623         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11624 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11626 $as_echo_n "checking for TEE... " >&6; }
11627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11628 $as_echo "disabled" >&6; }
11629       else
11630         # Check if the provided tool contains a complete path.
11631         tool_specified="$TEE"
11632         tool_basename="${tool_specified##*/}"
11633         if test "x$tool_basename" = "x$tool_specified"; then
11634           # A command without a complete path is provided, search $PATH.
11635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11636 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11637           # Extract the first word of "$tool_basename", so it can be a program name with args.
11638 set dummy $tool_basename; ac_word=$2
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11640 $as_echo_n "checking for $ac_word... " >&6; }
11641 if ${ac_cv_path_TEE+:} false; then :
11642   $as_echo_n "(cached) " >&6
11643 else
11644   case $TEE in
11645   [\\/]* | ?:[\\/]*)
11646   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11647   ;;
11648   *)
11649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11650 for as_dir in $PATH
11651 do
11652   IFS=$as_save_IFS
11653   test -z "$as_dir" && as_dir=.
11654     for ac_exec_ext in '' $ac_executable_extensions; do
11655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11656     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11658     break 2
11659   fi
11660 done
11661   done
11662 IFS=$as_save_IFS
11663 
11664   ;;
11665 esac
11666 fi
11667 TEE=$ac_cv_path_TEE
11668 if test -n "$TEE"; then
11669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11670 $as_echo "$TEE" >&6; }
11671 else
11672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673 $as_echo "no" >&6; }
11674 fi
11675 
11676 
11677           if test "x$TEE" = x; then
11678             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11679           fi
11680         else
11681           # Otherwise we believe it is a complete path. Use it as it is.
11682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11683 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11684           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11685 $as_echo_n "checking for TEE... " >&6; }
11686           if test ! -x "$tool_specified"; then
11687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11688 $as_echo "not found" >&6; }
11689             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11690           fi
11691           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11692 $as_echo "$tool_specified" >&6; }
11693         fi
11694       fi
11695     fi
11696 
11697   fi
11698 
11699 
11700 
11701   if test "x$TEE" = x; then
11702     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11703   fi
11704 
11705 
11706 
11707 
11708 
11709   # Publish this variable in the help.
11710 
11711 
11712   if [ -z "${TOUCH+x}" ]; then
11713     # The variable is not set by user, try to locate tool using the code snippet
11714     for ac_prog in touch
11715 do
11716   # Extract the first word of "$ac_prog", so it can be a program name with args.
11717 set dummy $ac_prog; ac_word=$2
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719 $as_echo_n "checking for $ac_word... " >&6; }
11720 if ${ac_cv_path_TOUCH+:} false; then :
11721   $as_echo_n "(cached) " >&6
11722 else
11723   case $TOUCH in
11724   [\\/]* | ?:[\\/]*)
11725   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11726   ;;
11727   *)
11728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729 for as_dir in $PATH
11730 do
11731   IFS=$as_save_IFS
11732   test -z "$as_dir" && as_dir=.
11733     for ac_exec_ext in '' $ac_executable_extensions; do
11734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737     break 2
11738   fi
11739 done
11740   done
11741 IFS=$as_save_IFS
11742 
11743   ;;
11744 esac
11745 fi
11746 TOUCH=$ac_cv_path_TOUCH
11747 if test -n "$TOUCH"; then
11748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11749 $as_echo "$TOUCH" >&6; }
11750 else
11751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752 $as_echo "no" >&6; }
11753 fi
11754 
11755 
11756   test -n "$TOUCH" && break
11757 done
11758 
11759   else
11760     # The variable is set, but is it from the command line or the environment?
11761 
11762     # Try to remove the string !TOUCH! from our list.
11763     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11764     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11765       # If it failed, the variable was not from the command line. Ignore it,
11766       # but warn the user (except for BASH, which is always set by the calling BASH).
11767       if test "xTOUCH" != xBASH; then
11768         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11769 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11770       fi
11771       # Try to locate tool using the code snippet
11772       for ac_prog in touch
11773 do
11774   # Extract the first word of "$ac_prog", so it can be a program name with args.
11775 set dummy $ac_prog; ac_word=$2
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11777 $as_echo_n "checking for $ac_word... " >&6; }
11778 if ${ac_cv_path_TOUCH+:} false; then :
11779   $as_echo_n "(cached) " >&6
11780 else
11781   case $TOUCH in
11782   [\\/]* | ?:[\\/]*)
11783   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11784   ;;
11785   *)
11786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11787 for as_dir in $PATH
11788 do
11789   IFS=$as_save_IFS
11790   test -z "$as_dir" && as_dir=.
11791     for ac_exec_ext in '' $ac_executable_extensions; do
11792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11793     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11795     break 2
11796   fi
11797 done
11798   done
11799 IFS=$as_save_IFS
11800 
11801   ;;
11802 esac
11803 fi
11804 TOUCH=$ac_cv_path_TOUCH
11805 if test -n "$TOUCH"; then
11806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11807 $as_echo "$TOUCH" >&6; }
11808 else
11809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810 $as_echo "no" >&6; }
11811 fi
11812 
11813 
11814   test -n "$TOUCH" && break
11815 done
11816 
11817     else
11818       # If it succeeded, then it was overridden by the user. We will use it
11819       # for the tool.
11820 
11821       # First remove it from the list of overridden variables, so we can test
11822       # for unknown variables in the end.
11823       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11824 
11825       # Check if we try to supply an empty value
11826       if test "x$TOUCH" = x; then
11827         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11828 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11829         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11830 $as_echo_n "checking for TOUCH... " >&6; }
11831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11832 $as_echo "disabled" >&6; }
11833       else
11834         # Check if the provided tool contains a complete path.
11835         tool_specified="$TOUCH"
11836         tool_basename="${tool_specified##*/}"
11837         if test "x$tool_basename" = "x$tool_specified"; then
11838           # A command without a complete path is provided, search $PATH.
11839           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11840 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11841           # Extract the first word of "$tool_basename", so it can be a program name with args.
11842 set dummy $tool_basename; ac_word=$2
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11844 $as_echo_n "checking for $ac_word... " >&6; }
11845 if ${ac_cv_path_TOUCH+:} false; then :
11846   $as_echo_n "(cached) " >&6
11847 else
11848   case $TOUCH in
11849   [\\/]* | ?:[\\/]*)
11850   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11851   ;;
11852   *)
11853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11854 for as_dir in $PATH
11855 do
11856   IFS=$as_save_IFS
11857   test -z "$as_dir" && as_dir=.
11858     for ac_exec_ext in '' $ac_executable_extensions; do
11859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11860     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11862     break 2
11863   fi
11864 done
11865   done
11866 IFS=$as_save_IFS
11867 
11868   ;;
11869 esac
11870 fi
11871 TOUCH=$ac_cv_path_TOUCH
11872 if test -n "$TOUCH"; then
11873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11874 $as_echo "$TOUCH" >&6; }
11875 else
11876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11877 $as_echo "no" >&6; }
11878 fi
11879 
11880 
11881           if test "x$TOUCH" = x; then
11882             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11883           fi
11884         else
11885           # Otherwise we believe it is a complete path. Use it as it is.
11886           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11887 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11889 $as_echo_n "checking for TOUCH... " >&6; }
11890           if test ! -x "$tool_specified"; then
11891             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11892 $as_echo "not found" >&6; }
11893             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11894           fi
11895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11896 $as_echo "$tool_specified" >&6; }
11897         fi
11898       fi
11899     fi
11900 
11901   fi
11902 
11903 
11904 
11905   if test "x$TOUCH" = x; then
11906     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11907   fi
11908 
11909 
11910 
11911 
11912 
11913   # Publish this variable in the help.
11914 
11915 
11916   if [ -z "${TR+x}" ]; then
11917     # The variable is not set by user, try to locate tool using the code snippet
11918     for ac_prog in tr
11919 do
11920   # Extract the first word of "$ac_prog", so it can be a program name with args.
11921 set dummy $ac_prog; ac_word=$2
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923 $as_echo_n "checking for $ac_word... " >&6; }
11924 if ${ac_cv_path_TR+:} false; then :
11925   $as_echo_n "(cached) " >&6
11926 else
11927   case $TR in
11928   [\\/]* | ?:[\\/]*)
11929   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11930   ;;
11931   *)
11932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933 for as_dir in $PATH
11934 do
11935   IFS=$as_save_IFS
11936   test -z "$as_dir" && as_dir=.
11937     for ac_exec_ext in '' $ac_executable_extensions; do
11938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11939     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941     break 2
11942   fi
11943 done
11944   done
11945 IFS=$as_save_IFS
11946 
11947   ;;
11948 esac
11949 fi
11950 TR=$ac_cv_path_TR
11951 if test -n "$TR"; then
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11953 $as_echo "$TR" >&6; }
11954 else
11955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956 $as_echo "no" >&6; }
11957 fi
11958 
11959 
11960   test -n "$TR" && break
11961 done
11962 
11963   else
11964     # The variable is set, but is it from the command line or the environment?
11965 
11966     # Try to remove the string !TR! from our list.
11967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11969       # If it failed, the variable was not from the command line. Ignore it,
11970       # but warn the user (except for BASH, which is always set by the calling BASH).
11971       if test "xTR" != xBASH; then
11972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11973 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11974       fi
11975       # Try to locate tool using the code snippet
11976       for ac_prog in tr
11977 do
11978   # Extract the first word of "$ac_prog", so it can be a program name with args.
11979 set dummy $ac_prog; ac_word=$2
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981 $as_echo_n "checking for $ac_word... " >&6; }
11982 if ${ac_cv_path_TR+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   case $TR in
11986   [\\/]* | ?:[\\/]*)
11987   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11988   ;;
11989   *)
11990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991 for as_dir in $PATH
11992 do
11993   IFS=$as_save_IFS
11994   test -z "$as_dir" && as_dir=.
11995     for ac_exec_ext in '' $ac_executable_extensions; do
11996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999     break 2
12000   fi
12001 done
12002   done
12003 IFS=$as_save_IFS
12004 
12005   ;;
12006 esac
12007 fi
12008 TR=$ac_cv_path_TR
12009 if test -n "$TR"; then
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12011 $as_echo "$TR" >&6; }
12012 else
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014 $as_echo "no" >&6; }
12015 fi
12016 
12017 
12018   test -n "$TR" && break
12019 done
12020 
12021     else
12022       # If it succeeded, then it was overridden by the user. We will use it
12023       # for the tool.
12024 
12025       # First remove it from the list of overridden variables, so we can test
12026       # for unknown variables in the end.
12027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12028 
12029       # Check if we try to supply an empty value
12030       if test "x$TR" = x; then
12031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12032 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12034 $as_echo_n "checking for TR... " >&6; }
12035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12036 $as_echo "disabled" >&6; }
12037       else
12038         # Check if the provided tool contains a complete path.
12039         tool_specified="$TR"
12040         tool_basename="${tool_specified##*/}"
12041         if test "x$tool_basename" = "x$tool_specified"; then
12042           # A command without a complete path is provided, search $PATH.
12043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12044 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12045           # Extract the first word of "$tool_basename", so it can be a program name with args.
12046 set dummy $tool_basename; ac_word=$2
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12048 $as_echo_n "checking for $ac_word... " >&6; }
12049 if ${ac_cv_path_TR+:} false; then :
12050   $as_echo_n "(cached) " >&6
12051 else
12052   case $TR in
12053   [\\/]* | ?:[\\/]*)
12054   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12055   ;;
12056   *)
12057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12058 for as_dir in $PATH
12059 do
12060   IFS=$as_save_IFS
12061   test -z "$as_dir" && as_dir=.
12062     for ac_exec_ext in '' $ac_executable_extensions; do
12063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12064     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12066     break 2
12067   fi
12068 done
12069   done
12070 IFS=$as_save_IFS
12071 
12072   ;;
12073 esac
12074 fi
12075 TR=$ac_cv_path_TR
12076 if test -n "$TR"; then
12077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12078 $as_echo "$TR" >&6; }
12079 else
12080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081 $as_echo "no" >&6; }
12082 fi
12083 
12084 
12085           if test "x$TR" = x; then
12086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12087           fi
12088         else
12089           # Otherwise we believe it is a complete path. Use it as it is.
12090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12091 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12093 $as_echo_n "checking for TR... " >&6; }
12094           if test ! -x "$tool_specified"; then
12095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12096 $as_echo "not found" >&6; }
12097             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12098           fi
12099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12100 $as_echo "$tool_specified" >&6; }
12101         fi
12102       fi
12103     fi
12104 
12105   fi
12106 
12107 
12108 
12109   if test "x$TR" = x; then
12110     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12111   fi
12112 
12113 
12114 
12115 
12116 
12117   # Publish this variable in the help.
12118 
12119 
12120   if [ -z "${UNAME+x}" ]; then
12121     # The variable is not set by user, try to locate tool using the code snippet
12122     for ac_prog in uname
12123 do
12124   # Extract the first word of "$ac_prog", so it can be a program name with args.
12125 set dummy $ac_prog; ac_word=$2
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12127 $as_echo_n "checking for $ac_word... " >&6; }
12128 if ${ac_cv_path_UNAME+:} false; then :
12129   $as_echo_n "(cached) " >&6
12130 else
12131   case $UNAME in
12132   [\\/]* | ?:[\\/]*)
12133   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12134   ;;
12135   *)
12136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12137 for as_dir in $PATH
12138 do
12139   IFS=$as_save_IFS
12140   test -z "$as_dir" && as_dir=.
12141     for ac_exec_ext in '' $ac_executable_extensions; do
12142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12143     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12145     break 2
12146   fi
12147 done
12148   done
12149 IFS=$as_save_IFS
12150 
12151   ;;
12152 esac
12153 fi
12154 UNAME=$ac_cv_path_UNAME
12155 if test -n "$UNAME"; then
12156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12157 $as_echo "$UNAME" >&6; }
12158 else
12159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160 $as_echo "no" >&6; }
12161 fi
12162 
12163 
12164   test -n "$UNAME" && break
12165 done
12166 
12167   else
12168     # The variable is set, but is it from the command line or the environment?
12169 
12170     # Try to remove the string !UNAME! from our list.
12171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12173       # If it failed, the variable was not from the command line. Ignore it,
12174       # but warn the user (except for BASH, which is always set by the calling BASH).
12175       if test "xUNAME" != xBASH; then
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12177 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12178       fi
12179       # Try to locate tool using the code snippet
12180       for ac_prog in uname
12181 do
12182   # Extract the first word of "$ac_prog", so it can be a program name with args.
12183 set dummy $ac_prog; ac_word=$2
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185 $as_echo_n "checking for $ac_word... " >&6; }
12186 if ${ac_cv_path_UNAME+:} false; then :
12187   $as_echo_n "(cached) " >&6
12188 else
12189   case $UNAME in
12190   [\\/]* | ?:[\\/]*)
12191   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12192   ;;
12193   *)
12194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195 for as_dir in $PATH
12196 do
12197   IFS=$as_save_IFS
12198   test -z "$as_dir" && as_dir=.
12199     for ac_exec_ext in '' $ac_executable_extensions; do
12200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203     break 2
12204   fi
12205 done
12206   done
12207 IFS=$as_save_IFS
12208 
12209   ;;
12210 esac
12211 fi
12212 UNAME=$ac_cv_path_UNAME
12213 if test -n "$UNAME"; then
12214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12215 $as_echo "$UNAME" >&6; }
12216 else
12217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218 $as_echo "no" >&6; }
12219 fi
12220 
12221 
12222   test -n "$UNAME" && break
12223 done
12224 
12225     else
12226       # If it succeeded, then it was overridden by the user. We will use it
12227       # for the tool.
12228 
12229       # First remove it from the list of overridden variables, so we can test
12230       # for unknown variables in the end.
12231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12232 
12233       # Check if we try to supply an empty value
12234       if test "x$UNAME" = x; then
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12236 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12238 $as_echo_n "checking for UNAME... " >&6; }
12239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12240 $as_echo "disabled" >&6; }
12241       else
12242         # Check if the provided tool contains a complete path.
12243         tool_specified="$UNAME"
12244         tool_basename="${tool_specified##*/}"
12245         if test "x$tool_basename" = "x$tool_specified"; then
12246           # A command without a complete path is provided, search $PATH.
12247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12248 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12249           # Extract the first word of "$tool_basename", so it can be a program name with args.
12250 set dummy $tool_basename; ac_word=$2
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12252 $as_echo_n "checking for $ac_word... " >&6; }
12253 if ${ac_cv_path_UNAME+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   case $UNAME in
12257   [\\/]* | ?:[\\/]*)
12258   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12259   ;;
12260   *)
12261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12262 for as_dir in $PATH
12263 do
12264   IFS=$as_save_IFS
12265   test -z "$as_dir" && as_dir=.
12266     for ac_exec_ext in '' $ac_executable_extensions; do
12267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12268     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12270     break 2
12271   fi
12272 done
12273   done
12274 IFS=$as_save_IFS
12275 
12276   ;;
12277 esac
12278 fi
12279 UNAME=$ac_cv_path_UNAME
12280 if test -n "$UNAME"; then
12281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12282 $as_echo "$UNAME" >&6; }
12283 else
12284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285 $as_echo "no" >&6; }
12286 fi
12287 
12288 
12289           if test "x$UNAME" = x; then
12290             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12291           fi
12292         else
12293           # Otherwise we believe it is a complete path. Use it as it is.
12294           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12295 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12296           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12297 $as_echo_n "checking for UNAME... " >&6; }
12298           if test ! -x "$tool_specified"; then
12299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12300 $as_echo "not found" >&6; }
12301             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12302           fi
12303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12304 $as_echo "$tool_specified" >&6; }
12305         fi
12306       fi
12307     fi
12308 
12309   fi
12310 
12311 
12312 
12313   if test "x$UNAME" = x; then
12314     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12315   fi
12316 
12317 
12318 
12319 
12320 
12321   # Publish this variable in the help.
12322 
12323 
12324   if [ -z "${UNIQ+x}" ]; then
12325     # The variable is not set by user, try to locate tool using the code snippet
12326     for ac_prog in uniq
12327 do
12328   # Extract the first word of "$ac_prog", so it can be a program name with args.
12329 set dummy $ac_prog; ac_word=$2
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12331 $as_echo_n "checking for $ac_word... " >&6; }
12332 if ${ac_cv_path_UNIQ+:} false; then :
12333   $as_echo_n "(cached) " >&6
12334 else
12335   case $UNIQ in
12336   [\\/]* | ?:[\\/]*)
12337   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12338   ;;
12339   *)
12340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341 for as_dir in $PATH
12342 do
12343   IFS=$as_save_IFS
12344   test -z "$as_dir" && as_dir=.
12345     for ac_exec_ext in '' $ac_executable_extensions; do
12346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12347     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12349     break 2
12350   fi
12351 done
12352   done
12353 IFS=$as_save_IFS
12354 
12355   ;;
12356 esac
12357 fi
12358 UNIQ=$ac_cv_path_UNIQ
12359 if test -n "$UNIQ"; then
12360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12361 $as_echo "$UNIQ" >&6; }
12362 else
12363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364 $as_echo "no" >&6; }
12365 fi
12366 
12367 
12368   test -n "$UNIQ" && break
12369 done
12370 
12371   else
12372     # The variable is set, but is it from the command line or the environment?
12373 
12374     # Try to remove the string !UNIQ! from our list.
12375     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12376     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12377       # If it failed, the variable was not from the command line. Ignore it,
12378       # but warn the user (except for BASH, which is always set by the calling BASH).
12379       if test "xUNIQ" != xBASH; then
12380         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12381 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12382       fi
12383       # Try to locate tool using the code snippet
12384       for ac_prog in uniq
12385 do
12386   # Extract the first word of "$ac_prog", so it can be a program name with args.
12387 set dummy $ac_prog; ac_word=$2
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12389 $as_echo_n "checking for $ac_word... " >&6; }
12390 if ${ac_cv_path_UNIQ+:} false; then :
12391   $as_echo_n "(cached) " >&6
12392 else
12393   case $UNIQ in
12394   [\\/]* | ?:[\\/]*)
12395   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12396   ;;
12397   *)
12398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399 for as_dir in $PATH
12400 do
12401   IFS=$as_save_IFS
12402   test -z "$as_dir" && as_dir=.
12403     for ac_exec_ext in '' $ac_executable_extensions; do
12404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12405     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12407     break 2
12408   fi
12409 done
12410   done
12411 IFS=$as_save_IFS
12412 
12413   ;;
12414 esac
12415 fi
12416 UNIQ=$ac_cv_path_UNIQ
12417 if test -n "$UNIQ"; then
12418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12419 $as_echo "$UNIQ" >&6; }
12420 else
12421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422 $as_echo "no" >&6; }
12423 fi
12424 
12425 
12426   test -n "$UNIQ" && break
12427 done
12428 
12429     else
12430       # If it succeeded, then it was overridden by the user. We will use it
12431       # for the tool.
12432 
12433       # First remove it from the list of overridden variables, so we can test
12434       # for unknown variables in the end.
12435       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12436 
12437       # Check if we try to supply an empty value
12438       if test "x$UNIQ" = x; then
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12440 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12441         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12442 $as_echo_n "checking for UNIQ... " >&6; }
12443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12444 $as_echo "disabled" >&6; }
12445       else
12446         # Check if the provided tool contains a complete path.
12447         tool_specified="$UNIQ"
12448         tool_basename="${tool_specified##*/}"
12449         if test "x$tool_basename" = "x$tool_specified"; then
12450           # A command without a complete path is provided, search $PATH.
12451           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12452 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12453           # Extract the first word of "$tool_basename", so it can be a program name with args.
12454 set dummy $tool_basename; ac_word=$2
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456 $as_echo_n "checking for $ac_word... " >&6; }
12457 if ${ac_cv_path_UNIQ+:} false; then :
12458   $as_echo_n "(cached) " >&6
12459 else
12460   case $UNIQ in
12461   [\\/]* | ?:[\\/]*)
12462   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12463   ;;
12464   *)
12465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466 for as_dir in $PATH
12467 do
12468   IFS=$as_save_IFS
12469   test -z "$as_dir" && as_dir=.
12470     for ac_exec_ext in '' $ac_executable_extensions; do
12471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12472     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474     break 2
12475   fi
12476 done
12477   done
12478 IFS=$as_save_IFS
12479 
12480   ;;
12481 esac
12482 fi
12483 UNIQ=$ac_cv_path_UNIQ
12484 if test -n "$UNIQ"; then
12485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12486 $as_echo "$UNIQ" >&6; }
12487 else
12488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489 $as_echo "no" >&6; }
12490 fi
12491 
12492 
12493           if test "x$UNIQ" = x; then
12494             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12495           fi
12496         else
12497           # Otherwise we believe it is a complete path. Use it as it is.
12498           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12499 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12500           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12501 $as_echo_n "checking for UNIQ... " >&6; }
12502           if test ! -x "$tool_specified"; then
12503             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12504 $as_echo "not found" >&6; }
12505             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12506           fi
12507           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12508 $as_echo "$tool_specified" >&6; }
12509         fi
12510       fi
12511     fi
12512 
12513   fi
12514 
12515 
12516 
12517   if test "x$UNIQ" = x; then
12518     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12519   fi
12520 
12521 
12522 
12523 
12524 
12525   # Publish this variable in the help.
12526 
12527 
12528   if [ -z "${WC+x}" ]; then
12529     # The variable is not set by user, try to locate tool using the code snippet
12530     for ac_prog in wc
12531 do
12532   # Extract the first word of "$ac_prog", so it can be a program name with args.
12533 set dummy $ac_prog; ac_word=$2
12534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12535 $as_echo_n "checking for $ac_word... " >&6; }
12536 if ${ac_cv_path_WC+:} false; then :
12537   $as_echo_n "(cached) " >&6
12538 else
12539   case $WC in
12540   [\\/]* | ?:[\\/]*)
12541   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12542   ;;
12543   *)
12544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12545 for as_dir in $PATH
12546 do
12547   IFS=$as_save_IFS
12548   test -z "$as_dir" && as_dir=.
12549     for ac_exec_ext in '' $ac_executable_extensions; do
12550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12551     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12553     break 2
12554   fi
12555 done
12556   done
12557 IFS=$as_save_IFS
12558 
12559   ;;
12560 esac
12561 fi
12562 WC=$ac_cv_path_WC
12563 if test -n "$WC"; then
12564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12565 $as_echo "$WC" >&6; }
12566 else
12567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12568 $as_echo "no" >&6; }
12569 fi
12570 
12571 
12572   test -n "$WC" && break
12573 done
12574 
12575   else
12576     # The variable is set, but is it from the command line or the environment?
12577 
12578     # Try to remove the string !WC! from our list.
12579     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12580     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12581       # If it failed, the variable was not from the command line. Ignore it,
12582       # but warn the user (except for BASH, which is always set by the calling BASH).
12583       if test "xWC" != xBASH; then
12584         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12585 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12586       fi
12587       # Try to locate tool using the code snippet
12588       for ac_prog in wc
12589 do
12590   # Extract the first word of "$ac_prog", so it can be a program name with args.
12591 set dummy $ac_prog; ac_word=$2
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12593 $as_echo_n "checking for $ac_word... " >&6; }
12594 if ${ac_cv_path_WC+:} false; then :
12595   $as_echo_n "(cached) " >&6
12596 else
12597   case $WC in
12598   [\\/]* | ?:[\\/]*)
12599   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12600   ;;
12601   *)
12602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12603 for as_dir in $PATH
12604 do
12605   IFS=$as_save_IFS
12606   test -z "$as_dir" && as_dir=.
12607     for ac_exec_ext in '' $ac_executable_extensions; do
12608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12609     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12611     break 2
12612   fi
12613 done
12614   done
12615 IFS=$as_save_IFS
12616 
12617   ;;
12618 esac
12619 fi
12620 WC=$ac_cv_path_WC
12621 if test -n "$WC"; then
12622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12623 $as_echo "$WC" >&6; }
12624 else
12625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12626 $as_echo "no" >&6; }
12627 fi
12628 
12629 
12630   test -n "$WC" && break
12631 done
12632 
12633     else
12634       # If it succeeded, then it was overridden by the user. We will use it
12635       # for the tool.
12636 
12637       # First remove it from the list of overridden variables, so we can test
12638       # for unknown variables in the end.
12639       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12640 
12641       # Check if we try to supply an empty value
12642       if test "x$WC" = x; then
12643         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12644 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12646 $as_echo_n "checking for WC... " >&6; }
12647         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12648 $as_echo "disabled" >&6; }
12649       else
12650         # Check if the provided tool contains a complete path.
12651         tool_specified="$WC"
12652         tool_basename="${tool_specified##*/}"
12653         if test "x$tool_basename" = "x$tool_specified"; then
12654           # A command without a complete path is provided, search $PATH.
12655           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12656 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12657           # Extract the first word of "$tool_basename", so it can be a program name with args.
12658 set dummy $tool_basename; ac_word=$2
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12660 $as_echo_n "checking for $ac_word... " >&6; }
12661 if ${ac_cv_path_WC+:} false; then :
12662   $as_echo_n "(cached) " >&6
12663 else
12664   case $WC in
12665   [\\/]* | ?:[\\/]*)
12666   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12667   ;;
12668   *)
12669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12670 for as_dir in $PATH
12671 do
12672   IFS=$as_save_IFS
12673   test -z "$as_dir" && as_dir=.
12674     for ac_exec_ext in '' $ac_executable_extensions; do
12675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12676     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12678     break 2
12679   fi
12680 done
12681   done
12682 IFS=$as_save_IFS
12683 
12684   ;;
12685 esac
12686 fi
12687 WC=$ac_cv_path_WC
12688 if test -n "$WC"; then
12689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12690 $as_echo "$WC" >&6; }
12691 else
12692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12693 $as_echo "no" >&6; }
12694 fi
12695 
12696 
12697           if test "x$WC" = x; then
12698             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12699           fi
12700         else
12701           # Otherwise we believe it is a complete path. Use it as it is.
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12703 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12704           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12705 $as_echo_n "checking for WC... " >&6; }
12706           if test ! -x "$tool_specified"; then
12707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12708 $as_echo "not found" >&6; }
12709             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12710           fi
12711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12712 $as_echo "$tool_specified" >&6; }
12713         fi
12714       fi
12715     fi
12716 
12717   fi
12718 
12719 
12720 
12721   if test "x$WC" = x; then
12722     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12723   fi
12724 
12725 
12726 
12727 
12728 
12729   # Publish this variable in the help.
12730 
12731 
12732   if [ -z "${WHICH+x}" ]; then
12733     # The variable is not set by user, try to locate tool using the code snippet
12734     for ac_prog in which
12735 do
12736   # Extract the first word of "$ac_prog", so it can be a program name with args.
12737 set dummy $ac_prog; ac_word=$2
12738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12739 $as_echo_n "checking for $ac_word... " >&6; }
12740 if ${ac_cv_path_WHICH+:} false; then :
12741   $as_echo_n "(cached) " >&6
12742 else
12743   case $WHICH in
12744   [\\/]* | ?:[\\/]*)
12745   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12746   ;;
12747   *)
12748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12749 for as_dir in $PATH
12750 do
12751   IFS=$as_save_IFS
12752   test -z "$as_dir" && as_dir=.
12753     for ac_exec_ext in '' $ac_executable_extensions; do
12754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12755     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12757     break 2
12758   fi
12759 done
12760   done
12761 IFS=$as_save_IFS
12762 
12763   ;;
12764 esac
12765 fi
12766 WHICH=$ac_cv_path_WHICH
12767 if test -n "$WHICH"; then
12768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12769 $as_echo "$WHICH" >&6; }
12770 else
12771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12772 $as_echo "no" >&6; }
12773 fi
12774 
12775 
12776   test -n "$WHICH" && break
12777 done
12778 
12779   else
12780     # The variable is set, but is it from the command line or the environment?
12781 
12782     # Try to remove the string !WHICH! from our list.
12783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12785       # If it failed, the variable was not from the command line. Ignore it,
12786       # but warn the user (except for BASH, which is always set by the calling BASH).
12787       if test "xWHICH" != xBASH; then
12788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12789 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12790       fi
12791       # Try to locate tool using the code snippet
12792       for ac_prog in which
12793 do
12794   # Extract the first word of "$ac_prog", so it can be a program name with args.
12795 set dummy $ac_prog; ac_word=$2
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12797 $as_echo_n "checking for $ac_word... " >&6; }
12798 if ${ac_cv_path_WHICH+:} false; then :
12799   $as_echo_n "(cached) " >&6
12800 else
12801   case $WHICH in
12802   [\\/]* | ?:[\\/]*)
12803   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12804   ;;
12805   *)
12806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12807 for as_dir in $PATH
12808 do
12809   IFS=$as_save_IFS
12810   test -z "$as_dir" && as_dir=.
12811     for ac_exec_ext in '' $ac_executable_extensions; do
12812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12813     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12815     break 2
12816   fi
12817 done
12818   done
12819 IFS=$as_save_IFS
12820 
12821   ;;
12822 esac
12823 fi
12824 WHICH=$ac_cv_path_WHICH
12825 if test -n "$WHICH"; then
12826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12827 $as_echo "$WHICH" >&6; }
12828 else
12829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12830 $as_echo "no" >&6; }
12831 fi
12832 
12833 
12834   test -n "$WHICH" && break
12835 done
12836 
12837     else
12838       # If it succeeded, then it was overridden by the user. We will use it
12839       # for the tool.
12840 
12841       # First remove it from the list of overridden variables, so we can test
12842       # for unknown variables in the end.
12843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12844 
12845       # Check if we try to supply an empty value
12846       if test "x$WHICH" = x; then
12847         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12848 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12850 $as_echo_n "checking for WHICH... " >&6; }
12851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12852 $as_echo "disabled" >&6; }
12853       else
12854         # Check if the provided tool contains a complete path.
12855         tool_specified="$WHICH"
12856         tool_basename="${tool_specified##*/}"
12857         if test "x$tool_basename" = "x$tool_specified"; then
12858           # A command without a complete path is provided, search $PATH.
12859           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12860 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12861           # Extract the first word of "$tool_basename", so it can be a program name with args.
12862 set dummy $tool_basename; ac_word=$2
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12864 $as_echo_n "checking for $ac_word... " >&6; }
12865 if ${ac_cv_path_WHICH+:} false; then :
12866   $as_echo_n "(cached) " >&6
12867 else
12868   case $WHICH in
12869   [\\/]* | ?:[\\/]*)
12870   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12871   ;;
12872   *)
12873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12874 for as_dir in $PATH
12875 do
12876   IFS=$as_save_IFS
12877   test -z "$as_dir" && as_dir=.
12878     for ac_exec_ext in '' $ac_executable_extensions; do
12879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12880     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12882     break 2
12883   fi
12884 done
12885   done
12886 IFS=$as_save_IFS
12887 
12888   ;;
12889 esac
12890 fi
12891 WHICH=$ac_cv_path_WHICH
12892 if test -n "$WHICH"; then
12893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12894 $as_echo "$WHICH" >&6; }
12895 else
12896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12897 $as_echo "no" >&6; }
12898 fi
12899 
12900 
12901           if test "x$WHICH" = x; then
12902             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12903           fi
12904         else
12905           # Otherwise we believe it is a complete path. Use it as it is.
12906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12907 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12908           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12909 $as_echo_n "checking for WHICH... " >&6; }
12910           if test ! -x "$tool_specified"; then
12911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12912 $as_echo "not found" >&6; }
12913             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12914           fi
12915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12916 $as_echo "$tool_specified" >&6; }
12917         fi
12918       fi
12919     fi
12920 
12921   fi
12922 
12923 
12924 
12925   if test "x$WHICH" = x; then
12926     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12927   fi
12928 
12929 
12930 
12931 
12932 
12933   # Publish this variable in the help.
12934 
12935 
12936   if [ -z "${XARGS+x}" ]; then
12937     # The variable is not set by user, try to locate tool using the code snippet
12938     for ac_prog in xargs
12939 do
12940   # Extract the first word of "$ac_prog", so it can be a program name with args.
12941 set dummy $ac_prog; ac_word=$2
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12943 $as_echo_n "checking for $ac_word... " >&6; }
12944 if ${ac_cv_path_XARGS+:} false; then :
12945   $as_echo_n "(cached) " >&6
12946 else
12947   case $XARGS in
12948   [\\/]* | ?:[\\/]*)
12949   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12950   ;;
12951   *)
12952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12953 for as_dir in $PATH
12954 do
12955   IFS=$as_save_IFS
12956   test -z "$as_dir" && as_dir=.
12957     for ac_exec_ext in '' $ac_executable_extensions; do
12958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12959     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12961     break 2
12962   fi
12963 done
12964   done
12965 IFS=$as_save_IFS
12966 
12967   ;;
12968 esac
12969 fi
12970 XARGS=$ac_cv_path_XARGS
12971 if test -n "$XARGS"; then
12972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12973 $as_echo "$XARGS" >&6; }
12974 else
12975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12976 $as_echo "no" >&6; }
12977 fi
12978 
12979 
12980   test -n "$XARGS" && break
12981 done
12982 
12983   else
12984     # The variable is set, but is it from the command line or the environment?
12985 
12986     # Try to remove the string !XARGS! from our list.
12987     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12988     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12989       # If it failed, the variable was not from the command line. Ignore it,
12990       # but warn the user (except for BASH, which is always set by the calling BASH).
12991       if test "xXARGS" != xBASH; then
12992         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12993 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12994       fi
12995       # Try to locate tool using the code snippet
12996       for ac_prog in xargs
12997 do
12998   # Extract the first word of "$ac_prog", so it can be a program name with args.
12999 set dummy $ac_prog; ac_word=$2
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13001 $as_echo_n "checking for $ac_word... " >&6; }
13002 if ${ac_cv_path_XARGS+:} false; then :
13003   $as_echo_n "(cached) " >&6
13004 else
13005   case $XARGS in
13006   [\\/]* | ?:[\\/]*)
13007   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13008   ;;
13009   *)
13010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13011 for as_dir in $PATH
13012 do
13013   IFS=$as_save_IFS
13014   test -z "$as_dir" && as_dir=.
13015     for ac_exec_ext in '' $ac_executable_extensions; do
13016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13017     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13019     break 2
13020   fi
13021 done
13022   done
13023 IFS=$as_save_IFS
13024 
13025   ;;
13026 esac
13027 fi
13028 XARGS=$ac_cv_path_XARGS
13029 if test -n "$XARGS"; then
13030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13031 $as_echo "$XARGS" >&6; }
13032 else
13033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13034 $as_echo "no" >&6; }
13035 fi
13036 
13037 
13038   test -n "$XARGS" && break
13039 done
13040 
13041     else
13042       # If it succeeded, then it was overridden by the user. We will use it
13043       # for the tool.
13044 
13045       # First remove it from the list of overridden variables, so we can test
13046       # for unknown variables in the end.
13047       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13048 
13049       # Check if we try to supply an empty value
13050       if test "x$XARGS" = x; then
13051         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13052 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13054 $as_echo_n "checking for XARGS... " >&6; }
13055         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13056 $as_echo "disabled" >&6; }
13057       else
13058         # Check if the provided tool contains a complete path.
13059         tool_specified="$XARGS"
13060         tool_basename="${tool_specified##*/}"
13061         if test "x$tool_basename" = "x$tool_specified"; then
13062           # A command without a complete path is provided, search $PATH.
13063           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13064 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13065           # Extract the first word of "$tool_basename", so it can be a program name with args.
13066 set dummy $tool_basename; ac_word=$2
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068 $as_echo_n "checking for $ac_word... " >&6; }
13069 if ${ac_cv_path_XARGS+:} false; then :
13070   $as_echo_n "(cached) " >&6
13071 else
13072   case $XARGS in
13073   [\\/]* | ?:[\\/]*)
13074   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13075   ;;
13076   *)
13077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078 for as_dir in $PATH
13079 do
13080   IFS=$as_save_IFS
13081   test -z "$as_dir" && as_dir=.
13082     for ac_exec_ext in '' $ac_executable_extensions; do
13083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086     break 2
13087   fi
13088 done
13089   done
13090 IFS=$as_save_IFS
13091 
13092   ;;
13093 esac
13094 fi
13095 XARGS=$ac_cv_path_XARGS
13096 if test -n "$XARGS"; then
13097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13098 $as_echo "$XARGS" >&6; }
13099 else
13100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101 $as_echo "no" >&6; }
13102 fi
13103 
13104 
13105           if test "x$XARGS" = x; then
13106             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13107           fi
13108         else
13109           # Otherwise we believe it is a complete path. Use it as it is.
13110           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13111 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13112           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13113 $as_echo_n "checking for XARGS... " >&6; }
13114           if test ! -x "$tool_specified"; then
13115             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13116 $as_echo "not found" >&6; }
13117             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13118           fi
13119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13120 $as_echo "$tool_specified" >&6; }
13121         fi
13122       fi
13123     fi
13124 
13125   fi
13126 
13127 
13128 
13129   if test "x$XARGS" = x; then
13130     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13131   fi
13132 
13133 
13134 
13135   # Then required tools that require some special treatment.
13136 
13137 
13138   # Publish this variable in the help.
13139 
13140 
13141   if [ -z "${AWK+x}" ]; then
13142     # The variable is not set by user, try to locate tool using the code snippet
13143     for ac_prog in gawk mawk nawk awk
13144 do
13145   # Extract the first word of "$ac_prog", so it can be a program name with args.
13146 set dummy $ac_prog; ac_word=$2
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13148 $as_echo_n "checking for $ac_word... " >&6; }
13149 if ${ac_cv_prog_AWK+:} false; then :
13150   $as_echo_n "(cached) " >&6
13151 else
13152   if test -n "$AWK"; then
13153   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13154 else
13155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156 for as_dir in $PATH
13157 do
13158   IFS=$as_save_IFS
13159   test -z "$as_dir" && as_dir=.
13160     for ac_exec_ext in '' $ac_executable_extensions; do
13161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162     ac_cv_prog_AWK="$ac_prog"
13163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164     break 2
13165   fi
13166 done
13167   done
13168 IFS=$as_save_IFS
13169 
13170 fi
13171 fi
13172 AWK=$ac_cv_prog_AWK
13173 if test -n "$AWK"; then
13174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13175 $as_echo "$AWK" >&6; }
13176 else
13177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13178 $as_echo "no" >&6; }
13179 fi
13180 
13181 
13182   test -n "$AWK" && break
13183 done
13184 
13185   else
13186     # The variable is set, but is it from the command line or the environment?
13187 
13188     # Try to remove the string !AWK! from our list.
13189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13191       # If it failed, the variable was not from the command line. Ignore it,
13192       # but warn the user (except for BASH, which is always set by the calling BASH).
13193       if test "xAWK" != xBASH; then
13194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13195 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13196       fi
13197       # Try to locate tool using the code snippet
13198       for ac_prog in gawk mawk nawk awk
13199 do
13200   # Extract the first word of "$ac_prog", so it can be a program name with args.
13201 set dummy $ac_prog; ac_word=$2
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13203 $as_echo_n "checking for $ac_word... " >&6; }
13204 if ${ac_cv_prog_AWK+:} false; then :
13205   $as_echo_n "(cached) " >&6
13206 else
13207   if test -n "$AWK"; then
13208   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13209 else
13210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13211 for as_dir in $PATH
13212 do
13213   IFS=$as_save_IFS
13214   test -z "$as_dir" && as_dir=.
13215     for ac_exec_ext in '' $ac_executable_extensions; do
13216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13217     ac_cv_prog_AWK="$ac_prog"
13218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13219     break 2
13220   fi
13221 done
13222   done
13223 IFS=$as_save_IFS
13224 
13225 fi
13226 fi
13227 AWK=$ac_cv_prog_AWK
13228 if test -n "$AWK"; then
13229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13230 $as_echo "$AWK" >&6; }
13231 else
13232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233 $as_echo "no" >&6; }
13234 fi
13235 
13236 
13237   test -n "$AWK" && break
13238 done
13239 
13240     else
13241       # If it succeeded, then it was overridden by the user. We will use it
13242       # for the tool.
13243 
13244       # First remove it from the list of overridden variables, so we can test
13245       # for unknown variables in the end.
13246       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247 
13248       # Check if we try to supply an empty value
13249       if test "x$AWK" = x; then
13250         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13251 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13253 $as_echo_n "checking for AWK... " >&6; }
13254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13255 $as_echo "disabled" >&6; }
13256       else
13257         # Check if the provided tool contains a complete path.
13258         tool_specified="$AWK"
13259         tool_basename="${tool_specified##*/}"
13260         if test "x$tool_basename" = "x$tool_specified"; then
13261           # A command without a complete path is provided, search $PATH.
13262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13263 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13264           # Extract the first word of "$tool_basename", so it can be a program name with args.
13265 set dummy $tool_basename; ac_word=$2
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13267 $as_echo_n "checking for $ac_word... " >&6; }
13268 if ${ac_cv_path_AWK+:} false; then :
13269   $as_echo_n "(cached) " >&6
13270 else
13271   case $AWK in
13272   [\\/]* | ?:[\\/]*)
13273   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13274   ;;
13275   *)
13276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277 for as_dir in $PATH
13278 do
13279   IFS=$as_save_IFS
13280   test -z "$as_dir" && as_dir=.
13281     for ac_exec_ext in '' $ac_executable_extensions; do
13282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285     break 2
13286   fi
13287 done
13288   done
13289 IFS=$as_save_IFS
13290 
13291   ;;
13292 esac
13293 fi
13294 AWK=$ac_cv_path_AWK
13295 if test -n "$AWK"; then
13296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13297 $as_echo "$AWK" >&6; }
13298 else
13299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13300 $as_echo "no" >&6; }
13301 fi
13302 
13303 
13304           if test "x$AWK" = x; then
13305             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13306           fi
13307         else
13308           # Otherwise we believe it is a complete path. Use it as it is.
13309           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13310 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13311           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13312 $as_echo_n "checking for AWK... " >&6; }
13313           if test ! -x "$tool_specified"; then
13314             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13315 $as_echo "not found" >&6; }
13316             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13317           fi
13318           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13319 $as_echo "$tool_specified" >&6; }
13320         fi
13321       fi
13322     fi
13323 
13324   fi
13325 
13326 
13327   if test "x$AWK" = x; then
13328     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13329   fi
13330 
13331 
13332 
13333 
13334   # Publish this variable in the help.
13335 
13336 
13337   if [ -z "${GREP+x}" ]; then
13338     # The variable is not set by user, try to locate tool using the code snippet
13339     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13340 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13341 if ${ac_cv_path_GREP+:} false; then :
13342   $as_echo_n "(cached) " >&6
13343 else
13344   if test -z "$GREP"; then
13345   ac_path_GREP_found=false
13346   # Loop through the user's path and test for each of PROGNAME-LIST
13347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13348 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13349 do
13350   IFS=$as_save_IFS
13351   test -z "$as_dir" && as_dir=.
13352     for ac_prog in grep ggrep; do
13353     for ac_exec_ext in '' $ac_executable_extensions; do
13354       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13355       as_fn_executable_p "$ac_path_GREP" || continue
13356 # Check for GNU ac_path_GREP and select it if it is found.
13357   # Check for GNU $ac_path_GREP
13358 case `"$ac_path_GREP" --version 2>&1` in
13359 *GNU*)
13360   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13361 *)
13362   ac_count=0
13363   $as_echo_n 0123456789 >"conftest.in"
13364   while :
13365   do
13366     cat "conftest.in" "conftest.in" >"conftest.tmp"
13367     mv "conftest.tmp" "conftest.in"
13368     cp "conftest.in" "conftest.nl"
13369     $as_echo 'GREP' >> "conftest.nl"
13370     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13371     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13372     as_fn_arith $ac_count + 1 && ac_count=$as_val
13373     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13374       # Best one so far, save it but keep looking for a better one
13375       ac_cv_path_GREP="$ac_path_GREP"
13376       ac_path_GREP_max=$ac_count
13377     fi
13378     # 10*(2^10) chars as input seems more than enough
13379     test $ac_count -gt 10 && break
13380   done
13381   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13382 esac
13383 
13384       $ac_path_GREP_found && break 3
13385     done
13386   done
13387   done
13388 IFS=$as_save_IFS
13389   if test -z "$ac_cv_path_GREP"; then
13390     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13391   fi
13392 else
13393   ac_cv_path_GREP=$GREP
13394 fi
13395 
13396 fi
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13398 $as_echo "$ac_cv_path_GREP" >&6; }
13399  GREP="$ac_cv_path_GREP"
13400 
13401 
13402   else
13403     # The variable is set, but is it from the command line or the environment?
13404 
13405     # Try to remove the string !GREP! from our list.
13406     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13407     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13408       # If it failed, the variable was not from the command line. Ignore it,
13409       # but warn the user (except for BASH, which is always set by the calling BASH).
13410       if test "xGREP" != xBASH; then
13411         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13412 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13413       fi
13414       # Try to locate tool using the code snippet
13415       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13416 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13417 if ${ac_cv_path_GREP+:} false; then :
13418   $as_echo_n "(cached) " >&6
13419 else
13420   if test -z "$GREP"; then
13421   ac_path_GREP_found=false
13422   # Loop through the user's path and test for each of PROGNAME-LIST
13423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13424 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13425 do
13426   IFS=$as_save_IFS
13427   test -z "$as_dir" && as_dir=.
13428     for ac_prog in grep ggrep; do
13429     for ac_exec_ext in '' $ac_executable_extensions; do
13430       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13431       as_fn_executable_p "$ac_path_GREP" || continue
13432 # Check for GNU ac_path_GREP and select it if it is found.
13433   # Check for GNU $ac_path_GREP
13434 case `"$ac_path_GREP" --version 2>&1` in
13435 *GNU*)
13436   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13437 *)
13438   ac_count=0
13439   $as_echo_n 0123456789 >"conftest.in"
13440   while :
13441   do
13442     cat "conftest.in" "conftest.in" >"conftest.tmp"
13443     mv "conftest.tmp" "conftest.in"
13444     cp "conftest.in" "conftest.nl"
13445     $as_echo 'GREP' >> "conftest.nl"
13446     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13447     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13448     as_fn_arith $ac_count + 1 && ac_count=$as_val
13449     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13450       # Best one so far, save it but keep looking for a better one
13451       ac_cv_path_GREP="$ac_path_GREP"
13452       ac_path_GREP_max=$ac_count
13453     fi
13454     # 10*(2^10) chars as input seems more than enough
13455     test $ac_count -gt 10 && break
13456   done
13457   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13458 esac
13459 
13460       $ac_path_GREP_found && break 3
13461     done
13462   done
13463   done
13464 IFS=$as_save_IFS
13465   if test -z "$ac_cv_path_GREP"; then
13466     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13467   fi
13468 else
13469   ac_cv_path_GREP=$GREP
13470 fi
13471 
13472 fi
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13474 $as_echo "$ac_cv_path_GREP" >&6; }
13475  GREP="$ac_cv_path_GREP"
13476 
13477 
13478     else
13479       # If it succeeded, then it was overridden by the user. We will use it
13480       # for the tool.
13481 
13482       # First remove it from the list of overridden variables, so we can test
13483       # for unknown variables in the end.
13484       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13485 
13486       # Check if we try to supply an empty value
13487       if test "x$GREP" = x; then
13488         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13489 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13491 $as_echo_n "checking for GREP... " >&6; }
13492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13493 $as_echo "disabled" >&6; }
13494       else
13495         # Check if the provided tool contains a complete path.
13496         tool_specified="$GREP"
13497         tool_basename="${tool_specified##*/}"
13498         if test "x$tool_basename" = "x$tool_specified"; then
13499           # A command without a complete path is provided, search $PATH.
13500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13501 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13502           # Extract the first word of "$tool_basename", so it can be a program name with args.
13503 set dummy $tool_basename; ac_word=$2
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13505 $as_echo_n "checking for $ac_word... " >&6; }
13506 if ${ac_cv_path_GREP+:} false; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   case $GREP in
13510   [\\/]* | ?:[\\/]*)
13511   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13512   ;;
13513   *)
13514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13515 for as_dir in $PATH
13516 do
13517   IFS=$as_save_IFS
13518   test -z "$as_dir" && as_dir=.
13519     for ac_exec_ext in '' $ac_executable_extensions; do
13520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13521     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13523     break 2
13524   fi
13525 done
13526   done
13527 IFS=$as_save_IFS
13528 
13529   ;;
13530 esac
13531 fi
13532 GREP=$ac_cv_path_GREP
13533 if test -n "$GREP"; then
13534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13535 $as_echo "$GREP" >&6; }
13536 else
13537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13538 $as_echo "no" >&6; }
13539 fi
13540 
13541 
13542           if test "x$GREP" = x; then
13543             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13544           fi
13545         else
13546           # Otherwise we believe it is a complete path. Use it as it is.
13547           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13548 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13549           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13550 $as_echo_n "checking for GREP... " >&6; }
13551           if test ! -x "$tool_specified"; then
13552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13553 $as_echo "not found" >&6; }
13554             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13555           fi
13556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13557 $as_echo "$tool_specified" >&6; }
13558         fi
13559       fi
13560     fi
13561 
13562   fi
13563 
13564 
13565   if test "x$GREP" = x; then
13566     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13567   fi
13568 
13569 
13570 
13571 
13572   # Publish this variable in the help.
13573 
13574 
13575   if [ -z "${EGREP+x}" ]; then
13576     # The variable is not set by user, try to locate tool using the code snippet
13577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13578 $as_echo_n "checking for egrep... " >&6; }
13579 if ${ac_cv_path_EGREP+:} false; then :
13580   $as_echo_n "(cached) " >&6
13581 else
13582   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13583    then ac_cv_path_EGREP="$GREP -E"
13584    else
13585      if test -z "$EGREP"; then
13586   ac_path_EGREP_found=false
13587   # Loop through the user's path and test for each of PROGNAME-LIST
13588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13589 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13590 do
13591   IFS=$as_save_IFS
13592   test -z "$as_dir" && as_dir=.
13593     for ac_prog in egrep; do
13594     for ac_exec_ext in '' $ac_executable_extensions; do
13595       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13596       as_fn_executable_p "$ac_path_EGREP" || continue
13597 # Check for GNU ac_path_EGREP and select it if it is found.
13598   # Check for GNU $ac_path_EGREP
13599 case `"$ac_path_EGREP" --version 2>&1` in
13600 *GNU*)
13601   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13602 *)
13603   ac_count=0
13604   $as_echo_n 0123456789 >"conftest.in"
13605   while :
13606   do
13607     cat "conftest.in" "conftest.in" >"conftest.tmp"
13608     mv "conftest.tmp" "conftest.in"
13609     cp "conftest.in" "conftest.nl"
13610     $as_echo 'EGREP' >> "conftest.nl"
13611     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13612     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13613     as_fn_arith $ac_count + 1 && ac_count=$as_val
13614     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13615       # Best one so far, save it but keep looking for a better one
13616       ac_cv_path_EGREP="$ac_path_EGREP"
13617       ac_path_EGREP_max=$ac_count
13618     fi
13619     # 10*(2^10) chars as input seems more than enough
13620     test $ac_count -gt 10 && break
13621   done
13622   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13623 esac
13624 
13625       $ac_path_EGREP_found && break 3
13626     done
13627   done
13628   done
13629 IFS=$as_save_IFS
13630   if test -z "$ac_cv_path_EGREP"; then
13631     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13632   fi
13633 else
13634   ac_cv_path_EGREP=$EGREP
13635 fi
13636 
13637    fi
13638 fi
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13640 $as_echo "$ac_cv_path_EGREP" >&6; }
13641  EGREP="$ac_cv_path_EGREP"
13642 
13643 
13644   else
13645     # The variable is set, but is it from the command line or the environment?
13646 
13647     # Try to remove the string !EGREP! from our list.
13648     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13649     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13650       # If it failed, the variable was not from the command line. Ignore it,
13651       # but warn the user (except for BASH, which is always set by the calling BASH).
13652       if test "xEGREP" != xBASH; then
13653         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13654 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13655       fi
13656       # Try to locate tool using the code snippet
13657       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13658 $as_echo_n "checking for egrep... " >&6; }
13659 if ${ac_cv_path_EGREP+:} false; then :
13660   $as_echo_n "(cached) " >&6
13661 else
13662   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13663    then ac_cv_path_EGREP="$GREP -E"
13664    else
13665      if test -z "$EGREP"; then
13666   ac_path_EGREP_found=false
13667   # Loop through the user's path and test for each of PROGNAME-LIST
13668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13669 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13670 do
13671   IFS=$as_save_IFS
13672   test -z "$as_dir" && as_dir=.
13673     for ac_prog in egrep; do
13674     for ac_exec_ext in '' $ac_executable_extensions; do
13675       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13676       as_fn_executable_p "$ac_path_EGREP" || continue
13677 # Check for GNU ac_path_EGREP and select it if it is found.
13678   # Check for GNU $ac_path_EGREP
13679 case `"$ac_path_EGREP" --version 2>&1` in
13680 *GNU*)
13681   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13682 *)
13683   ac_count=0
13684   $as_echo_n 0123456789 >"conftest.in"
13685   while :
13686   do
13687     cat "conftest.in" "conftest.in" >"conftest.tmp"
13688     mv "conftest.tmp" "conftest.in"
13689     cp "conftest.in" "conftest.nl"
13690     $as_echo 'EGREP' >> "conftest.nl"
13691     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13692     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13693     as_fn_arith $ac_count + 1 && ac_count=$as_val
13694     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13695       # Best one so far, save it but keep looking for a better one
13696       ac_cv_path_EGREP="$ac_path_EGREP"
13697       ac_path_EGREP_max=$ac_count
13698     fi
13699     # 10*(2^10) chars as input seems more than enough
13700     test $ac_count -gt 10 && break
13701   done
13702   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13703 esac
13704 
13705       $ac_path_EGREP_found && break 3
13706     done
13707   done
13708   done
13709 IFS=$as_save_IFS
13710   if test -z "$ac_cv_path_EGREP"; then
13711     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13712   fi
13713 else
13714   ac_cv_path_EGREP=$EGREP
13715 fi
13716 
13717    fi
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13720 $as_echo "$ac_cv_path_EGREP" >&6; }
13721  EGREP="$ac_cv_path_EGREP"
13722 
13723 
13724     else
13725       # If it succeeded, then it was overridden by the user. We will use it
13726       # for the tool.
13727 
13728       # First remove it from the list of overridden variables, so we can test
13729       # for unknown variables in the end.
13730       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13731 
13732       # Check if we try to supply an empty value
13733       if test "x$EGREP" = x; then
13734         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13735 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13737 $as_echo_n "checking for EGREP... " >&6; }
13738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13739 $as_echo "disabled" >&6; }
13740       else
13741         # Check if the provided tool contains a complete path.
13742         tool_specified="$EGREP"
13743         tool_basename="${tool_specified##*/}"
13744         if test "x$tool_basename" = "x$tool_specified"; then
13745           # A command without a complete path is provided, search $PATH.
13746           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13747 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13748           # Extract the first word of "$tool_basename", so it can be a program name with args.
13749 set dummy $tool_basename; ac_word=$2
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13751 $as_echo_n "checking for $ac_word... " >&6; }
13752 if ${ac_cv_path_EGREP+:} false; then :
13753   $as_echo_n "(cached) " >&6
13754 else
13755   case $EGREP in
13756   [\\/]* | ?:[\\/]*)
13757   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13758   ;;
13759   *)
13760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13761 for as_dir in $PATH
13762 do
13763   IFS=$as_save_IFS
13764   test -z "$as_dir" && as_dir=.
13765     for ac_exec_ext in '' $ac_executable_extensions; do
13766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13767     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13769     break 2
13770   fi
13771 done
13772   done
13773 IFS=$as_save_IFS
13774 
13775   ;;
13776 esac
13777 fi
13778 EGREP=$ac_cv_path_EGREP
13779 if test -n "$EGREP"; then
13780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13781 $as_echo "$EGREP" >&6; }
13782 else
13783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13784 $as_echo "no" >&6; }
13785 fi
13786 
13787 
13788           if test "x$EGREP" = x; then
13789             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13790           fi
13791         else
13792           # Otherwise we believe it is a complete path. Use it as it is.
13793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13794 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13795           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13796 $as_echo_n "checking for EGREP... " >&6; }
13797           if test ! -x "$tool_specified"; then
13798             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13799 $as_echo "not found" >&6; }
13800             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13801           fi
13802           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13803 $as_echo "$tool_specified" >&6; }
13804         fi
13805       fi
13806     fi
13807 
13808   fi
13809 
13810 
13811   if test "x$EGREP" = x; then
13812     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13813   fi
13814 
13815 
13816 
13817 
13818   # Publish this variable in the help.
13819 
13820 
13821   if [ -z "${FGREP+x}" ]; then
13822     # The variable is not set by user, try to locate tool using the code snippet
13823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13824 $as_echo_n "checking for fgrep... " >&6; }
13825 if ${ac_cv_path_FGREP+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13829    then ac_cv_path_FGREP="$GREP -F"
13830    else
13831      if test -z "$FGREP"; then
13832   ac_path_FGREP_found=false
13833   # Loop through the user's path and test for each of PROGNAME-LIST
13834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13835 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13836 do
13837   IFS=$as_save_IFS
13838   test -z "$as_dir" && as_dir=.
13839     for ac_prog in fgrep; do
13840     for ac_exec_ext in '' $ac_executable_extensions; do
13841       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13842       as_fn_executable_p "$ac_path_FGREP" || continue
13843 # Check for GNU ac_path_FGREP and select it if it is found.
13844   # Check for GNU $ac_path_FGREP
13845 case `"$ac_path_FGREP" --version 2>&1` in
13846 *GNU*)
13847   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13848 *)
13849   ac_count=0
13850   $as_echo_n 0123456789 >"conftest.in"
13851   while :
13852   do
13853     cat "conftest.in" "conftest.in" >"conftest.tmp"
13854     mv "conftest.tmp" "conftest.in"
13855     cp "conftest.in" "conftest.nl"
13856     $as_echo 'FGREP' >> "conftest.nl"
13857     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13858     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13859     as_fn_arith $ac_count + 1 && ac_count=$as_val
13860     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13861       # Best one so far, save it but keep looking for a better one
13862       ac_cv_path_FGREP="$ac_path_FGREP"
13863       ac_path_FGREP_max=$ac_count
13864     fi
13865     # 10*(2^10) chars as input seems more than enough
13866     test $ac_count -gt 10 && break
13867   done
13868   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13869 esac
13870 
13871       $ac_path_FGREP_found && break 3
13872     done
13873   done
13874   done
13875 IFS=$as_save_IFS
13876   if test -z "$ac_cv_path_FGREP"; then
13877     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13878   fi
13879 else
13880   ac_cv_path_FGREP=$FGREP
13881 fi
13882 
13883    fi
13884 fi
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13886 $as_echo "$ac_cv_path_FGREP" >&6; }
13887  FGREP="$ac_cv_path_FGREP"
13888 
13889 
13890   else
13891     # The variable is set, but is it from the command line or the environment?
13892 
13893     # Try to remove the string !FGREP! from our list.
13894     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13895     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13896       # If it failed, the variable was not from the command line. Ignore it,
13897       # but warn the user (except for BASH, which is always set by the calling BASH).
13898       if test "xFGREP" != xBASH; then
13899         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13900 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13901       fi
13902       # Try to locate tool using the code snippet
13903       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13904 $as_echo_n "checking for fgrep... " >&6; }
13905 if ${ac_cv_path_FGREP+:} false; then :
13906   $as_echo_n "(cached) " >&6
13907 else
13908   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13909    then ac_cv_path_FGREP="$GREP -F"
13910    else
13911      if test -z "$FGREP"; then
13912   ac_path_FGREP_found=false
13913   # Loop through the user's path and test for each of PROGNAME-LIST
13914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13915 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13916 do
13917   IFS=$as_save_IFS
13918   test -z "$as_dir" && as_dir=.
13919     for ac_prog in fgrep; do
13920     for ac_exec_ext in '' $ac_executable_extensions; do
13921       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13922       as_fn_executable_p "$ac_path_FGREP" || continue
13923 # Check for GNU ac_path_FGREP and select it if it is found.
13924   # Check for GNU $ac_path_FGREP
13925 case `"$ac_path_FGREP" --version 2>&1` in
13926 *GNU*)
13927   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13928 *)
13929   ac_count=0
13930   $as_echo_n 0123456789 >"conftest.in"
13931   while :
13932   do
13933     cat "conftest.in" "conftest.in" >"conftest.tmp"
13934     mv "conftest.tmp" "conftest.in"
13935     cp "conftest.in" "conftest.nl"
13936     $as_echo 'FGREP' >> "conftest.nl"
13937     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13938     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13939     as_fn_arith $ac_count + 1 && ac_count=$as_val
13940     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13941       # Best one so far, save it but keep looking for a better one
13942       ac_cv_path_FGREP="$ac_path_FGREP"
13943       ac_path_FGREP_max=$ac_count
13944     fi
13945     # 10*(2^10) chars as input seems more than enough
13946     test $ac_count -gt 10 && break
13947   done
13948   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13949 esac
13950 
13951       $ac_path_FGREP_found && break 3
13952     done
13953   done
13954   done
13955 IFS=$as_save_IFS
13956   if test -z "$ac_cv_path_FGREP"; then
13957     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13958   fi
13959 else
13960   ac_cv_path_FGREP=$FGREP
13961 fi
13962 
13963    fi
13964 fi
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13966 $as_echo "$ac_cv_path_FGREP" >&6; }
13967  FGREP="$ac_cv_path_FGREP"
13968 
13969 
13970     else
13971       # If it succeeded, then it was overridden by the user. We will use it
13972       # for the tool.
13973 
13974       # First remove it from the list of overridden variables, so we can test
13975       # for unknown variables in the end.
13976       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13977 
13978       # Check if we try to supply an empty value
13979       if test "x$FGREP" = x; then
13980         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13981 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13983 $as_echo_n "checking for FGREP... " >&6; }
13984         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13985 $as_echo "disabled" >&6; }
13986       else
13987         # Check if the provided tool contains a complete path.
13988         tool_specified="$FGREP"
13989         tool_basename="${tool_specified##*/}"
13990         if test "x$tool_basename" = "x$tool_specified"; then
13991           # A command without a complete path is provided, search $PATH.
13992           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13993 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13994           # Extract the first word of "$tool_basename", so it can be a program name with args.
13995 set dummy $tool_basename; ac_word=$2
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13997 $as_echo_n "checking for $ac_word... " >&6; }
13998 if ${ac_cv_path_FGREP+:} false; then :
13999   $as_echo_n "(cached) " >&6
14000 else
14001   case $FGREP in
14002   [\\/]* | ?:[\\/]*)
14003   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14004   ;;
14005   *)
14006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14007 for as_dir in $PATH
14008 do
14009   IFS=$as_save_IFS
14010   test -z "$as_dir" && as_dir=.
14011     for ac_exec_ext in '' $ac_executable_extensions; do
14012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14013     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14015     break 2
14016   fi
14017 done
14018   done
14019 IFS=$as_save_IFS
14020 
14021   ;;
14022 esac
14023 fi
14024 FGREP=$ac_cv_path_FGREP
14025 if test -n "$FGREP"; then
14026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14027 $as_echo "$FGREP" >&6; }
14028 else
14029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030 $as_echo "no" >&6; }
14031 fi
14032 
14033 
14034           if test "x$FGREP" = x; then
14035             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14036           fi
14037         else
14038           # Otherwise we believe it is a complete path. Use it as it is.
14039           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14040 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14041           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14042 $as_echo_n "checking for FGREP... " >&6; }
14043           if test ! -x "$tool_specified"; then
14044             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14045 $as_echo "not found" >&6; }
14046             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14047           fi
14048           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14049 $as_echo "$tool_specified" >&6; }
14050         fi
14051       fi
14052     fi
14053 
14054   fi
14055 
14056 
14057   if test "x$FGREP" = x; then
14058     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14059   fi
14060 
14061 
14062 
14063 
14064   # Publish this variable in the help.
14065 
14066 
14067   if [ -z "${SED+x}" ]; then
14068     # The variable is not set by user, try to locate tool using the code snippet
14069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14070 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14071 if ${ac_cv_path_SED+:} false; then :
14072   $as_echo_n "(cached) " >&6
14073 else
14074             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14075      for ac_i in 1 2 3 4 5 6 7; do
14076        ac_script="$ac_script$as_nl$ac_script"
14077      done
14078      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14079      { ac_script=; unset ac_script;}
14080      if test -z "$SED"; then
14081   ac_path_SED_found=false
14082   # Loop through the user's path and test for each of PROGNAME-LIST
14083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14084 for as_dir in $PATH
14085 do
14086   IFS=$as_save_IFS
14087   test -z "$as_dir" && as_dir=.
14088     for ac_prog in sed gsed; do
14089     for ac_exec_ext in '' $ac_executable_extensions; do
14090       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14091       as_fn_executable_p "$ac_path_SED" || continue
14092 # Check for GNU ac_path_SED and select it if it is found.
14093   # Check for GNU $ac_path_SED
14094 case `"$ac_path_SED" --version 2>&1` in
14095 *GNU*)
14096   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14097 *)
14098   ac_count=0
14099   $as_echo_n 0123456789 >"conftest.in"
14100   while :
14101   do
14102     cat "conftest.in" "conftest.in" >"conftest.tmp"
14103     mv "conftest.tmp" "conftest.in"
14104     cp "conftest.in" "conftest.nl"
14105     $as_echo '' >> "conftest.nl"
14106     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14107     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14108     as_fn_arith $ac_count + 1 && ac_count=$as_val
14109     if test $ac_count -gt ${ac_path_SED_max-0}; then
14110       # Best one so far, save it but keep looking for a better one
14111       ac_cv_path_SED="$ac_path_SED"
14112       ac_path_SED_max=$ac_count
14113     fi
14114     # 10*(2^10) chars as input seems more than enough
14115     test $ac_count -gt 10 && break
14116   done
14117   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14118 esac
14119 
14120       $ac_path_SED_found && break 3
14121     done
14122   done
14123   done
14124 IFS=$as_save_IFS
14125   if test -z "$ac_cv_path_SED"; then
14126     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14127   fi
14128 else
14129   ac_cv_path_SED=$SED
14130 fi
14131 
14132 fi
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14134 $as_echo "$ac_cv_path_SED" >&6; }
14135  SED="$ac_cv_path_SED"
14136   rm -f conftest.sed
14137 
14138   else
14139     # The variable is set, but is it from the command line or the environment?
14140 
14141     # Try to remove the string !SED! from our list.
14142     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14143     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14144       # If it failed, the variable was not from the command line. Ignore it,
14145       # but warn the user (except for BASH, which is always set by the calling BASH).
14146       if test "xSED" != xBASH; then
14147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14148 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14149       fi
14150       # Try to locate tool using the code snippet
14151       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14152 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14153 if ${ac_cv_path_SED+:} false; then :
14154   $as_echo_n "(cached) " >&6
14155 else
14156             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14157      for ac_i in 1 2 3 4 5 6 7; do
14158        ac_script="$ac_script$as_nl$ac_script"
14159      done
14160      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14161      { ac_script=; unset ac_script;}
14162      if test -z "$SED"; then
14163   ac_path_SED_found=false
14164   # Loop through the user's path and test for each of PROGNAME-LIST
14165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14166 for as_dir in $PATH
14167 do
14168   IFS=$as_save_IFS
14169   test -z "$as_dir" && as_dir=.
14170     for ac_prog in sed gsed; do
14171     for ac_exec_ext in '' $ac_executable_extensions; do
14172       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14173       as_fn_executable_p "$ac_path_SED" || continue
14174 # Check for GNU ac_path_SED and select it if it is found.
14175   # Check for GNU $ac_path_SED
14176 case `"$ac_path_SED" --version 2>&1` in
14177 *GNU*)
14178   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14179 *)
14180   ac_count=0
14181   $as_echo_n 0123456789 >"conftest.in"
14182   while :
14183   do
14184     cat "conftest.in" "conftest.in" >"conftest.tmp"
14185     mv "conftest.tmp" "conftest.in"
14186     cp "conftest.in" "conftest.nl"
14187     $as_echo '' >> "conftest.nl"
14188     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14189     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14190     as_fn_arith $ac_count + 1 && ac_count=$as_val
14191     if test $ac_count -gt ${ac_path_SED_max-0}; then
14192       # Best one so far, save it but keep looking for a better one
14193       ac_cv_path_SED="$ac_path_SED"
14194       ac_path_SED_max=$ac_count
14195     fi
14196     # 10*(2^10) chars as input seems more than enough
14197     test $ac_count -gt 10 && break
14198   done
14199   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14200 esac
14201 
14202       $ac_path_SED_found && break 3
14203     done
14204   done
14205   done
14206 IFS=$as_save_IFS
14207   if test -z "$ac_cv_path_SED"; then
14208     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14209   fi
14210 else
14211   ac_cv_path_SED=$SED
14212 fi
14213 
14214 fi
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14216 $as_echo "$ac_cv_path_SED" >&6; }
14217  SED="$ac_cv_path_SED"
14218   rm -f conftest.sed
14219 
14220     else
14221       # If it succeeded, then it was overridden by the user. We will use it
14222       # for the tool.
14223 
14224       # First remove it from the list of overridden variables, so we can test
14225       # for unknown variables in the end.
14226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14227 
14228       # Check if we try to supply an empty value
14229       if test "x$SED" = x; then
14230         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14231 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14233 $as_echo_n "checking for SED... " >&6; }
14234         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14235 $as_echo "disabled" >&6; }
14236       else
14237         # Check if the provided tool contains a complete path.
14238         tool_specified="$SED"
14239         tool_basename="${tool_specified##*/}"
14240         if test "x$tool_basename" = "x$tool_specified"; then
14241           # A command without a complete path is provided, search $PATH.
14242           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14243 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14244           # Extract the first word of "$tool_basename", so it can be a program name with args.
14245 set dummy $tool_basename; ac_word=$2
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14247 $as_echo_n "checking for $ac_word... " >&6; }
14248 if ${ac_cv_path_SED+:} false; then :
14249   $as_echo_n "(cached) " >&6
14250 else
14251   case $SED in
14252   [\\/]* | ?:[\\/]*)
14253   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14254   ;;
14255   *)
14256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14257 for as_dir in $PATH
14258 do
14259   IFS=$as_save_IFS
14260   test -z "$as_dir" && as_dir=.
14261     for ac_exec_ext in '' $ac_executable_extensions; do
14262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14263     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14265     break 2
14266   fi
14267 done
14268   done
14269 IFS=$as_save_IFS
14270 
14271   ;;
14272 esac
14273 fi
14274 SED=$ac_cv_path_SED
14275 if test -n "$SED"; then
14276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14277 $as_echo "$SED" >&6; }
14278 else
14279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14280 $as_echo "no" >&6; }
14281 fi
14282 
14283 
14284           if test "x$SED" = x; then
14285             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14286           fi
14287         else
14288           # Otherwise we believe it is a complete path. Use it as it is.
14289           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14290 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14291           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14292 $as_echo_n "checking for SED... " >&6; }
14293           if test ! -x "$tool_specified"; then
14294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14295 $as_echo "not found" >&6; }
14296             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14297           fi
14298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14299 $as_echo "$tool_specified" >&6; }
14300         fi
14301       fi
14302     fi
14303 
14304   fi
14305 
14306 
14307   if test "x$SED" = x; then
14308     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14309   fi
14310 
14311 
14312 
14313   # Always force rm.
14314   RM="$RM -f"
14315 
14316   # pwd behaves differently on various platforms and some don't support the -L flag.
14317   # Always use the bash builtin pwd to get uniform behavior.
14318   THEPWDCMD=pwd
14319 
14320   # These are not required on all platforms
14321 
14322 
14323   # Publish this variable in the help.
14324 
14325 
14326   if [ -z "${CYGPATH+x}" ]; then
14327     # The variable is not set by user, try to locate tool using the code snippet
14328     for ac_prog in cygpath
14329 do
14330   # Extract the first word of "$ac_prog", so it can be a program name with args.
14331 set dummy $ac_prog; ac_word=$2
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14333 $as_echo_n "checking for $ac_word... " >&6; }
14334 if ${ac_cv_path_CYGPATH+:} false; then :
14335   $as_echo_n "(cached) " >&6
14336 else
14337   case $CYGPATH in
14338   [\\/]* | ?:[\\/]*)
14339   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14340   ;;
14341   *)
14342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14343 for as_dir in $PATH
14344 do
14345   IFS=$as_save_IFS
14346   test -z "$as_dir" && as_dir=.
14347     for ac_exec_ext in '' $ac_executable_extensions; do
14348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14349     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14351     break 2
14352   fi
14353 done
14354   done
14355 IFS=$as_save_IFS
14356 
14357   ;;
14358 esac
14359 fi
14360 CYGPATH=$ac_cv_path_CYGPATH
14361 if test -n "$CYGPATH"; then
14362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14363 $as_echo "$CYGPATH" >&6; }
14364 else
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366 $as_echo "no" >&6; }
14367 fi
14368 
14369 
14370   test -n "$CYGPATH" && break
14371 done
14372 
14373   else
14374     # The variable is set, but is it from the command line or the environment?
14375 
14376     # Try to remove the string !CYGPATH! from our list.
14377     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14378     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14379       # If it failed, the variable was not from the command line. Ignore it,
14380       # but warn the user (except for BASH, which is always set by the calling BASH).
14381       if test "xCYGPATH" != xBASH; then
14382         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14383 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14384       fi
14385       # Try to locate tool using the code snippet
14386       for ac_prog in cygpath
14387 do
14388   # Extract the first word of "$ac_prog", so it can be a program name with args.
14389 set dummy $ac_prog; ac_word=$2
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14391 $as_echo_n "checking for $ac_word... " >&6; }
14392 if ${ac_cv_path_CYGPATH+:} false; then :
14393   $as_echo_n "(cached) " >&6
14394 else
14395   case $CYGPATH in
14396   [\\/]* | ?:[\\/]*)
14397   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14398   ;;
14399   *)
14400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14401 for as_dir in $PATH
14402 do
14403   IFS=$as_save_IFS
14404   test -z "$as_dir" && as_dir=.
14405     for ac_exec_ext in '' $ac_executable_extensions; do
14406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14407     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14409     break 2
14410   fi
14411 done
14412   done
14413 IFS=$as_save_IFS
14414 
14415   ;;
14416 esac
14417 fi
14418 CYGPATH=$ac_cv_path_CYGPATH
14419 if test -n "$CYGPATH"; then
14420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14421 $as_echo "$CYGPATH" >&6; }
14422 else
14423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14424 $as_echo "no" >&6; }
14425 fi
14426 
14427 
14428   test -n "$CYGPATH" && break
14429 done
14430 
14431     else
14432       # If it succeeded, then it was overridden by the user. We will use it
14433       # for the tool.
14434 
14435       # First remove it from the list of overridden variables, so we can test
14436       # for unknown variables in the end.
14437       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14438 
14439       # Check if we try to supply an empty value
14440       if test "x$CYGPATH" = x; then
14441         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14442 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14444 $as_echo_n "checking for CYGPATH... " >&6; }
14445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14446 $as_echo "disabled" >&6; }
14447       else
14448         # Check if the provided tool contains a complete path.
14449         tool_specified="$CYGPATH"
14450         tool_basename="${tool_specified##*/}"
14451         if test "x$tool_basename" = "x$tool_specified"; then
14452           # A command without a complete path is provided, search $PATH.
14453           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14454 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14455           # Extract the first word of "$tool_basename", so it can be a program name with args.
14456 set dummy $tool_basename; ac_word=$2
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14458 $as_echo_n "checking for $ac_word... " >&6; }
14459 if ${ac_cv_path_CYGPATH+:} false; then :
14460   $as_echo_n "(cached) " >&6
14461 else
14462   case $CYGPATH in
14463   [\\/]* | ?:[\\/]*)
14464   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14465   ;;
14466   *)
14467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14468 for as_dir in $PATH
14469 do
14470   IFS=$as_save_IFS
14471   test -z "$as_dir" && as_dir=.
14472     for ac_exec_ext in '' $ac_executable_extensions; do
14473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14474     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14476     break 2
14477   fi
14478 done
14479   done
14480 IFS=$as_save_IFS
14481 
14482   ;;
14483 esac
14484 fi
14485 CYGPATH=$ac_cv_path_CYGPATH
14486 if test -n "$CYGPATH"; then
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14488 $as_echo "$CYGPATH" >&6; }
14489 else
14490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14491 $as_echo "no" >&6; }
14492 fi
14493 
14494 
14495           if test "x$CYGPATH" = x; then
14496             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14497           fi
14498         else
14499           # Otherwise we believe it is a complete path. Use it as it is.
14500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14501 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14502           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14503 $as_echo_n "checking for CYGPATH... " >&6; }
14504           if test ! -x "$tool_specified"; then
14505             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14506 $as_echo "not found" >&6; }
14507             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14508           fi
14509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14510 $as_echo "$tool_specified" >&6; }
14511         fi
14512       fi
14513     fi
14514 
14515   fi
14516 
14517 
14518 
14519 
14520   # Publish this variable in the help.
14521 
14522 
14523   if [ -z "${READLINK+x}" ]; then
14524     # The variable is not set by user, try to locate tool using the code snippet
14525     for ac_prog in greadlink readlink
14526 do
14527   # Extract the first word of "$ac_prog", so it can be a program name with args.
14528 set dummy $ac_prog; ac_word=$2
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14530 $as_echo_n "checking for $ac_word... " >&6; }
14531 if ${ac_cv_path_READLINK+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   case $READLINK in
14535   [\\/]* | ?:[\\/]*)
14536   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14537   ;;
14538   *)
14539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14540 for as_dir in $PATH
14541 do
14542   IFS=$as_save_IFS
14543   test -z "$as_dir" && as_dir=.
14544     for ac_exec_ext in '' $ac_executable_extensions; do
14545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14546     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14548     break 2
14549   fi
14550 done
14551   done
14552 IFS=$as_save_IFS
14553 
14554   ;;
14555 esac
14556 fi
14557 READLINK=$ac_cv_path_READLINK
14558 if test -n "$READLINK"; then
14559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14560 $as_echo "$READLINK" >&6; }
14561 else
14562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563 $as_echo "no" >&6; }
14564 fi
14565 
14566 
14567   test -n "$READLINK" && break
14568 done
14569 
14570   else
14571     # The variable is set, but is it from the command line or the environment?
14572 
14573     # Try to remove the string !READLINK! from our list.
14574     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14575     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14576       # If it failed, the variable was not from the command line. Ignore it,
14577       # but warn the user (except for BASH, which is always set by the calling BASH).
14578       if test "xREADLINK" != xBASH; then
14579         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14580 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14581       fi
14582       # Try to locate tool using the code snippet
14583       for ac_prog in greadlink readlink
14584 do
14585   # Extract the first word of "$ac_prog", so it can be a program name with args.
14586 set dummy $ac_prog; ac_word=$2
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14588 $as_echo_n "checking for $ac_word... " >&6; }
14589 if ${ac_cv_path_READLINK+:} false; then :
14590   $as_echo_n "(cached) " >&6
14591 else
14592   case $READLINK in
14593   [\\/]* | ?:[\\/]*)
14594   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14595   ;;
14596   *)
14597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14598 for as_dir in $PATH
14599 do
14600   IFS=$as_save_IFS
14601   test -z "$as_dir" && as_dir=.
14602     for ac_exec_ext in '' $ac_executable_extensions; do
14603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14604     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14606     break 2
14607   fi
14608 done
14609   done
14610 IFS=$as_save_IFS
14611 
14612   ;;
14613 esac
14614 fi
14615 READLINK=$ac_cv_path_READLINK
14616 if test -n "$READLINK"; then
14617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14618 $as_echo "$READLINK" >&6; }
14619 else
14620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14621 $as_echo "no" >&6; }
14622 fi
14623 
14624 
14625   test -n "$READLINK" && break
14626 done
14627 
14628     else
14629       # If it succeeded, then it was overridden by the user. We will use it
14630       # for the tool.
14631 
14632       # First remove it from the list of overridden variables, so we can test
14633       # for unknown variables in the end.
14634       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14635 
14636       # Check if we try to supply an empty value
14637       if test "x$READLINK" = x; then
14638         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14639 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14641 $as_echo_n "checking for READLINK... " >&6; }
14642         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14643 $as_echo "disabled" >&6; }
14644       else
14645         # Check if the provided tool contains a complete path.
14646         tool_specified="$READLINK"
14647         tool_basename="${tool_specified##*/}"
14648         if test "x$tool_basename" = "x$tool_specified"; then
14649           # A command without a complete path is provided, search $PATH.
14650           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14651 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14652           # Extract the first word of "$tool_basename", so it can be a program name with args.
14653 set dummy $tool_basename; ac_word=$2
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14655 $as_echo_n "checking for $ac_word... " >&6; }
14656 if ${ac_cv_path_READLINK+:} false; then :
14657   $as_echo_n "(cached) " >&6
14658 else
14659   case $READLINK in
14660   [\\/]* | ?:[\\/]*)
14661   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14662   ;;
14663   *)
14664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14665 for as_dir in $PATH
14666 do
14667   IFS=$as_save_IFS
14668   test -z "$as_dir" && as_dir=.
14669     for ac_exec_ext in '' $ac_executable_extensions; do
14670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14671     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14673     break 2
14674   fi
14675 done
14676   done
14677 IFS=$as_save_IFS
14678 
14679   ;;
14680 esac
14681 fi
14682 READLINK=$ac_cv_path_READLINK
14683 if test -n "$READLINK"; then
14684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14685 $as_echo "$READLINK" >&6; }
14686 else
14687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14688 $as_echo "no" >&6; }
14689 fi
14690 
14691 
14692           if test "x$READLINK" = x; then
14693             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14694           fi
14695         else
14696           # Otherwise we believe it is a complete path. Use it as it is.
14697           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14698 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14699           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14700 $as_echo_n "checking for READLINK... " >&6; }
14701           if test ! -x "$tool_specified"; then
14702             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14703 $as_echo "not found" >&6; }
14704             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14705           fi
14706           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14707 $as_echo "$tool_specified" >&6; }
14708         fi
14709       fi
14710     fi
14711 
14712   fi
14713 
14714 
14715 
14716 
14717   # Publish this variable in the help.
14718 
14719 
14720   if [ -z "${DF+x}" ]; then
14721     # The variable is not set by user, try to locate tool using the code snippet
14722     for ac_prog in df
14723 do
14724   # Extract the first word of "$ac_prog", so it can be a program name with args.
14725 set dummy $ac_prog; ac_word=$2
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14727 $as_echo_n "checking for $ac_word... " >&6; }
14728 if ${ac_cv_path_DF+:} false; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731   case $DF in
14732   [\\/]* | ?:[\\/]*)
14733   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14734   ;;
14735   *)
14736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14737 for as_dir in $PATH
14738 do
14739   IFS=$as_save_IFS
14740   test -z "$as_dir" && as_dir=.
14741     for ac_exec_ext in '' $ac_executable_extensions; do
14742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14743     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14745     break 2
14746   fi
14747 done
14748   done
14749 IFS=$as_save_IFS
14750 
14751   ;;
14752 esac
14753 fi
14754 DF=$ac_cv_path_DF
14755 if test -n "$DF"; then
14756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14757 $as_echo "$DF" >&6; }
14758 else
14759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760 $as_echo "no" >&6; }
14761 fi
14762 
14763 
14764   test -n "$DF" && break
14765 done
14766 
14767   else
14768     # The variable is set, but is it from the command line or the environment?
14769 
14770     # Try to remove the string !DF! from our list.
14771     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14772     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14773       # If it failed, the variable was not from the command line. Ignore it,
14774       # but warn the user (except for BASH, which is always set by the calling BASH).
14775       if test "xDF" != xBASH; then
14776         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14777 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14778       fi
14779       # Try to locate tool using the code snippet
14780       for ac_prog in df
14781 do
14782   # Extract the first word of "$ac_prog", so it can be a program name with args.
14783 set dummy $ac_prog; ac_word=$2
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14785 $as_echo_n "checking for $ac_word... " >&6; }
14786 if ${ac_cv_path_DF+:} false; then :
14787   $as_echo_n "(cached) " >&6
14788 else
14789   case $DF in
14790   [\\/]* | ?:[\\/]*)
14791   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14792   ;;
14793   *)
14794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14795 for as_dir in $PATH
14796 do
14797   IFS=$as_save_IFS
14798   test -z "$as_dir" && as_dir=.
14799     for ac_exec_ext in '' $ac_executable_extensions; do
14800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14801     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14803     break 2
14804   fi
14805 done
14806   done
14807 IFS=$as_save_IFS
14808 
14809   ;;
14810 esac
14811 fi
14812 DF=$ac_cv_path_DF
14813 if test -n "$DF"; then
14814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14815 $as_echo "$DF" >&6; }
14816 else
14817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14818 $as_echo "no" >&6; }
14819 fi
14820 
14821 
14822   test -n "$DF" && break
14823 done
14824 
14825     else
14826       # If it succeeded, then it was overridden by the user. We will use it
14827       # for the tool.
14828 
14829       # First remove it from the list of overridden variables, so we can test
14830       # for unknown variables in the end.
14831       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14832 
14833       # Check if we try to supply an empty value
14834       if test "x$DF" = x; then
14835         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14836 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14837         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14838 $as_echo_n "checking for DF... " >&6; }
14839         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14840 $as_echo "disabled" >&6; }
14841       else
14842         # Check if the provided tool contains a complete path.
14843         tool_specified="$DF"
14844         tool_basename="${tool_specified##*/}"
14845         if test "x$tool_basename" = "x$tool_specified"; then
14846           # A command without a complete path is provided, search $PATH.
14847           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14848 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14849           # Extract the first word of "$tool_basename", so it can be a program name with args.
14850 set dummy $tool_basename; ac_word=$2
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14852 $as_echo_n "checking for $ac_word... " >&6; }
14853 if ${ac_cv_path_DF+:} false; then :
14854   $as_echo_n "(cached) " >&6
14855 else
14856   case $DF in
14857   [\\/]* | ?:[\\/]*)
14858   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14859   ;;
14860   *)
14861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14862 for as_dir in $PATH
14863 do
14864   IFS=$as_save_IFS
14865   test -z "$as_dir" && as_dir=.
14866     for ac_exec_ext in '' $ac_executable_extensions; do
14867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14868     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14870     break 2
14871   fi
14872 done
14873   done
14874 IFS=$as_save_IFS
14875 
14876   ;;
14877 esac
14878 fi
14879 DF=$ac_cv_path_DF
14880 if test -n "$DF"; then
14881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14882 $as_echo "$DF" >&6; }
14883 else
14884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14885 $as_echo "no" >&6; }
14886 fi
14887 
14888 
14889           if test "x$DF" = x; then
14890             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14891           fi
14892         else
14893           # Otherwise we believe it is a complete path. Use it as it is.
14894           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14895 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14896           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14897 $as_echo_n "checking for DF... " >&6; }
14898           if test ! -x "$tool_specified"; then
14899             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14900 $as_echo "not found" >&6; }
14901             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14902           fi
14903           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14904 $as_echo "$tool_specified" >&6; }
14905         fi
14906       fi
14907     fi
14908 
14909   fi
14910 
14911 
14912 
14913 
14914   # Publish this variable in the help.
14915 
14916 
14917   if [ -z "${CPIO+x}" ]; then
14918     # The variable is not set by user, try to locate tool using the code snippet
14919     for ac_prog in cpio bsdcpio
14920 do
14921   # Extract the first word of "$ac_prog", so it can be a program name with args.
14922 set dummy $ac_prog; ac_word=$2
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14924 $as_echo_n "checking for $ac_word... " >&6; }
14925 if ${ac_cv_path_CPIO+:} false; then :
14926   $as_echo_n "(cached) " >&6
14927 else
14928   case $CPIO in
14929   [\\/]* | ?:[\\/]*)
14930   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14931   ;;
14932   *)
14933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14934 for as_dir in $PATH
14935 do
14936   IFS=$as_save_IFS
14937   test -z "$as_dir" && as_dir=.
14938     for ac_exec_ext in '' $ac_executable_extensions; do
14939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14940     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14942     break 2
14943   fi
14944 done
14945   done
14946 IFS=$as_save_IFS
14947 
14948   ;;
14949 esac
14950 fi
14951 CPIO=$ac_cv_path_CPIO
14952 if test -n "$CPIO"; then
14953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14954 $as_echo "$CPIO" >&6; }
14955 else
14956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957 $as_echo "no" >&6; }
14958 fi
14959 
14960 
14961   test -n "$CPIO" && break
14962 done
14963 
14964   else
14965     # The variable is set, but is it from the command line or the environment?
14966 
14967     # Try to remove the string !CPIO! from our list.
14968     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14969     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14970       # If it failed, the variable was not from the command line. Ignore it,
14971       # but warn the user (except for BASH, which is always set by the calling BASH).
14972       if test "xCPIO" != xBASH; then
14973         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14974 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14975       fi
14976       # Try to locate tool using the code snippet
14977       for ac_prog in cpio bsdcpio
14978 do
14979   # Extract the first word of "$ac_prog", so it can be a program name with args.
14980 set dummy $ac_prog; ac_word=$2
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14982 $as_echo_n "checking for $ac_word... " >&6; }
14983 if ${ac_cv_path_CPIO+:} false; then :
14984   $as_echo_n "(cached) " >&6
14985 else
14986   case $CPIO in
14987   [\\/]* | ?:[\\/]*)
14988   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14989   ;;
14990   *)
14991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14992 for as_dir in $PATH
14993 do
14994   IFS=$as_save_IFS
14995   test -z "$as_dir" && as_dir=.
14996     for ac_exec_ext in '' $ac_executable_extensions; do
14997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14998     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15000     break 2
15001   fi
15002 done
15003   done
15004 IFS=$as_save_IFS
15005 
15006   ;;
15007 esac
15008 fi
15009 CPIO=$ac_cv_path_CPIO
15010 if test -n "$CPIO"; then
15011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15012 $as_echo "$CPIO" >&6; }
15013 else
15014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15015 $as_echo "no" >&6; }
15016 fi
15017 
15018 
15019   test -n "$CPIO" && break
15020 done
15021 
15022     else
15023       # If it succeeded, then it was overridden by the user. We will use it
15024       # for the tool.
15025 
15026       # First remove it from the list of overridden variables, so we can test
15027       # for unknown variables in the end.
15028       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15029 
15030       # Check if we try to supply an empty value
15031       if test "x$CPIO" = x; then
15032         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15033 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15035 $as_echo_n "checking for CPIO... " >&6; }
15036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15037 $as_echo "disabled" >&6; }
15038       else
15039         # Check if the provided tool contains a complete path.
15040         tool_specified="$CPIO"
15041         tool_basename="${tool_specified##*/}"
15042         if test "x$tool_basename" = "x$tool_specified"; then
15043           # A command without a complete path is provided, search $PATH.
15044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15045 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15046           # Extract the first word of "$tool_basename", so it can be a program name with args.
15047 set dummy $tool_basename; ac_word=$2
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15049 $as_echo_n "checking for $ac_word... " >&6; }
15050 if ${ac_cv_path_CPIO+:} false; then :
15051   $as_echo_n "(cached) " >&6
15052 else
15053   case $CPIO in
15054   [\\/]* | ?:[\\/]*)
15055   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15056   ;;
15057   *)
15058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15059 for as_dir in $PATH
15060 do
15061   IFS=$as_save_IFS
15062   test -z "$as_dir" && as_dir=.
15063     for ac_exec_ext in '' $ac_executable_extensions; do
15064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15065     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15067     break 2
15068   fi
15069 done
15070   done
15071 IFS=$as_save_IFS
15072 
15073   ;;
15074 esac
15075 fi
15076 CPIO=$ac_cv_path_CPIO
15077 if test -n "$CPIO"; then
15078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15079 $as_echo "$CPIO" >&6; }
15080 else
15081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15082 $as_echo "no" >&6; }
15083 fi
15084 
15085 
15086           if test "x$CPIO" = x; then
15087             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15088           fi
15089         else
15090           # Otherwise we believe it is a complete path. Use it as it is.
15091           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15092 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15093           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15094 $as_echo_n "checking for CPIO... " >&6; }
15095           if test ! -x "$tool_specified"; then
15096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15097 $as_echo "not found" >&6; }
15098             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15099           fi
15100           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15101 $as_echo "$tool_specified" >&6; }
15102         fi
15103       fi
15104     fi
15105 
15106   fi
15107 
15108 
15109 
15110 
15111   # Publish this variable in the help.
15112 
15113 
15114   if [ -z "${NICE+x}" ]; then
15115     # The variable is not set by user, try to locate tool using the code snippet
15116     for ac_prog in nice
15117 do
15118   # Extract the first word of "$ac_prog", so it can be a program name with args.
15119 set dummy $ac_prog; ac_word=$2
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15121 $as_echo_n "checking for $ac_word... " >&6; }
15122 if ${ac_cv_path_NICE+:} false; then :
15123   $as_echo_n "(cached) " >&6
15124 else
15125   case $NICE in
15126   [\\/]* | ?:[\\/]*)
15127   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15128   ;;
15129   *)
15130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15131 for as_dir in $PATH
15132 do
15133   IFS=$as_save_IFS
15134   test -z "$as_dir" && as_dir=.
15135     for ac_exec_ext in '' $ac_executable_extensions; do
15136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15137     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15139     break 2
15140   fi
15141 done
15142   done
15143 IFS=$as_save_IFS
15144 
15145   ;;
15146 esac
15147 fi
15148 NICE=$ac_cv_path_NICE
15149 if test -n "$NICE"; then
15150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15151 $as_echo "$NICE" >&6; }
15152 else
15153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15154 $as_echo "no" >&6; }
15155 fi
15156 
15157 
15158   test -n "$NICE" && break
15159 done
15160 
15161   else
15162     # The variable is set, but is it from the command line or the environment?
15163 
15164     # Try to remove the string !NICE! from our list.
15165     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15166     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15167       # If it failed, the variable was not from the command line. Ignore it,
15168       # but warn the user (except for BASH, which is always set by the calling BASH).
15169       if test "xNICE" != xBASH; then
15170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15171 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15172       fi
15173       # Try to locate tool using the code snippet
15174       for ac_prog in nice
15175 do
15176   # Extract the first word of "$ac_prog", so it can be a program name with args.
15177 set dummy $ac_prog; ac_word=$2
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15179 $as_echo_n "checking for $ac_word... " >&6; }
15180 if ${ac_cv_path_NICE+:} false; then :
15181   $as_echo_n "(cached) " >&6
15182 else
15183   case $NICE in
15184   [\\/]* | ?:[\\/]*)
15185   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15186   ;;
15187   *)
15188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15189 for as_dir in $PATH
15190 do
15191   IFS=$as_save_IFS
15192   test -z "$as_dir" && as_dir=.
15193     for ac_exec_ext in '' $ac_executable_extensions; do
15194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15195     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15197     break 2
15198   fi
15199 done
15200   done
15201 IFS=$as_save_IFS
15202 
15203   ;;
15204 esac
15205 fi
15206 NICE=$ac_cv_path_NICE
15207 if test -n "$NICE"; then
15208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15209 $as_echo "$NICE" >&6; }
15210 else
15211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15212 $as_echo "no" >&6; }
15213 fi
15214 
15215 
15216   test -n "$NICE" && break
15217 done
15218 
15219     else
15220       # If it succeeded, then it was overridden by the user. We will use it
15221       # for the tool.
15222 
15223       # First remove it from the list of overridden variables, so we can test
15224       # for unknown variables in the end.
15225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15226 
15227       # Check if we try to supply an empty value
15228       if test "x$NICE" = x; then
15229         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15230 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15232 $as_echo_n "checking for NICE... " >&6; }
15233         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15234 $as_echo "disabled" >&6; }
15235       else
15236         # Check if the provided tool contains a complete path.
15237         tool_specified="$NICE"
15238         tool_basename="${tool_specified##*/}"
15239         if test "x$tool_basename" = "x$tool_specified"; then
15240           # A command without a complete path is provided, search $PATH.
15241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15242 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15243           # Extract the first word of "$tool_basename", so it can be a program name with args.
15244 set dummy $tool_basename; ac_word=$2
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15246 $as_echo_n "checking for $ac_word... " >&6; }
15247 if ${ac_cv_path_NICE+:} false; then :
15248   $as_echo_n "(cached) " >&6
15249 else
15250   case $NICE in
15251   [\\/]* | ?:[\\/]*)
15252   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15253   ;;
15254   *)
15255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15256 for as_dir in $PATH
15257 do
15258   IFS=$as_save_IFS
15259   test -z "$as_dir" && as_dir=.
15260     for ac_exec_ext in '' $ac_executable_extensions; do
15261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15262     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15264     break 2
15265   fi
15266 done
15267   done
15268 IFS=$as_save_IFS
15269 
15270   ;;
15271 esac
15272 fi
15273 NICE=$ac_cv_path_NICE
15274 if test -n "$NICE"; then
15275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15276 $as_echo "$NICE" >&6; }
15277 else
15278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15279 $as_echo "no" >&6; }
15280 fi
15281 
15282 
15283           if test "x$NICE" = x; then
15284             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15285           fi
15286         else
15287           # Otherwise we believe it is a complete path. Use it as it is.
15288           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15289 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15290           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15291 $as_echo_n "checking for NICE... " >&6; }
15292           if test ! -x "$tool_specified"; then
15293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15294 $as_echo "not found" >&6; }
15295             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15296           fi
15297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15298 $as_echo "$tool_specified" >&6; }
15299         fi
15300       fi
15301     fi
15302 
15303   fi
15304 
15305 
15306 
15307 
15308 # Now we can determine OpenJDK build and target platforms. This is required to
15309 # have early on.
15310 # Make sure we can run config.sub.
15311 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15312   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15313 
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15315 $as_echo_n "checking build system type... " >&6; }
15316 if ${ac_cv_build+:} false; then :
15317   $as_echo_n "(cached) " >&6
15318 else
15319   ac_build_alias=$build_alias
15320 test "x$ac_build_alias" = x &&
15321   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15322 test "x$ac_build_alias" = x &&
15323   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15324 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15325   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15326 
15327 fi
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15329 $as_echo "$ac_cv_build" >&6; }
15330 case $ac_cv_build in
15331 *-*-*) ;;
15332 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15333 esac
15334 build=$ac_cv_build
15335 ac_save_IFS=$IFS; IFS='-'
15336 set x $ac_cv_build
15337 shift
15338 build_cpu=$1
15339 build_vendor=$2
15340 shift; shift
15341 # Remember, the first character of IFS is used to create $*,
15342 # except with old shells:
15343 build_os=$*
15344 IFS=$ac_save_IFS
15345 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15346 
15347 
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15349 $as_echo_n "checking host system type... " >&6; }
15350 if ${ac_cv_host+:} false; then :
15351   $as_echo_n "(cached) " >&6
15352 else
15353   if test "x$host_alias" = x; then
15354   ac_cv_host=$ac_cv_build
15355 else
15356   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15357     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15358 fi
15359 
15360 fi
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15362 $as_echo "$ac_cv_host" >&6; }
15363 case $ac_cv_host in
15364 *-*-*) ;;
15365 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15366 esac
15367 host=$ac_cv_host
15368 ac_save_IFS=$IFS; IFS='-'
15369 set x $ac_cv_host
15370 shift
15371 host_cpu=$1
15372 host_vendor=$2
15373 shift; shift
15374 # Remember, the first character of IFS is used to create $*,
15375 # except with old shells:
15376 host_os=$*
15377 IFS=$ac_save_IFS
15378 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15379 
15380 
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15382 $as_echo_n "checking target system type... " >&6; }
15383 if ${ac_cv_target+:} false; then :
15384   $as_echo_n "(cached) " >&6
15385 else
15386   if test "x$target_alias" = x; then
15387   ac_cv_target=$ac_cv_host
15388 else
15389   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15390     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15391 fi
15392 
15393 fi
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15395 $as_echo "$ac_cv_target" >&6; }
15396 case $ac_cv_target in
15397 *-*-*) ;;
15398 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15399 esac
15400 target=$ac_cv_target
15401 ac_save_IFS=$IFS; IFS='-'
15402 set x $ac_cv_target
15403 shift
15404 target_cpu=$1
15405 target_vendor=$2
15406 shift; shift
15407 # Remember, the first character of IFS is used to create $*,
15408 # except with old shells:
15409 target_os=$*
15410 IFS=$ac_save_IFS
15411 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15412 
15413 
15414 # The aliases save the names the user supplied, while $host etc.
15415 # will get canonicalized.
15416 test -n "$target_alias" &&
15417   test "$program_prefix$program_suffix$program_transform_name" = \
15418     NONENONEs,x,x, &&
15419   program_prefix=${target_alias}-
15420 
15421   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15422   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15423   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15424   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15425   # to use the configure naming style.
15426 
15427 
15428 
15429 
15430 
15431   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15432   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15433   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15434   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15435   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15436   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15437 
15438 
15439 
15440   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15441 
15442   case "$build_os" in
15443     *linux*)
15444       VAR_OS=linux
15445       VAR_OS_TYPE=unix
15446       ;;
15447     *solaris*)
15448       VAR_OS=solaris
15449       VAR_OS_TYPE=unix
15450       ;;
15451     *darwin*)
15452       VAR_OS=macosx
15453       VAR_OS_TYPE=unix
15454       ;;
15455     *bsd*)
15456       VAR_OS=bsd
15457       VAR_OS_TYPE=unix
15458       ;;
15459     *cygwin*)
15460       VAR_OS=windows
15461       VAR_OS_ENV=windows.cygwin
15462       ;;
15463     *mingw*)
15464       VAR_OS=windows
15465       VAR_OS_ENV=windows.msys
15466       ;;
15467     *aix*)
15468       VAR_OS=aix
15469       VAR_OS_TYPE=unix
15470       ;;
15471     *)
15472       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15473       ;;
15474   esac
15475 
15476 
15477   # First argument is the cpu name from the trip/quad
15478   case "$build_cpu" in
15479     x86_64)
15480       VAR_CPU=x86_64
15481       VAR_CPU_ARCH=x86
15482       VAR_CPU_BITS=64
15483       VAR_CPU_ENDIAN=little
15484       ;;
15485     i?86)
15486       VAR_CPU=x86
15487       VAR_CPU_ARCH=x86
15488       VAR_CPU_BITS=32
15489       VAR_CPU_ENDIAN=little
15490       ;;
15491     arm*)
15492       VAR_CPU=arm
15493       VAR_CPU_ARCH=arm
15494       VAR_CPU_BITS=32
15495       VAR_CPU_ENDIAN=little
15496       ;;
15497     aarch64)
15498       VAR_CPU=aarch64
15499       VAR_CPU_ARCH=aarch64
15500       VAR_CPU_BITS=64
15501       VAR_CPU_ENDIAN=little
15502       ;;
15503     powerpc)
15504       VAR_CPU=ppc
15505       VAR_CPU_ARCH=ppc
15506       VAR_CPU_BITS=32
15507       VAR_CPU_ENDIAN=big
15508       ;;
15509     powerpc64)
15510       VAR_CPU=ppc64
15511       VAR_CPU_ARCH=ppc
15512       VAR_CPU_BITS=64
15513       VAR_CPU_ENDIAN=big
15514       ;;
15515     powerpc64le)
15516       VAR_CPU=ppc64le
15517       VAR_CPU_ARCH=ppc
15518       VAR_CPU_BITS=64
15519       VAR_CPU_ENDIAN=little
15520       ;;
15521     s390)
15522       VAR_CPU=s390
15523       VAR_CPU_ARCH=s390
15524       VAR_CPU_BITS=32
15525       VAR_CPU_ENDIAN=big
15526       ;;
15527     s390x)
15528       VAR_CPU=s390x
15529       VAR_CPU_ARCH=s390
15530       VAR_CPU_BITS=64
15531       VAR_CPU_ENDIAN=big
15532       ;;
15533     sparc)
15534       VAR_CPU=sparc
15535       VAR_CPU_ARCH=sparc
15536       VAR_CPU_BITS=32
15537       VAR_CPU_ENDIAN=big
15538       ;;
15539     sparcv9|sparc64)
15540       VAR_CPU=sparcv9
15541       VAR_CPU_ARCH=sparc
15542       VAR_CPU_BITS=64
15543       VAR_CPU_ENDIAN=big
15544       ;;
15545     *)
15546       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15547       ;;
15548   esac
15549 
15550   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15551   OPENJDK_BUILD_OS="$VAR_OS"
15552   if test "x$VAR_OS_TYPE" != x; then
15553     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15554   else
15555     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15556   fi
15557   if test "x$VAR_OS_ENV" != x; then
15558     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15559   else
15560     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15561   fi
15562   OPENJDK_BUILD_CPU="$VAR_CPU"
15563   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15564   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15565   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15566 
15567 
15568 
15569 
15570 
15571 
15572 
15573 
15574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15575 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15577 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15578 
15579   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15580 
15581   case "$host_os" in
15582     *linux*)
15583       VAR_OS=linux
15584       VAR_OS_TYPE=unix
15585       ;;
15586     *solaris*)
15587       VAR_OS=solaris
15588       VAR_OS_TYPE=unix
15589       ;;
15590     *darwin*)
15591       VAR_OS=macosx
15592       VAR_OS_TYPE=unix
15593       ;;
15594     *bsd*)
15595       VAR_OS=bsd
15596       VAR_OS_TYPE=unix
15597       ;;
15598     *cygwin*)
15599       VAR_OS=windows
15600       VAR_OS_ENV=windows.cygwin
15601       ;;
15602     *mingw*)
15603       VAR_OS=windows
15604       VAR_OS_ENV=windows.msys
15605       ;;
15606     *aix*)
15607       VAR_OS=aix
15608       VAR_OS_TYPE=unix
15609       ;;
15610     *)
15611       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15612       ;;
15613   esac
15614 
15615 
15616   # First argument is the cpu name from the trip/quad
15617   case "$host_cpu" in
15618     x86_64)
15619       VAR_CPU=x86_64
15620       VAR_CPU_ARCH=x86
15621       VAR_CPU_BITS=64
15622       VAR_CPU_ENDIAN=little
15623       ;;
15624     i?86)
15625       VAR_CPU=x86
15626       VAR_CPU_ARCH=x86
15627       VAR_CPU_BITS=32
15628       VAR_CPU_ENDIAN=little
15629       ;;
15630     arm*)
15631       VAR_CPU=arm
15632       VAR_CPU_ARCH=arm
15633       VAR_CPU_BITS=32
15634       VAR_CPU_ENDIAN=little
15635       ;;
15636     aarch64)
15637       VAR_CPU=aarch64
15638       VAR_CPU_ARCH=aarch64
15639       VAR_CPU_BITS=64
15640       VAR_CPU_ENDIAN=little
15641       ;;
15642     powerpc)
15643       VAR_CPU=ppc
15644       VAR_CPU_ARCH=ppc
15645       VAR_CPU_BITS=32
15646       VAR_CPU_ENDIAN=big
15647       ;;
15648     powerpc64)
15649       VAR_CPU=ppc64
15650       VAR_CPU_ARCH=ppc
15651       VAR_CPU_BITS=64
15652       VAR_CPU_ENDIAN=big
15653       ;;
15654     powerpc64le)
15655       VAR_CPU=ppc64le
15656       VAR_CPU_ARCH=ppc
15657       VAR_CPU_BITS=64
15658       VAR_CPU_ENDIAN=little
15659       ;;
15660     s390)
15661       VAR_CPU=s390
15662       VAR_CPU_ARCH=s390
15663       VAR_CPU_BITS=32
15664       VAR_CPU_ENDIAN=big
15665       ;;
15666     s390x)
15667       VAR_CPU=s390x
15668       VAR_CPU_ARCH=s390
15669       VAR_CPU_BITS=64
15670       VAR_CPU_ENDIAN=big
15671       ;;
15672     sparc)
15673       VAR_CPU=sparc
15674       VAR_CPU_ARCH=sparc
15675       VAR_CPU_BITS=32
15676       VAR_CPU_ENDIAN=big
15677       ;;
15678     sparcv9|sparc64)
15679       VAR_CPU=sparcv9
15680       VAR_CPU_ARCH=sparc
15681       VAR_CPU_BITS=64
15682       VAR_CPU_ENDIAN=big
15683       ;;
15684     *)
15685       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15686       ;;
15687   esac
15688 
15689   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15690   OPENJDK_TARGET_OS="$VAR_OS"
15691   if test "x$VAR_OS_TYPE" != x; then
15692     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15693   else
15694     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15695   fi
15696   if test "x$VAR_OS_ENV" != x; then
15697     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15698   else
15699     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15700   fi
15701   OPENJDK_TARGET_CPU="$VAR_CPU"
15702   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15703   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15704   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15705 
15706 
15707 
15708 
15709 
15710 
15711 
15712 
15713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15714 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15716 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15717 
15718 
15719 
15720 # Check whether --with-target-bits was given.
15721 if test "${with_target_bits+set}" = set; then :
15722   withval=$with_target_bits;
15723 fi
15724 
15725 
15726   # We have three types of compiles:
15727   # native  == normal compilation, target system == build system
15728   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15729   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15730   #
15731   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15732     # We're doing a proper cross-compilation
15733     COMPILE_TYPE="cross"
15734   else
15735     COMPILE_TYPE="native"
15736   fi
15737 
15738   if test "x$with_target_bits" != x; then
15739     if test "x$COMPILE_TYPE" = "xcross"; then
15740       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15741     fi
15742 
15743     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15744       # A reduced build is requested
15745       COMPILE_TYPE="reduced"
15746       OPENJDK_TARGET_CPU_BITS=32
15747       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15748         OPENJDK_TARGET_CPU=x86
15749       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15750         OPENJDK_TARGET_CPU=sparc
15751       else
15752         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15753       fi
15754     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15755       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
15756     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15757       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15758 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15759     else
15760       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15761     fi
15762   fi
15763 
15764 
15765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15766 $as_echo_n "checking compilation type... " >&6; }
15767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15768 $as_echo "$COMPILE_TYPE" >&6; }
15769 
15770 
15771   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15772     REQUIRED_OS_NAME=SunOS
15773     REQUIRED_OS_VERSION=5.10
15774   fi
15775   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15776     REQUIRED_OS_NAME=Linux
15777     REQUIRED_OS_VERSION=2.6
15778   fi
15779   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15780     REQUIRED_OS_NAME=Windows
15781     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15782       REQUIRED_OS_VERSION=5.2
15783     else
15784       REQUIRED_OS_VERSION=5.1
15785     fi
15786   fi
15787   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15788     REQUIRED_OS_NAME=Darwin
15789     REQUIRED_OS_VERSION=11.2
15790   fi
15791   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15792     REQUIRED_OS_NAME=AIX
15793     REQUIRED_OS_VERSION=7.1
15794   fi
15795 
15796 
15797 
15798 
15799 
15800 
15801   # Also store the legacy naming of the cpu.
15802   # Ie i586 and amd64 instead of x86 and x86_64
15803   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15804   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15805     OPENJDK_TARGET_CPU_LEGACY="i586"
15806   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15807     # On all platforms except MacOSX replace x86_64 with amd64.
15808     OPENJDK_TARGET_CPU_LEGACY="amd64"
15809   fi
15810 
15811 
15812   # And the second legacy naming of the cpu.
15813   # Ie i386 and amd64 instead of x86 and x86_64.
15814   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15815   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15816     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15817   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15818     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15819   fi
15820 
15821 
15822   # This is the name of the cpu (but using i386 and amd64 instead of
15823   # x86 and x86_64, respectively), preceeded by a /, to be used when
15824   # locating libraries. On macosx, it's empty, though.
15825   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15826   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15827     OPENJDK_TARGET_CPU_LIBDIR=""
15828   fi
15829 
15830 
15831   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15832   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15833   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15834   OPENJDK_TARGET_CPU_ISADIR=""
15835   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15836     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15838     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15839       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15840     fi
15841   fi
15842 
15843 
15844   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15845   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15846   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15847     # On linux only, we replace x86 with i386.
15848     OPENJDK_TARGET_CPU_OSARCH="i386"
15849   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15850     # On all platforms except macosx, we replace x86_64 with amd64.
15851     OPENJDK_TARGET_CPU_OSARCH="amd64"
15852   fi
15853 
15854 
15855   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15856   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15857     OPENJDK_TARGET_CPU_JLI="i386"
15858   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15859     # On all platforms except macosx, we replace x86_64 with amd64.
15860     OPENJDK_TARGET_CPU_JLI="amd64"
15861   fi
15862   # Now setup the -D flags for building libjli.
15863   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15864   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15865     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15866       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15867     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15868       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15869     fi
15870   fi
15871 
15872 
15873   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15874       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15875   else
15876       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15877   fi
15878 
15879 
15880   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15881   # Macosx is osx and x86_64 is x64
15882   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15883     OPENJDK_TARGET_OS_BUNDLE="osx"
15884   else
15885     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15886   fi
15887   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15888     OPENJDK_TARGET_CPU_BUNDLE="x64"
15889   else
15890     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15891   fi
15892   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15893 
15894 
15895 
15896 
15897   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15898     A_LP64="LP64:="
15899     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15900     # unpack200.exe
15901     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15902       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15903     fi
15904   fi
15905   LP64=$A_LP64
15906 
15907 
15908   if test "x$COMPILE_TYPE" = "xcross"; then
15909     # FIXME: ... or should this include reduced builds..?
15910     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15911   else
15912     DEFINE_CROSS_COMPILE_ARCH=""
15913   fi
15914 
15915 
15916   # Convert openjdk platform names to hotspot names
15917 
15918   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15919   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15920     HOTSPOT_TARGET_OS=bsd
15921   fi
15922 
15923 
15924   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15925   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15926     HOTSPOT_TARGET_OS_TYPE=posix
15927   fi
15928 
15929 
15930   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15931   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15932     HOTSPOT_TARGET_CPU=x86_32
15933   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15934     HOTSPOT_TARGET_CPU=sparc
15935   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15936     HOTSPOT_TARGET_CPU=ppc_64
15937   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15938     HOTSPOT_TARGET_CPU=ppc_64
15939   fi
15940 
15941 
15942   # This is identical with OPENJDK_*, but define anyway for consistency.
15943   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15944 
15945 
15946   # Setup HOTSPOT_TARGET_CPU_DEFINE
15947   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15948     HOTSPOT_TARGET_CPU_DEFINE=IA32
15949   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15950     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15951   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15952     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15953   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15954     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15955   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15956     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15957   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15958     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15959 
15960   # The cpu defines below are for zero, we don't support them directly.
15961   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15962     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15963   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15964     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15965   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15966     HOTSPOT_TARGET_CPU_DEFINE=S390
15967   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15968     HOTSPOT_TARGET_CPU_DEFINE=S390
15969   elif test "x$OPENJDK_TARGET_CPU" != x; then
15970     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15971   fi
15972 
15973 
15974 
15975 
15976   # Also store the legacy naming of the cpu.
15977   # Ie i586 and amd64 instead of x86 and x86_64
15978   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15979   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15980     OPENJDK_BUILD_CPU_LEGACY="i586"
15981   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15982     # On all platforms except MacOSX replace x86_64 with amd64.
15983     OPENJDK_BUILD_CPU_LEGACY="amd64"
15984   fi
15985 
15986 
15987   # And the second legacy naming of the cpu.
15988   # Ie i386 and amd64 instead of x86 and x86_64.
15989   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15990   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15991     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15992   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15993     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15994   fi
15995 
15996 
15997   # This is the name of the cpu (but using i386 and amd64 instead of
15998   # x86 and x86_64, respectively), preceeded by a /, to be used when
15999   # locating libraries. On macosx, it's empty, though.
16000   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
16001   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16002     OPENJDK_BUILD_CPU_LIBDIR=""
16003   fi
16004 
16005 
16006   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16007   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16008   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16009   OPENJDK_BUILD_CPU_ISADIR=""
16010   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16011     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16012       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16013     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16014       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16015     fi
16016   fi
16017 
16018 
16019   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16020   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16021   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16022     # On linux only, we replace x86 with i386.
16023     OPENJDK_BUILD_CPU_OSARCH="i386"
16024   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16025     # On all platforms except macosx, we replace x86_64 with amd64.
16026     OPENJDK_BUILD_CPU_OSARCH="amd64"
16027   fi
16028 
16029 
16030   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16031   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16032     OPENJDK_BUILD_CPU_JLI="i386"
16033   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16034     # On all platforms except macosx, we replace x86_64 with amd64.
16035     OPENJDK_BUILD_CPU_JLI="amd64"
16036   fi
16037   # Now setup the -D flags for building libjli.
16038   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16039   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16040     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16041       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16042     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16043       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16044     fi
16045   fi
16046 
16047 
16048   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16049       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16050   else
16051       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16052   fi
16053 
16054 
16055   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16056   # Macosx is osx and x86_64 is x64
16057   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16058     OPENJDK_BUILD_OS_BUNDLE="osx"
16059   else
16060     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16061   fi
16062   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16063     OPENJDK_BUILD_CPU_BUNDLE="x64"
16064   else
16065     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16066   fi
16067   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16068 
16069 
16070 
16071 
16072   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16073     A_LP64="LP64:="
16074     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16075     # unpack200.exe
16076     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16077       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16078     fi
16079   fi
16080   LP64=$A_LP64
16081 
16082 
16083   if test "x$COMPILE_TYPE" = "xcross"; then
16084     # FIXME: ... or should this include reduced builds..?
16085     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16086   else
16087     DEFINE_CROSS_COMPILE_ARCH=""
16088   fi
16089 
16090 
16091   # Convert openjdk platform names to hotspot names
16092 
16093   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16094   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16095     HOTSPOT_BUILD_OS=bsd
16096   fi
16097 
16098 
16099   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16100   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16101     HOTSPOT_BUILD_OS_TYPE=posix
16102   fi
16103 
16104 
16105   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16106   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16107     HOTSPOT_BUILD_CPU=x86_32
16108   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16109     HOTSPOT_BUILD_CPU=sparc
16110   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16111     HOTSPOT_BUILD_CPU=ppc_64
16112   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16113     HOTSPOT_BUILD_CPU=ppc_64
16114   fi
16115 
16116 
16117   # This is identical with OPENJDK_*, but define anyway for consistency.
16118   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16119 
16120 
16121   # Setup HOTSPOT_BUILD_CPU_DEFINE
16122   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16123     HOTSPOT_BUILD_CPU_DEFINE=IA32
16124   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16125     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16126   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16127     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16128   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16129     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16130   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16131     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16132   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16133     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16134 
16135   # The cpu defines below are for zero, we don't support them directly.
16136   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16137     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16138   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16139     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16140   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16141     HOTSPOT_BUILD_CPU_DEFINE=S390
16142   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16143     HOTSPOT_BUILD_CPU_DEFINE=S390
16144   elif test "x$OPENJDK_BUILD_CPU" != x; then
16145     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16146   fi
16147 
16148 
16149 
16150 
16151   # ZERO_ARCHDEF is used to enable architecture-specific code.
16152   # This is used in legacy hotspot build.
16153   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16154 
16155 
16156 
16157 
16158 
16159 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16160 
16161   # Save the current directory this script was started from
16162   CURDIR="$PWD"
16163 
16164   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16165   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16166   # was not available at that time.
16167   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16168   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16169     ORIGINAL_PATH="$REWRITTEN_PATH"
16170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16171 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16172   fi
16173 
16174   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16175     PATH_SEP=";"
16176 
16177   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16178   if test $SRC_ROOT_LENGTH -gt 100; then
16179     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16180   fi
16181 
16182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16184 $as_echo_n "checking cygwin release... " >&6; }
16185     CYGWIN_VERSION=`$UNAME -r`
16186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16187 $as_echo "$CYGWIN_VERSION" >&6; }
16188     WINDOWS_ENV_VENDOR='cygwin'
16189     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16190 
16191     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16192     if test "x$CYGWIN_VERSION_OLD" != x; then
16193       { $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
16194 $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;}
16195       as_fn_error $? "Cannot continue" "$LINENO" 5
16196     fi
16197     if test "x$CYGPATH" = x; then
16198       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16199     fi
16200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16201 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16202     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16203     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16204     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16205     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16206     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16207 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16208     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16209     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16210     if test "x$test_cygdrive_prefix" = x; then
16211       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16212     fi
16213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16214     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16215 $as_echo_n "checking msys release... " >&6; }
16216     MSYS_VERSION=`$UNAME -r`
16217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16218 $as_echo "$MSYS_VERSION" >&6; }
16219 
16220     WINDOWS_ENV_VENDOR='msys'
16221     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16222 
16223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16224 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16225     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16226     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16227 
16228   windows_path="$MSYS_ROOT_PATH"
16229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230     unix_path=`$CYGPATH -u "$windows_path"`
16231     MSYS_ROOT_PATH="$unix_path"
16232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16234     MSYS_ROOT_PATH="$unix_path"
16235   fi
16236 
16237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16238 $as_echo "$MSYS_ROOT_PATH" >&6; }
16239     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16240   else
16241     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16242   fi
16243 
16244   # Test if windows or unix (cygwin/msys) find is first in path.
16245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16246 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16247   FIND_BINARY_OUTPUT=`find --version 2>&1`
16248   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16250 $as_echo "unix style" >&6; }
16251   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16253 $as_echo "Windows" >&6; }
16254     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16255 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16256     { $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
16257 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16258     as_fn_error $? "Cannot continue" "$LINENO" 5
16259   else
16260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16261 $as_echo "unknown" >&6; }
16262     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16263 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16264   fi
16265 
16266   else
16267     PATH_SEP=":"
16268   fi
16269 
16270 
16271   # We get the top-level directory from the supporting wrappers.
16272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16273 $as_echo_n "checking for top-level directory... " >&6; }
16274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16275 $as_echo "$TOPDIR" >&6; }
16276 
16277 
16278   # Save the original version of TOPDIR for string comparisons
16279   ORIGINAL_TOPDIR="$TOPDIR"
16280 
16281 
16282   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16283 
16284   # Only process if variable expands to non-empty
16285 
16286   if test "x$CURDIR" != x; then
16287     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16288 
16289   # Input might be given as Windows format, start by converting to
16290   # unix format.
16291   path="$CURDIR"
16292   new_path=`$CYGPATH -u "$path"`
16293 
16294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16297   # "foo.exe" is OK but "foo" is an error.
16298   #
16299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16300   # It is also a way to make sure we got the proper file name for the real test later on.
16301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16302   if test "x$test_shortpath" = x; then
16303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16304 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16305     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16306   fi
16307 
16308   # Call helper function which possibly converts this using DOS-style short mode.
16309   # If so, the updated path is stored in $new_path.
16310 
16311   input_path="$new_path"
16312   # Check if we need to convert this using DOS-style short mode. If the path
16313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16314   # take no chances and rewrite it.
16315   # Note: m4 eats our [], so we need to use [ and ] instead.
16316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16317   if test "x$has_forbidden_chars" != x; then
16318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16322       # Going to short mode and back again did indeed matter. Since short mode is
16323       # case insensitive, let's make it lowercase to improve readability.
16324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16325       # Now convert it back to Unix-style (cygpath)
16326       input_path=`$CYGPATH -u "$shortmode_path"`
16327       new_path="$input_path"
16328     fi
16329   fi
16330 
16331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16332   if test "x$test_cygdrive_prefix" = x; then
16333     # As a simple fix, exclude /usr/bin since it's not a real path.
16334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16336       # a path prefixed by /cygdrive for fixpath to work.
16337       new_path="$CYGWIN_ROOT_PATH$input_path"
16338     fi
16339   fi
16340 
16341 
16342   if test "x$path" != "x$new_path"; then
16343     CURDIR="$new_path"
16344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16345 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16346   fi
16347 
16348     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349 
16350   path="$CURDIR"
16351   has_colon=`$ECHO $path | $GREP ^.:`
16352   new_path="$path"
16353   if test "x$has_colon" = x; then
16354     # Not in mixed or Windows style, start by that.
16355     new_path=`cmd //c echo $path`
16356   fi
16357 
16358 
16359   input_path="$new_path"
16360   # Check if we need to convert this using DOS-style short mode. If the path
16361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16362   # take no chances and rewrite it.
16363   # Note: m4 eats our [], so we need to use [ and ] instead.
16364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16365   if test "x$has_forbidden_chars" != x; then
16366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16368   fi
16369 
16370 
16371   windows_path="$new_path"
16372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16373     unix_path=`$CYGPATH -u "$windows_path"`
16374     new_path="$unix_path"
16375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16377     new_path="$unix_path"
16378   fi
16379 
16380   if test "x$path" != "x$new_path"; then
16381     CURDIR="$new_path"
16382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16383 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16384   fi
16385 
16386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16388 
16389     else
16390       # We're on a unix platform. Hooray! :)
16391       path="$CURDIR"
16392       has_space=`$ECHO "$path" | $GREP " "`
16393       if test "x$has_space" != x; then
16394         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16395 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16396         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16397       fi
16398 
16399       # Use eval to expand a potential ~
16400       eval path="$path"
16401       if test ! -f "$path" && test ! -d "$path"; then
16402         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16403       fi
16404 
16405       if test -d "$path"; then
16406         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16407       else
16408         dir="`$DIRNAME "$path"`"
16409         base="`$BASENAME "$path"`"
16410         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16411       fi
16412     fi
16413   fi
16414 
16415 
16416   # Only process if variable expands to non-empty
16417 
16418   if test "x$TOPDIR" != x; then
16419     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16420 
16421   # Input might be given as Windows format, start by converting to
16422   # unix format.
16423   path="$TOPDIR"
16424   new_path=`$CYGPATH -u "$path"`
16425 
16426   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16427   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16428   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16429   # "foo.exe" is OK but "foo" is an error.
16430   #
16431   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16432   # It is also a way to make sure we got the proper file name for the real test later on.
16433   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16434   if test "x$test_shortpath" = x; then
16435     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16436 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16437     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16438   fi
16439 
16440   # Call helper function which possibly converts this using DOS-style short mode.
16441   # If so, the updated path is stored in $new_path.
16442 
16443   input_path="$new_path"
16444   # Check if we need to convert this using DOS-style short mode. If the path
16445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16446   # take no chances and rewrite it.
16447   # Note: m4 eats our [], so we need to use [ and ] instead.
16448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16449   if test "x$has_forbidden_chars" != x; then
16450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16451     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16452     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16453     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16454       # Going to short mode and back again did indeed matter. Since short mode is
16455       # case insensitive, let's make it lowercase to improve readability.
16456       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16457       # Now convert it back to Unix-style (cygpath)
16458       input_path=`$CYGPATH -u "$shortmode_path"`
16459       new_path="$input_path"
16460     fi
16461   fi
16462 
16463   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16464   if test "x$test_cygdrive_prefix" = x; then
16465     # As a simple fix, exclude /usr/bin since it's not a real path.
16466     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16467       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16468       # a path prefixed by /cygdrive for fixpath to work.
16469       new_path="$CYGWIN_ROOT_PATH$input_path"
16470     fi
16471   fi
16472 
16473 
16474   if test "x$path" != "x$new_path"; then
16475     TOPDIR="$new_path"
16476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16477 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16478   fi
16479 
16480     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481 
16482   path="$TOPDIR"
16483   has_colon=`$ECHO $path | $GREP ^.:`
16484   new_path="$path"
16485   if test "x$has_colon" = x; then
16486     # Not in mixed or Windows style, start by that.
16487     new_path=`cmd //c echo $path`
16488   fi
16489 
16490 
16491   input_path="$new_path"
16492   # Check if we need to convert this using DOS-style short mode. If the path
16493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16494   # take no chances and rewrite it.
16495   # Note: m4 eats our [], so we need to use [ and ] instead.
16496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16497   if test "x$has_forbidden_chars" != x; then
16498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16499     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16500   fi
16501 
16502 
16503   windows_path="$new_path"
16504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16505     unix_path=`$CYGPATH -u "$windows_path"`
16506     new_path="$unix_path"
16507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16509     new_path="$unix_path"
16510   fi
16511 
16512   if test "x$path" != "x$new_path"; then
16513     TOPDIR="$new_path"
16514     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16515 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16516   fi
16517 
16518   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16519   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16520 
16521     else
16522       # We're on a unix platform. Hooray! :)
16523       path="$TOPDIR"
16524       has_space=`$ECHO "$path" | $GREP " "`
16525       if test "x$has_space" != x; then
16526         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16527 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16528         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16529       fi
16530 
16531       # Use eval to expand a potential ~
16532       eval path="$path"
16533       if test ! -f "$path" && test ! -d "$path"; then
16534         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16535       fi
16536 
16537       if test -d "$path"; then
16538         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16539       else
16540         dir="`$DIRNAME "$path"`"
16541         base="`$BASENAME "$path"`"
16542         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16543       fi
16544     fi
16545   fi
16546 
16547   # SRC_ROOT is a traditional alias for TOPDIR.
16548   SRC_ROOT=$TOPDIR
16549 
16550   # Calculate a canonical version of TOPDIR for string comparisons
16551   CANONICAL_TOPDIR=$TOPDIR
16552 
16553   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16554     # Follow a chain of symbolic links. Use readlink
16555     # where it exists, else fall back to horribly
16556     # complicated shell code.
16557     if test "x$READLINK_TESTED" != yes; then
16558       # On MacOSX there is a readlink tool with a different
16559       # purpose than the GNU readlink tool. Check the found readlink.
16560       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16561       if test "x$ISGNU" = x; then
16562         # A readlink that we do not know how to use.
16563         # Are there other non-GNU readlinks out there?
16564         READLINK_TESTED=yes
16565         READLINK=
16566       fi
16567     fi
16568 
16569     if test "x$READLINK" != x; then
16570       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16571     else
16572       # Save the current directory for restoring afterwards
16573       STARTDIR=$PWD
16574       COUNTER=0
16575       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16576       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16577       cd $sym_link_dir
16578       # Use -P flag to resolve symlinks in directories.
16579       cd `$THEPWDCMD -P`
16580       sym_link_dir=`$THEPWDCMD -P`
16581       # Resolve file symlinks
16582       while test $COUNTER -lt 20; do
16583         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16584         if test "x$ISLINK" == x; then
16585           # This is not a symbolic link! We are done!
16586           break
16587         fi
16588         # Again resolve directory symlinks since the target of the just found
16589         # link could be in a different directory
16590         cd `$DIRNAME $ISLINK`
16591         sym_link_dir=`$THEPWDCMD -P`
16592         sym_link_file=`$BASENAME $ISLINK`
16593         let COUNTER=COUNTER+1
16594       done
16595       cd $STARTDIR
16596       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16597     fi
16598   fi
16599 
16600 
16601 
16602   # Locate the directory of this script.
16603   AUTOCONF_DIR=$TOPDIR/common/autoconf
16604 
16605   # Setup username (for use in adhoc version strings etc)
16606   # Outer [ ] to quote m4.
16607    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16608 
16609 
16610 
16611 # Check if it's a pure open build or if custom sources are to be used.
16612 
16613   # Check whether --enable-openjdk-only was given.
16614 if test "${enable_openjdk_only+set}" = set; then :
16615   enableval=$enable_openjdk_only;
16616 else
16617   enable_openjdk_only="no"
16618 fi
16619 
16620 
16621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16622 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16624 $as_echo "$enable_openjdk_only" >&6; }
16625   if test "x$enable_openjdk_only" = "xyes"; then
16626     SUPPRESS_CUSTOM_EXTENSIONS="true"
16627   elif test "x$enable_openjdk_only" = "xno"; then
16628     SUPPRESS_CUSTOM_EXTENSIONS="false"
16629   else
16630     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16631   fi
16632 
16633   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16634   # the IncludeCustomExtension macro.
16635 
16636 
16637 # Check whether --with-custom-make-dir was given.
16638 if test "${with_custom_make_dir+set}" = set; then :
16639   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
16640 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16641 fi
16642 
16643 
16644 
16645 
16646 # These are needed to be able to create a configuration name (and thus the output directory)
16647 
16648   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16649 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16650 
16651 # Check whether --with-jdk-variant was given.
16652 if test "${with_jdk_variant+set}" = set; then :
16653   withval=$with_jdk_variant;
16654 fi
16655 
16656 
16657   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16658     JDK_VARIANT="normal"
16659   else
16660     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16661   fi
16662 
16663 
16664 
16665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16666 $as_echo "$JDK_VARIANT" >&6; }
16667 
16668 
16669   DEBUG_LEVEL="release"
16670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16671 $as_echo_n "checking which debug level to use... " >&6; }
16672   # Check whether --enable-debug was given.
16673 if test "${enable_debug+set}" = set; then :
16674   enableval=$enable_debug;
16675         ENABLE_DEBUG="${enableval}"
16676         DEBUG_LEVEL="fastdebug"
16677 
16678 else
16679   ENABLE_DEBUG="no"
16680 fi
16681 
16682 
16683 
16684 # Check whether --with-debug-level was given.
16685 if test "${with_debug_level+set}" = set; then :
16686   withval=$with_debug_level;
16687         DEBUG_LEVEL="${withval}"
16688         if test "x$ENABLE_DEBUG" = xyes; then
16689           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16690         fi
16691 
16692 fi
16693 
16694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16695 $as_echo "$DEBUG_LEVEL" >&6; }
16696 
16697   if test "x$DEBUG_LEVEL" != xrelease && \
16698       test "x$DEBUG_LEVEL" != xoptimized && \
16699       test "x$DEBUG_LEVEL" != xfastdebug && \
16700       test "x$DEBUG_LEVEL" != xslowdebug; then
16701     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16702   fi
16703 
16704   # Translate DEBUG_LEVEL to debug level used by Hotspot
16705   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16706   if test "x$DEBUG_LEVEL" = xrelease; then
16707     HOTSPOT_DEBUG_LEVEL="product"
16708   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16709     HOTSPOT_DEBUG_LEVEL="debug"
16710   fi
16711 
16712   if test "x$DEBUG_LEVEL" = xoptimized; then
16713     # The debug level 'optimized' is a little special because it is currently only
16714     # applicable to the HotSpot build where it means to build a completely
16715     # optimized version of the VM without any debugging code (like for the
16716     # 'release' debug level which is called 'product' in the HotSpot build) but
16717     # with the exception that it can contain additional code which is otherwise
16718     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16719     # test new and/or experimental features which are not intended for customer
16720     # shipment. Because these new features need to be tested and benchmarked in
16721     # real world scenarios, we want to build the containing JDK at the 'release'
16722     # debug level.
16723     DEBUG_LEVEL="release"
16724   fi
16725 
16726 
16727 
16728 
16729 
16730 
16731 # Check whether --with-jvm-variants was given.
16732 if test "${with_jvm_variants+set}" = set; then :
16733   withval=$with_jvm_variants;
16734 fi
16735 
16736 
16737 
16738 
16739 # Check whether --with-cpu-port was given.
16740 if test "${with_cpu_port+set}" = set; then :
16741   withval=$with_cpu_port;
16742 fi
16743 
16744 
16745   if test "x$with_cpu_port" != x; then
16746     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16747       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16748     fi
16749 
16750     if test "x$with_cpu_port" != x; then
16751       if test "x$with_cpu_port" != xarm64 && \
16752           test "x$with_cpu_port" != xaarch64; then
16753         as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16754       fi
16755     fi
16756   fi
16757 
16758 
16759   if test "x$with_jvm_variants" = x; then
16760     with_jvm_variants="server"
16761   fi
16762   JVM_VARIANTS_OPT="$with_jvm_variants"
16763 
16764   # Has the user listed more than one variant?
16765   # Additional [] needed to keep m4 from mangling shell constructs.
16766   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16767     BUILDING_MULTIPLE_JVM_VARIANTS=true
16768   else
16769     BUILDING_MULTIPLE_JVM_VARIANTS=false
16770   fi
16771   # Replace the commas with AND for use in the build directory name.
16772   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16773 
16774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16775 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16776   # JVM_VARIANTS is a space-separated list.
16777   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16778   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16780 $as_echo "$JVM_VARIANTS" >&6; }
16781 
16782   # Check that the selected variants are valid
16783 
16784   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16785   # Notice that the original variant failes on SLES 10 and 11
16786   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16787   STACK=${JVM_VARIANTS// /$'\n'}
16788   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16789   if test "x$INVALID_VARIANTS" != x; then
16790     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16791 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16792     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16793   fi
16794 
16795   # All "special" variants share the same output directory ("server")
16796   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16797   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16798   STACK=${JVM_VARIANTS// /$'\n'}
16799   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16800   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16801     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16802   fi
16803 
16804   # The "main" variant is the one used by other libs to link against during the
16805   # build.
16806   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16807     MAIN_VARIANT_PRIO_ORDER="server client minimal"
16808     for variant in $MAIN_VARIANT_PRIO_ORDER; do
16809       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16810         JVM_VARIANT_MAIN="$variant"
16811         break
16812       fi
16813     done
16814   else
16815     JVM_VARIANT_MAIN="$JVM_VARIANTS"
16816   fi
16817 
16818 
16819 
16820 
16821 
16822   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16823     # zero behaves as a platform and rewrites these values. This is really weird. :(
16824     # We are guaranteed that we do not build any other variants when building zero.
16825     HOTSPOT_TARGET_CPU=zero
16826     HOTSPOT_TARGET_CPU_ARCH=zero
16827   fi
16828 
16829 
16830 # With basic setup done, call the custom early hook.
16831 
16832 
16833 # Check if we have devkits, extra paths or sysroot set.
16834 
16835 
16836 # Check whether --with-devkit was given.
16837 if test "${with_devkit+set}" = set; then :
16838   withval=$with_devkit;
16839 
16840   # Only process if variable expands to non-empty
16841 
16842   if test "x$with_devkit" != x; then
16843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844 
16845   # Input might be given as Windows format, start by converting to
16846   # unix format.
16847   path="$with_devkit"
16848   new_path=`$CYGPATH -u "$path"`
16849 
16850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16853   # "foo.exe" is OK but "foo" is an error.
16854   #
16855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16856   # It is also a way to make sure we got the proper file name for the real test later on.
16857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16858   if test "x$test_shortpath" = x; then
16859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16860 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16861     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16862   fi
16863 
16864   # Call helper function which possibly converts this using DOS-style short mode.
16865   # If so, the updated path is stored in $new_path.
16866 
16867   input_path="$new_path"
16868   # Check if we need to convert this using DOS-style short mode. If the path
16869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16870   # take no chances and rewrite it.
16871   # Note: m4 eats our [], so we need to use [ and ] instead.
16872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16873   if test "x$has_forbidden_chars" != x; then
16874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16878       # Going to short mode and back again did indeed matter. Since short mode is
16879       # case insensitive, let's make it lowercase to improve readability.
16880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16881       # Now convert it back to Unix-style (cygpath)
16882       input_path=`$CYGPATH -u "$shortmode_path"`
16883       new_path="$input_path"
16884     fi
16885   fi
16886 
16887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16888   if test "x$test_cygdrive_prefix" = x; then
16889     # As a simple fix, exclude /usr/bin since it's not a real path.
16890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16892       # a path prefixed by /cygdrive for fixpath to work.
16893       new_path="$CYGWIN_ROOT_PATH$input_path"
16894     fi
16895   fi
16896 
16897 
16898   if test "x$path" != "x$new_path"; then
16899     with_devkit="$new_path"
16900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16901 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16902   fi
16903 
16904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16905 
16906   path="$with_devkit"
16907   has_colon=`$ECHO $path | $GREP ^.:`
16908   new_path="$path"
16909   if test "x$has_colon" = x; then
16910     # Not in mixed or Windows style, start by that.
16911     new_path=`cmd //c echo $path`
16912   fi
16913 
16914 
16915   input_path="$new_path"
16916   # Check if we need to convert this using DOS-style short mode. If the path
16917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16918   # take no chances and rewrite it.
16919   # Note: m4 eats our [], so we need to use [ and ] instead.
16920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16921   if test "x$has_forbidden_chars" != x; then
16922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16924   fi
16925 
16926 
16927   windows_path="$new_path"
16928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16929     unix_path=`$CYGPATH -u "$windows_path"`
16930     new_path="$unix_path"
16931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16933     new_path="$unix_path"
16934   fi
16935 
16936   if test "x$path" != "x$new_path"; then
16937     with_devkit="$new_path"
16938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16939 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16940   fi
16941 
16942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16944 
16945     else
16946       # We're on a unix platform. Hooray! :)
16947       path="$with_devkit"
16948       has_space=`$ECHO "$path" | $GREP " "`
16949       if test "x$has_space" != x; then
16950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16951 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16953       fi
16954 
16955       # Use eval to expand a potential ~
16956       eval path="$path"
16957       if test ! -f "$path" && test ! -d "$path"; then
16958         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16959       fi
16960 
16961       if test -d "$path"; then
16962         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16963       else
16964         dir="`$DIRNAME "$path"`"
16965         base="`$BASENAME "$path"`"
16966         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16967       fi
16968     fi
16969   fi
16970 
16971         DEVKIT_ROOT="$with_devkit"
16972         # Check for a meta data info file in the root of the devkit
16973         if test -f "$DEVKIT_ROOT/devkit.info"; then
16974           . $DEVKIT_ROOT/devkit.info
16975           # This potentially sets the following:
16976           # A descriptive name of the devkit
16977 
16978   if test "x$DEVKIT_NAME" = x; then
16979     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16980   fi
16981 
16982           # Corresponds to --with-extra-path
16983 
16984   if test "x$DEVKIT_EXTRA_PATH" = x; then
16985     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16986   fi
16987 
16988           # Corresponds to --with-toolchain-path
16989 
16990   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16991     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16992   fi
16993 
16994           # Corresponds to --with-sysroot
16995 
16996   if test "x$DEVKIT_SYSROOT" = x; then
16997     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16998   fi
16999 
17000 
17001           # Identifies the Visual Studio version in the devkit
17002 
17003   if test "x$DEVKIT_VS_VERSION" = x; then
17004     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17005   fi
17006 
17007           # The Visual Studio include environment variable
17008 
17009   if test "x$DEVKIT_VS_INCLUDE" = x; then
17010     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17011   fi
17012 
17013           # The Visual Studio lib environment variable
17014 
17015   if test "x$DEVKIT_VS_LIB" = x; then
17016     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17017   fi
17018 
17019           # Corresponds to --with-msvcr-dll
17020 
17021   if test "x$DEVKIT_MSVCR_DLL" = x; then
17022     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17023   fi
17024 
17025           # Corresponds to --with-msvcp-dll
17026 
17027   if test "x$DEVKIT_MSVCP_DLL" = x; then
17028     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17029   fi
17030 
17031         fi
17032 
17033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17034 $as_echo_n "checking for devkit... " >&6; }
17035         if test "x$DEVKIT_NAME" != x; then
17036           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17037 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17038         else
17039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17040 $as_echo "$DEVKIT_ROOT" >&6; }
17041         fi
17042 
17043 
17044   if test "x$DEVKIT_EXTRA_PATH" != x; then
17045     if test "x$EXTRA_PATH" = x; then
17046       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17047     else
17048       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17049     fi
17050   fi
17051 
17052 
17053         # Fallback default of just /bin if DEVKIT_PATH is not defined
17054         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17055           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17056         fi
17057 
17058   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17059     if test "x$TOOLCHAIN_PATH" = x; then
17060       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17061     else
17062       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17063     fi
17064   fi
17065 
17066 
17067         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17068         # places for backwards compatiblity.
17069         if test "x$DEVKIT_SYSROOT" != x; then
17070           SYSROOT="$DEVKIT_SYSROOT"
17071         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17072           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17073         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17074           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17075         fi
17076 
17077 
17078 fi
17079 
17080 
17081   # You can force the sysroot if the sysroot encoded into the compiler tools
17082   # is not correct.
17083 
17084 # Check whether --with-sys-root was given.
17085 if test "${with_sys_root+set}" = set; then :
17086   withval=$with_sys_root; SYSROOT=$with_sys_root
17087 
17088 fi
17089 
17090 
17091 
17092 # Check whether --with-sysroot was given.
17093 if test "${with_sysroot+set}" = set; then :
17094   withval=$with_sysroot; SYSROOT=$with_sysroot
17095 
17096 fi
17097 
17098 
17099 
17100 # Check whether --with-tools-dir was given.
17101 if test "${with_tools_dir+set}" = set; then :
17102   withval=$with_tools_dir;
17103   if test "x$with_tools_dir" != x; then
17104     if test "x$TOOLCHAIN_PATH" = x; then
17105       TOOLCHAIN_PATH="$with_tools_dir"
17106     else
17107       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17108     fi
17109   fi
17110 
17111 
17112 fi
17113 
17114 
17115 
17116 # Check whether --with-toolchain-path was given.
17117 if test "${with_toolchain_path+set}" = set; then :
17118   withval=$with_toolchain_path;
17119   if test "x$with_toolchain_path" != x; then
17120     if test "x$TOOLCHAIN_PATH" = x; then
17121       TOOLCHAIN_PATH="$with_toolchain_path"
17122     else
17123       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17124     fi
17125   fi
17126 
17127 
17128 fi
17129 
17130 
17131 
17132 # Check whether --with-extra-path was given.
17133 if test "${with_extra_path+set}" = set; then :
17134   withval=$with_extra_path;
17135   if test "x$with_extra_path" != x; then
17136     if test "x$EXTRA_PATH" = x; then
17137       EXTRA_PATH="$with_extra_path"
17138     else
17139       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17140     fi
17141   fi
17142 
17143 
17144 fi
17145 
17146 
17147   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17148     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17149     # If not, detect if Xcode is installed by running xcodebuild -version
17150     # if no Xcode installed, xcodebuild exits with 1
17151     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17152     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17153       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17154       # fall back on the stub binary in /usr/bin/xcodebuild
17155       # Extract the first word of "xcodebuild", so it can be a program name with args.
17156 set dummy xcodebuild; ac_word=$2
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17158 $as_echo_n "checking for $ac_word... " >&6; }
17159 if ${ac_cv_path_XCODEBUILD+:} false; then :
17160   $as_echo_n "(cached) " >&6
17161 else
17162   case $XCODEBUILD in
17163   [\\/]* | ?:[\\/]*)
17164   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17165   ;;
17166   *)
17167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17168 for as_dir in $TOOLCHAIN_PATH
17169 do
17170   IFS=$as_save_IFS
17171   test -z "$as_dir" && as_dir=.
17172     for ac_exec_ext in '' $ac_executable_extensions; do
17173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17174     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17176     break 2
17177   fi
17178 done
17179   done
17180 IFS=$as_save_IFS
17181 
17182   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17183   ;;
17184 esac
17185 fi
17186 XCODEBUILD=$ac_cv_path_XCODEBUILD
17187 if test -n "$XCODEBUILD"; then
17188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17189 $as_echo "$XCODEBUILD" >&6; }
17190 else
17191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17192 $as_echo "no" >&6; }
17193 fi
17194 
17195 
17196     else
17197       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17198       # when only the command line tools are installed there are no SDKs, so headers
17199       # are copied into the system frameworks
17200       XCODEBUILD=
17201 
17202     fi
17203 
17204     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17205 $as_echo_n "checking for sdk name... " >&6; }
17206 
17207 # Check whether --with-sdk-name was given.
17208 if test "${with_sdk_name+set}" = set; then :
17209   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17210 
17211 fi
17212 
17213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17214 $as_echo "$SDKNAME" >&6; }
17215 
17216     # if toolchain path is specified then don't rely on system headers, they may not compile
17217     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17218     test -z "$TOOLCHAIN_PATH" && \
17219       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17220 
17221     if test -z "$SYSROOT"; then
17222       if test -n "$XCODEBUILD"; then
17223         # if we don't have system headers, use default SDK name (last resort)
17224         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17225           SDKNAME=${SDKNAME:-macosx}
17226         fi
17227 
17228         if test -n "$SDKNAME"; then
17229           # Call xcodebuild to determine SYSROOT
17230           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17231         fi
17232       else
17233         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17234           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
17235         fi
17236       fi
17237     else
17238       # warn user if --with-sdk-name was also set
17239       if test -n "$with_sdk_name"; then
17240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17241 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17242       fi
17243     fi
17244 
17245     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17246       # If no system framework headers, then SYSROOT must be set, or we won't build
17247       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
17248     fi
17249 
17250     # Perform a basic sanity test
17251     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17252       if test -z "$SYSROOT"; then
17253         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
17254       else
17255         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17256       fi
17257     fi
17258 
17259     # set SDKROOT too, Xcode tools will pick it up
17260     SDKROOT=$SYSROOT
17261 
17262   fi
17263 
17264   # Prepend the extra path to the global path
17265 
17266   if test "x$EXTRA_PATH" != x; then
17267     if test "x$PATH" = x; then
17268       PATH="$EXTRA_PATH"
17269     else
17270       PATH="$EXTRA_PATH:$PATH"
17271     fi
17272   fi
17273 
17274 
17275   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17276 $as_echo_n "checking for sysroot... " >&6; }
17277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17278 $as_echo "$SYSROOT" >&6; }
17279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17280 $as_echo_n "checking for toolchain path... " >&6; }
17281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17282 $as_echo "$TOOLCHAIN_PATH" >&6; }
17283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17284 $as_echo_n "checking for extra path... " >&6; }
17285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17286 $as_echo "$EXTRA_PATH" >&6; }
17287 
17288 
17289 # To properly create a configuration name, we need to have the OpenJDK target
17290 # and options (variants and debug level) parsed.
17291 
17292 
17293 
17294 # Check whether --with-conf-name was given.
17295 if test "${with_conf_name+set}" = set; then :
17296   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17297 fi
17298 
17299 
17300   # Test from where we are running configure, in or outside of src root.
17301   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17302 $as_echo_n "checking where to store configuration... " >&6; }
17303   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17304       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17305       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17306     # We are running configure from the src root.
17307     # Create a default ./build/target-variant-debuglevel output root.
17308     if test "x${CONF_NAME}" = x; then
17309       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17310 $as_echo "in default location" >&6; }
17311       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17312     else
17313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17314 $as_echo "in build directory with custom name" >&6; }
17315     fi
17316     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17317     $MKDIR -p "$OUTPUT_ROOT"
17318     if test ! -d "$OUTPUT_ROOT"; then
17319       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17320     fi
17321   else
17322     # We are running configure from outside of the src dir.
17323     # Then use the current directory as output dir!
17324     # If configuration is situated in normal build directory, just use the build
17325     # directory name as configuration name, otherwise use the complete path.
17326     if test "x${CONF_NAME}" = x; then
17327       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17328     fi
17329     OUTPUT_ROOT="$CURDIR"
17330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17331 $as_echo "in current directory" >&6; }
17332 
17333     # WARNING: This might be a bad thing to do. You need to be sure you want to
17334     # have a configuration in this directory. Do some sanity checks!
17335 
17336     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17337       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17338       # other files
17339       files_present=`$LS $OUTPUT_ROOT`
17340       # Configure has already touched config.log and confdefs.h in the current dir when this check
17341       # is performed.
17342       filtered_files=`$ECHO "$files_present" \
17343           | $SED -e 's/config.log//g' \
17344               -e 's/configure.log//g' \
17345               -e 's/confdefs.h//g' \
17346               -e 's/ //g' \
17347           | $TR -d '\n'`
17348       if test "x$filtered_files" != x; then
17349         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17350 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17351         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17352 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17353         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17354 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17355         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17356 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17357         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17358 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17359         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17360 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17361         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17362 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17363         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17364       fi
17365     fi
17366   fi
17367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17368 $as_echo_n "checking what configuration name to use... " >&6; }
17369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17370 $as_echo "$CONF_NAME" >&6; }
17371 
17372 
17373   # Only process if variable expands to non-empty
17374 
17375   if test "x$OUTPUT_ROOT" != x; then
17376     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17377 
17378   # Input might be given as Windows format, start by converting to
17379   # unix format.
17380   path="$OUTPUT_ROOT"
17381   new_path=`$CYGPATH -u "$path"`
17382 
17383   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17384   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17385   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17386   # "foo.exe" is OK but "foo" is an error.
17387   #
17388   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17389   # It is also a way to make sure we got the proper file name for the real test later on.
17390   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17391   if test "x$test_shortpath" = x; then
17392     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17393 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17394     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17395   fi
17396 
17397   # Call helper function which possibly converts this using DOS-style short mode.
17398   # If so, the updated path is stored in $new_path.
17399 
17400   input_path="$new_path"
17401   # Check if we need to convert this using DOS-style short mode. If the path
17402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17403   # take no chances and rewrite it.
17404   # Note: m4 eats our [], so we need to use [ and ] instead.
17405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17406   if test "x$has_forbidden_chars" != x; then
17407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17408     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17409     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17410     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17411       # Going to short mode and back again did indeed matter. Since short mode is
17412       # case insensitive, let's make it lowercase to improve readability.
17413       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17414       # Now convert it back to Unix-style (cygpath)
17415       input_path=`$CYGPATH -u "$shortmode_path"`
17416       new_path="$input_path"
17417     fi
17418   fi
17419 
17420   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17421   if test "x$test_cygdrive_prefix" = x; then
17422     # As a simple fix, exclude /usr/bin since it's not a real path.
17423     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17424       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17425       # a path prefixed by /cygdrive for fixpath to work.
17426       new_path="$CYGWIN_ROOT_PATH$input_path"
17427     fi
17428   fi
17429 
17430 
17431   if test "x$path" != "x$new_path"; then
17432     OUTPUT_ROOT="$new_path"
17433     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17434 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17435   fi
17436 
17437     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17438 
17439   path="$OUTPUT_ROOT"
17440   has_colon=`$ECHO $path | $GREP ^.:`
17441   new_path="$path"
17442   if test "x$has_colon" = x; then
17443     # Not in mixed or Windows style, start by that.
17444     new_path=`cmd //c echo $path`
17445   fi
17446 
17447 
17448   input_path="$new_path"
17449   # Check if we need to convert this using DOS-style short mode. If the path
17450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17451   # take no chances and rewrite it.
17452   # Note: m4 eats our [], so we need to use [ and ] instead.
17453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17454   if test "x$has_forbidden_chars" != x; then
17455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17457   fi
17458 
17459 
17460   windows_path="$new_path"
17461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17462     unix_path=`$CYGPATH -u "$windows_path"`
17463     new_path="$unix_path"
17464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17466     new_path="$unix_path"
17467   fi
17468 
17469   if test "x$path" != "x$new_path"; then
17470     OUTPUT_ROOT="$new_path"
17471     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17472 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17473   fi
17474 
17475   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17476   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17477 
17478     else
17479       # We're on a unix platform. Hooray! :)
17480       path="$OUTPUT_ROOT"
17481       has_space=`$ECHO "$path" | $GREP " "`
17482       if test "x$has_space" != x; then
17483         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17484 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17485         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17486       fi
17487 
17488       # Use eval to expand a potential ~
17489       eval path="$path"
17490       if test ! -f "$path" && test ! -d "$path"; then
17491         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17492       fi
17493 
17494       if test -d "$path"; then
17495         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17496       else
17497         dir="`$DIRNAME "$path"`"
17498         base="`$BASENAME "$path"`"
17499         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17500       fi
17501     fi
17502   fi
17503 
17504 
17505   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17506   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17507 
17508   SPEC=$OUTPUT_ROOT/spec.gmk
17509 
17510   CONF_NAME=$CONF_NAME
17511 
17512   OUTPUT_ROOT=$OUTPUT_ROOT
17513 
17514 
17515 
17516   # The spec.gmk file contains all variables for the make system.
17517   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17518 
17519   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17520   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17521 
17522   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17523   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17524 
17525   # The compare.sh is used to compare the build output to other builds.
17526   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17527 
17528   # The generated Makefile knows where the spec.gmk is and where the source is.
17529   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17530   # which will look for generated configurations
17531   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17532 
17533 
17534 
17535 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17536 
17537   for ac_prog in apt-get yum port pkgutil pkgadd
17538 do
17539   # Extract the first word of "$ac_prog", so it can be a program name with args.
17540 set dummy $ac_prog; ac_word=$2
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17542 $as_echo_n "checking for $ac_word... " >&6; }
17543 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17544   $as_echo_n "(cached) " >&6
17545 else
17546   if test -n "$PKGHANDLER"; then
17547   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17548 else
17549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17550 for as_dir in $PATH
17551 do
17552   IFS=$as_save_IFS
17553   test -z "$as_dir" && as_dir=.
17554     for ac_exec_ext in '' $ac_executable_extensions; do
17555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17556     ac_cv_prog_PKGHANDLER="$ac_prog"
17557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17558     break 2
17559   fi
17560 done
17561   done
17562 IFS=$as_save_IFS
17563 
17564 fi
17565 fi
17566 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17567 if test -n "$PKGHANDLER"; then
17568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17569 $as_echo "$PKGHANDLER" >&6; }
17570 else
17571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17572 $as_echo "no" >&6; }
17573 fi
17574 
17575 
17576   test -n "$PKGHANDLER" && break
17577 done
17578 
17579 
17580 
17581 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17582 
17583 
17584 
17585   # Publish this variable in the help.
17586 
17587 
17588   if [ -z "${MAKE+x}" ]; then
17589     # The variable is not set by user, try to locate tool using the code snippet
17590 
17591     # Try our hardest to locate a correct version of GNU make
17592     for ac_prog in gmake
17593 do
17594   # Extract the first word of "$ac_prog", so it can be a program name with args.
17595 set dummy $ac_prog; ac_word=$2
17596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17597 $as_echo_n "checking for $ac_word... " >&6; }
17598 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17599   $as_echo_n "(cached) " >&6
17600 else
17601   case $CHECK_GMAKE in
17602   [\\/]* | ?:[\\/]*)
17603   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17604   ;;
17605   *)
17606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17607 for as_dir in $PATH
17608 do
17609   IFS=$as_save_IFS
17610   test -z "$as_dir" && as_dir=.
17611     for ac_exec_ext in '' $ac_executable_extensions; do
17612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17613     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17615     break 2
17616   fi
17617 done
17618   done
17619 IFS=$as_save_IFS
17620 
17621   ;;
17622 esac
17623 fi
17624 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17625 if test -n "$CHECK_GMAKE"; then
17626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17627 $as_echo "$CHECK_GMAKE" >&6; }
17628 else
17629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17630 $as_echo "no" >&6; }
17631 fi
17632 
17633 
17634   test -n "$CHECK_GMAKE" && break
17635 done
17636 
17637 
17638   MAKE_CANDIDATE=""$CHECK_GMAKE""
17639   DESCRIPTION="gmake in PATH"
17640 
17641   # On Cygwin, we require a newer version of make than on other platforms
17642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17643     MAKE_VERSION_EXPR="-e 4\."
17644     MAKE_REQUIRED_VERSION="4.0"
17645    else
17646     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17647     MAKE_REQUIRED_VERSION="3.81"
17648   fi
17649 
17650   if test "x$MAKE_CANDIDATE" != x; then
17651     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17652 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17653     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17654     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17655     if test "x$IS_GNU_MAKE" = x; then
17656       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17657 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17658     else
17659       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17660       if test "x$IS_MODERN_MAKE" = x; then
17661         { $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
17662 $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;}
17663       else
17664         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17665           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17666             MAKE_EXPECTED_ENV='cygwin'
17667           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17668             MAKE_EXPECTED_ENV='msys'
17669           else
17670             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17671           fi
17672           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17673           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17674         else
17675           # Not relevant for non-Windows
17676           IS_MAKE_CORRECT_ENV=true
17677         fi
17678         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17679           { $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
17680 $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;}
17681         else
17682           FOUND_MAKE=$MAKE_CANDIDATE
17683 
17684   # Only process if variable expands to non-empty
17685 
17686   if test "x$FOUND_MAKE" != x; then
17687     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17688 
17689   # First separate the path from the arguments. This will split at the first
17690   # space.
17691   complete="$FOUND_MAKE"
17692   path="${complete%% *}"
17693   tmp="$complete EOL"
17694   arguments="${tmp#* }"
17695 
17696   # Input might be given as Windows format, start by converting to
17697   # unix format.
17698   new_path=`$CYGPATH -u "$path"`
17699 
17700   # Now try to locate executable using which
17701   new_path=`$WHICH "$new_path" 2> /dev/null`
17702   # bat and cmd files are not always considered executable in cygwin causing which
17703   # to not find them
17704   if test "x$new_path" = x \
17705       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17706       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17707     new_path=`$CYGPATH -u "$path"`
17708   fi
17709   if test "x$new_path" = x; then
17710     # Oops. Which didn't find the executable.
17711     # The splitting of arguments from the executable at a space might have been incorrect,
17712     # since paths with space are more likely in Windows. Give it another try with the whole
17713     # argument.
17714     path="$complete"
17715     arguments="EOL"
17716     new_path=`$CYGPATH -u "$path"`
17717     new_path=`$WHICH "$new_path" 2> /dev/null`
17718     # bat and cmd files are not always considered executable in cygwin causing which
17719     # to not find them
17720     if test "x$new_path" = x \
17721         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17722         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17723       new_path=`$CYGPATH -u "$path"`
17724     fi
17725     if test "x$new_path" = x; then
17726       # It's still not found. Now this is an unrecoverable error.
17727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17728 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17729       has_space=`$ECHO "$complete" | $GREP " "`
17730       if test "x$has_space" != x; then
17731         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17733       fi
17734       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17735     fi
17736   fi
17737 
17738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17741   # "foo.exe" is OK but "foo" is an error.
17742   #
17743   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17744   # It is also a way to make sure we got the proper file name for the real test later on.
17745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17746   if test "x$test_shortpath" = x; then
17747     # Short path failed, file does not exist as specified.
17748     # Try adding .exe or .cmd
17749     if test -f "${new_path}.exe"; then
17750       input_to_shortpath="${new_path}.exe"
17751     elif test -f "${new_path}.cmd"; then
17752       input_to_shortpath="${new_path}.cmd"
17753     else
17754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17755 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17756       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17757 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17758       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17759     fi
17760   else
17761     input_to_shortpath="$new_path"
17762   fi
17763 
17764   # Call helper function which possibly converts this using DOS-style short mode.
17765   # If so, the updated path is stored in $new_path.
17766   new_path="$input_to_shortpath"
17767 
17768   input_path="$input_to_shortpath"
17769   # Check if we need to convert this using DOS-style short mode. If the path
17770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17771   # take no chances and rewrite it.
17772   # Note: m4 eats our [], so we need to use [ and ] instead.
17773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17774   if test "x$has_forbidden_chars" != x; then
17775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17779       # Going to short mode and back again did indeed matter. Since short mode is
17780       # case insensitive, let's make it lowercase to improve readability.
17781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17782       # Now convert it back to Unix-style (cygpath)
17783       input_path=`$CYGPATH -u "$shortmode_path"`
17784       new_path="$input_path"
17785     fi
17786   fi
17787 
17788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17789   if test "x$test_cygdrive_prefix" = x; then
17790     # As a simple fix, exclude /usr/bin since it's not a real path.
17791     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17793       # a path prefixed by /cygdrive for fixpath to work.
17794       new_path="$CYGWIN_ROOT_PATH$input_path"
17795     fi
17796   fi
17797 
17798   # remove trailing .exe if any
17799   new_path="${new_path/%.exe/}"
17800 
17801     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17802 
17803   # First separate the path from the arguments. This will split at the first
17804   # space.
17805   complete="$FOUND_MAKE"
17806   path="${complete%% *}"
17807   tmp="$complete EOL"
17808   arguments="${tmp#* }"
17809 
17810   # Input might be given as Windows format, start by converting to
17811   # unix format.
17812   new_path="$path"
17813 
17814   windows_path="$new_path"
17815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17816     unix_path=`$CYGPATH -u "$windows_path"`
17817     new_path="$unix_path"
17818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17820     new_path="$unix_path"
17821   fi
17822 
17823 
17824   # Now try to locate executable using which
17825   new_path=`$WHICH "$new_path" 2> /dev/null`
17826 
17827   if test "x$new_path" = x; then
17828     # Oops. Which didn't find the executable.
17829     # The splitting of arguments from the executable at a space might have been incorrect,
17830     # since paths with space are more likely in Windows. Give it another try with the whole
17831     # argument.
17832     path="$complete"
17833     arguments="EOL"
17834     new_path="$path"
17835 
17836   windows_path="$new_path"
17837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17838     unix_path=`$CYGPATH -u "$windows_path"`
17839     new_path="$unix_path"
17840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17842     new_path="$unix_path"
17843   fi
17844 
17845 
17846     new_path=`$WHICH "$new_path" 2> /dev/null`
17847     # bat and cmd files are not always considered executable in MSYS causing which
17848     # to not find them
17849     if test "x$new_path" = x \
17850         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17851         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17852       new_path="$path"
17853 
17854   windows_path="$new_path"
17855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17856     unix_path=`$CYGPATH -u "$windows_path"`
17857     new_path="$unix_path"
17858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17860     new_path="$unix_path"
17861   fi
17862 
17863     fi
17864 
17865     if test "x$new_path" = x; then
17866       # It's still not found. Now this is an unrecoverable error.
17867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17868 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17869       has_space=`$ECHO "$complete" | $GREP " "`
17870       if test "x$has_space" != x; then
17871         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17872 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17873       fi
17874       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17875     fi
17876   fi
17877 
17878   # Now new_path has a complete unix path to the binary
17879   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17880     # Keep paths in /bin as-is, but remove trailing .exe if any
17881     new_path="${new_path/%.exe/}"
17882     # Do not save /bin paths to all_fixpath_prefixes!
17883   else
17884     # Not in mixed or Windows style, start by that.
17885     new_path=`cmd //c echo $new_path`
17886 
17887   input_path="$new_path"
17888   # Check if we need to convert this using DOS-style short mode. If the path
17889   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17890   # take no chances and rewrite it.
17891   # Note: m4 eats our [], so we need to use [ and ] instead.
17892   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17893   if test "x$has_forbidden_chars" != x; then
17894     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17895     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17896   fi
17897 
17898     # Output is in $new_path
17899 
17900   windows_path="$new_path"
17901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17902     unix_path=`$CYGPATH -u "$windows_path"`
17903     new_path="$unix_path"
17904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17906     new_path="$unix_path"
17907   fi
17908 
17909     # remove trailing .exe if any
17910     new_path="${new_path/%.exe/}"
17911 
17912     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17913     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17914   fi
17915 
17916     else
17917       # We're on a unix platform. Hooray! :)
17918       # First separate the path from the arguments. This will split at the first
17919       # space.
17920       complete="$FOUND_MAKE"
17921       path="${complete%% *}"
17922       tmp="$complete EOL"
17923       arguments="${tmp#* }"
17924 
17925       # Cannot rely on the command "which" here since it doesn't always work.
17926       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17927       if test -z "$is_absolute_path"; then
17928         # Path to executable is not absolute. Find it.
17929         IFS_save="$IFS"
17930         IFS=:
17931         for p in $PATH; do
17932           if test -f "$p/$path" && test -x "$p/$path"; then
17933             new_path="$p/$path"
17934             break
17935           fi
17936         done
17937         IFS="$IFS_save"
17938       else
17939         # This is an absolute path, we can use it without further modifications.
17940         new_path="$path"
17941       fi
17942 
17943       if test "x$new_path" = x; then
17944         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17945 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17946         has_space=`$ECHO "$complete" | $GREP " "`
17947         if test "x$has_space" != x; then
17948           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17949 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17950         fi
17951         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17952       fi
17953     fi
17954 
17955     # Now join together the path and the arguments once again
17956     if test "x$arguments" != xEOL; then
17957       new_complete="$new_path ${arguments% *}"
17958     else
17959       new_complete="$new_path"
17960     fi
17961 
17962     if test "x$complete" != "x$new_complete"; then
17963       FOUND_MAKE="$new_complete"
17964       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17965 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17966     fi
17967   fi
17968 
17969         fi
17970       fi
17971     fi
17972   fi
17973 
17974 
17975     if test "x$FOUND_MAKE" = x; then
17976       for ac_prog in make
17977 do
17978   # Extract the first word of "$ac_prog", so it can be a program name with args.
17979 set dummy $ac_prog; ac_word=$2
17980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17981 $as_echo_n "checking for $ac_word... " >&6; }
17982 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17983   $as_echo_n "(cached) " >&6
17984 else
17985   case $CHECK_MAKE in
17986   [\\/]* | ?:[\\/]*)
17987   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17988   ;;
17989   *)
17990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17991 for as_dir in $PATH
17992 do
17993   IFS=$as_save_IFS
17994   test -z "$as_dir" && as_dir=.
17995     for ac_exec_ext in '' $ac_executable_extensions; do
17996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17997     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17999     break 2
18000   fi
18001 done
18002   done
18003 IFS=$as_save_IFS
18004 
18005   ;;
18006 esac
18007 fi
18008 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18009 if test -n "$CHECK_MAKE"; then
18010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18011 $as_echo "$CHECK_MAKE" >&6; }
18012 else
18013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18014 $as_echo "no" >&6; }
18015 fi
18016 
18017 
18018   test -n "$CHECK_MAKE" && break
18019 done
18020 
18021 
18022   MAKE_CANDIDATE=""$CHECK_MAKE""
18023   DESCRIPTION="make in PATH"
18024 
18025   # On Cygwin, we require a newer version of make than on other platforms
18026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18027     MAKE_VERSION_EXPR="-e 4\."
18028     MAKE_REQUIRED_VERSION="4.0"
18029    else
18030     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18031     MAKE_REQUIRED_VERSION="3.81"
18032   fi
18033 
18034   if test "x$MAKE_CANDIDATE" != x; then
18035     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18036 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18037     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18038     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18039     if test "x$IS_GNU_MAKE" = x; then
18040       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18041 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18042     else
18043       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18044       if test "x$IS_MODERN_MAKE" = x; then
18045         { $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
18046 $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;}
18047       else
18048         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18049           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18050             MAKE_EXPECTED_ENV='cygwin'
18051           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18052             MAKE_EXPECTED_ENV='msys'
18053           else
18054             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18055           fi
18056           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18057           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18058         else
18059           # Not relevant for non-Windows
18060           IS_MAKE_CORRECT_ENV=true
18061         fi
18062         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18063           { $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
18064 $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;}
18065         else
18066           FOUND_MAKE=$MAKE_CANDIDATE
18067 
18068   # Only process if variable expands to non-empty
18069 
18070   if test "x$FOUND_MAKE" != x; then
18071     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18072 
18073   # First separate the path from the arguments. This will split at the first
18074   # space.
18075   complete="$FOUND_MAKE"
18076   path="${complete%% *}"
18077   tmp="$complete EOL"
18078   arguments="${tmp#* }"
18079 
18080   # Input might be given as Windows format, start by converting to
18081   # unix format.
18082   new_path=`$CYGPATH -u "$path"`
18083 
18084   # Now try to locate executable using which
18085   new_path=`$WHICH "$new_path" 2> /dev/null`
18086   # bat and cmd files are not always considered executable in cygwin causing which
18087   # to not find them
18088   if test "x$new_path" = x \
18089       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18090       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18091     new_path=`$CYGPATH -u "$path"`
18092   fi
18093   if test "x$new_path" = x; then
18094     # Oops. Which didn't find the executable.
18095     # The splitting of arguments from the executable at a space might have been incorrect,
18096     # since paths with space are more likely in Windows. Give it another try with the whole
18097     # argument.
18098     path="$complete"
18099     arguments="EOL"
18100     new_path=`$CYGPATH -u "$path"`
18101     new_path=`$WHICH "$new_path" 2> /dev/null`
18102     # bat and cmd files are not always considered executable in cygwin causing which
18103     # to not find them
18104     if test "x$new_path" = x \
18105         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18106         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18107       new_path=`$CYGPATH -u "$path"`
18108     fi
18109     if test "x$new_path" = x; then
18110       # It's still not found. Now this is an unrecoverable error.
18111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18112 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18113       has_space=`$ECHO "$complete" | $GREP " "`
18114       if test "x$has_space" != x; then
18115         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18116 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18117       fi
18118       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18119     fi
18120   fi
18121 
18122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18125   # "foo.exe" is OK but "foo" is an error.
18126   #
18127   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18128   # It is also a way to make sure we got the proper file name for the real test later on.
18129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18130   if test "x$test_shortpath" = x; then
18131     # Short path failed, file does not exist as specified.
18132     # Try adding .exe or .cmd
18133     if test -f "${new_path}.exe"; then
18134       input_to_shortpath="${new_path}.exe"
18135     elif test -f "${new_path}.cmd"; then
18136       input_to_shortpath="${new_path}.cmd"
18137     else
18138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18139 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18140       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18141 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18142       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18143     fi
18144   else
18145     input_to_shortpath="$new_path"
18146   fi
18147 
18148   # Call helper function which possibly converts this using DOS-style short mode.
18149   # If so, the updated path is stored in $new_path.
18150   new_path="$input_to_shortpath"
18151 
18152   input_path="$input_to_shortpath"
18153   # Check if we need to convert this using DOS-style short mode. If the path
18154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18155   # take no chances and rewrite it.
18156   # Note: m4 eats our [], so we need to use [ and ] instead.
18157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18158   if test "x$has_forbidden_chars" != x; then
18159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18160     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18161     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18162     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18163       # Going to short mode and back again did indeed matter. Since short mode is
18164       # case insensitive, let's make it lowercase to improve readability.
18165       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18166       # Now convert it back to Unix-style (cygpath)
18167       input_path=`$CYGPATH -u "$shortmode_path"`
18168       new_path="$input_path"
18169     fi
18170   fi
18171 
18172   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18173   if test "x$test_cygdrive_prefix" = x; then
18174     # As a simple fix, exclude /usr/bin since it's not a real path.
18175     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18176       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18177       # a path prefixed by /cygdrive for fixpath to work.
18178       new_path="$CYGWIN_ROOT_PATH$input_path"
18179     fi
18180   fi
18181 
18182   # remove trailing .exe if any
18183   new_path="${new_path/%.exe/}"
18184 
18185     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18186 
18187   # First separate the path from the arguments. This will split at the first
18188   # space.
18189   complete="$FOUND_MAKE"
18190   path="${complete%% *}"
18191   tmp="$complete EOL"
18192   arguments="${tmp#* }"
18193 
18194   # Input might be given as Windows format, start by converting to
18195   # unix format.
18196   new_path="$path"
18197 
18198   windows_path="$new_path"
18199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18200     unix_path=`$CYGPATH -u "$windows_path"`
18201     new_path="$unix_path"
18202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18203     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18204     new_path="$unix_path"
18205   fi
18206 
18207 
18208   # Now try to locate executable using which
18209   new_path=`$WHICH "$new_path" 2> /dev/null`
18210 
18211   if test "x$new_path" = x; then
18212     # Oops. Which didn't find the executable.
18213     # The splitting of arguments from the executable at a space might have been incorrect,
18214     # since paths with space are more likely in Windows. Give it another try with the whole
18215     # argument.
18216     path="$complete"
18217     arguments="EOL"
18218     new_path="$path"
18219 
18220   windows_path="$new_path"
18221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18222     unix_path=`$CYGPATH -u "$windows_path"`
18223     new_path="$unix_path"
18224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18226     new_path="$unix_path"
18227   fi
18228 
18229 
18230     new_path=`$WHICH "$new_path" 2> /dev/null`
18231     # bat and cmd files are not always considered executable in MSYS causing which
18232     # to not find them
18233     if test "x$new_path" = x \
18234         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18235         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18236       new_path="$path"
18237 
18238   windows_path="$new_path"
18239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18240     unix_path=`$CYGPATH -u "$windows_path"`
18241     new_path="$unix_path"
18242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18244     new_path="$unix_path"
18245   fi
18246 
18247     fi
18248 
18249     if test "x$new_path" = x; then
18250       # It's still not found. Now this is an unrecoverable error.
18251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18252 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18253       has_space=`$ECHO "$complete" | $GREP " "`
18254       if test "x$has_space" != x; then
18255         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18256 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18257       fi
18258       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18259     fi
18260   fi
18261 
18262   # Now new_path has a complete unix path to the binary
18263   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18264     # Keep paths in /bin as-is, but remove trailing .exe if any
18265     new_path="${new_path/%.exe/}"
18266     # Do not save /bin paths to all_fixpath_prefixes!
18267   else
18268     # Not in mixed or Windows style, start by that.
18269     new_path=`cmd //c echo $new_path`
18270 
18271   input_path="$new_path"
18272   # Check if we need to convert this using DOS-style short mode. If the path
18273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18274   # take no chances and rewrite it.
18275   # Note: m4 eats our [], so we need to use [ and ] instead.
18276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18277   if test "x$has_forbidden_chars" != x; then
18278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18279     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18280   fi
18281 
18282     # Output is in $new_path
18283 
18284   windows_path="$new_path"
18285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18286     unix_path=`$CYGPATH -u "$windows_path"`
18287     new_path="$unix_path"
18288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18290     new_path="$unix_path"
18291   fi
18292 
18293     # remove trailing .exe if any
18294     new_path="${new_path/%.exe/}"
18295 
18296     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18297     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18298   fi
18299 
18300     else
18301       # We're on a unix platform. Hooray! :)
18302       # First separate the path from the arguments. This will split at the first
18303       # space.
18304       complete="$FOUND_MAKE"
18305       path="${complete%% *}"
18306       tmp="$complete EOL"
18307       arguments="${tmp#* }"
18308 
18309       # Cannot rely on the command "which" here since it doesn't always work.
18310       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18311       if test -z "$is_absolute_path"; then
18312         # Path to executable is not absolute. Find it.
18313         IFS_save="$IFS"
18314         IFS=:
18315         for p in $PATH; do
18316           if test -f "$p/$path" && test -x "$p/$path"; then
18317             new_path="$p/$path"
18318             break
18319           fi
18320         done
18321         IFS="$IFS_save"
18322       else
18323         # This is an absolute path, we can use it without further modifications.
18324         new_path="$path"
18325       fi
18326 
18327       if test "x$new_path" = x; then
18328         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18329 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18330         has_space=`$ECHO "$complete" | $GREP " "`
18331         if test "x$has_space" != x; then
18332           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18333 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18334         fi
18335         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18336       fi
18337     fi
18338 
18339     # Now join together the path and the arguments once again
18340     if test "x$arguments" != xEOL; then
18341       new_complete="$new_path ${arguments% *}"
18342     else
18343       new_complete="$new_path"
18344     fi
18345 
18346     if test "x$complete" != "x$new_complete"; then
18347       FOUND_MAKE="$new_complete"
18348       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18349 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18350     fi
18351   fi
18352 
18353         fi
18354       fi
18355     fi
18356   fi
18357 
18358     fi
18359 
18360     if test "x$FOUND_MAKE" = x; then
18361       if test "x$TOOLCHAIN_PATH" != x; then
18362         # We have a toolchain path, check that as well before giving up.
18363         OLD_PATH=$PATH
18364         PATH=$TOOLCHAIN_PATH:$PATH
18365         for ac_prog in gmake
18366 do
18367   # Extract the first word of "$ac_prog", so it can be a program name with args.
18368 set dummy $ac_prog; ac_word=$2
18369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18370 $as_echo_n "checking for $ac_word... " >&6; }
18371 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18372   $as_echo_n "(cached) " >&6
18373 else
18374   case $CHECK_TOOLSDIR_GMAKE in
18375   [\\/]* | ?:[\\/]*)
18376   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18377   ;;
18378   *)
18379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18380 for as_dir in $PATH
18381 do
18382   IFS=$as_save_IFS
18383   test -z "$as_dir" && as_dir=.
18384     for ac_exec_ext in '' $ac_executable_extensions; do
18385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18386     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18388     break 2
18389   fi
18390 done
18391   done
18392 IFS=$as_save_IFS
18393 
18394   ;;
18395 esac
18396 fi
18397 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18398 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18400 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18401 else
18402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18403 $as_echo "no" >&6; }
18404 fi
18405 
18406 
18407   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18408 done
18409 
18410 
18411   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18412   DESCRIPTION="gmake in tools-dir"
18413 
18414   # On Cygwin, we require a newer version of make than on other platforms
18415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18416     MAKE_VERSION_EXPR="-e 4\."
18417     MAKE_REQUIRED_VERSION="4.0"
18418    else
18419     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18420     MAKE_REQUIRED_VERSION="3.81"
18421   fi
18422 
18423   if test "x$MAKE_CANDIDATE" != x; then
18424     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18425 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18426     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18427     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18428     if test "x$IS_GNU_MAKE" = x; then
18429       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18430 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18431     else
18432       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18433       if test "x$IS_MODERN_MAKE" = x; then
18434         { $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
18435 $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;}
18436       else
18437         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18438           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18439             MAKE_EXPECTED_ENV='cygwin'
18440           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18441             MAKE_EXPECTED_ENV='msys'
18442           else
18443             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18444           fi
18445           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18446           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18447         else
18448           # Not relevant for non-Windows
18449           IS_MAKE_CORRECT_ENV=true
18450         fi
18451         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18452           { $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
18453 $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;}
18454         else
18455           FOUND_MAKE=$MAKE_CANDIDATE
18456 
18457   # Only process if variable expands to non-empty
18458 
18459   if test "x$FOUND_MAKE" != x; then
18460     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18461 
18462   # First separate the path from the arguments. This will split at the first
18463   # space.
18464   complete="$FOUND_MAKE"
18465   path="${complete%% *}"
18466   tmp="$complete EOL"
18467   arguments="${tmp#* }"
18468 
18469   # Input might be given as Windows format, start by converting to
18470   # unix format.
18471   new_path=`$CYGPATH -u "$path"`
18472 
18473   # Now try to locate executable using which
18474   new_path=`$WHICH "$new_path" 2> /dev/null`
18475   # bat and cmd files are not always considered executable in cygwin causing which
18476   # to not find them
18477   if test "x$new_path" = x \
18478       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18479       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18480     new_path=`$CYGPATH -u "$path"`
18481   fi
18482   if test "x$new_path" = x; then
18483     # Oops. Which didn't find the executable.
18484     # The splitting of arguments from the executable at a space might have been incorrect,
18485     # since paths with space are more likely in Windows. Give it another try with the whole
18486     # argument.
18487     path="$complete"
18488     arguments="EOL"
18489     new_path=`$CYGPATH -u "$path"`
18490     new_path=`$WHICH "$new_path" 2> /dev/null`
18491     # bat and cmd files are not always considered executable in cygwin causing which
18492     # to not find them
18493     if test "x$new_path" = x \
18494         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18495         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18496       new_path=`$CYGPATH -u "$path"`
18497     fi
18498     if test "x$new_path" = x; then
18499       # It's still not found. Now this is an unrecoverable error.
18500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18501 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18502       has_space=`$ECHO "$complete" | $GREP " "`
18503       if test "x$has_space" != x; then
18504         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18505 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18506       fi
18507       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18508     fi
18509   fi
18510 
18511   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18512   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18513   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18514   # "foo.exe" is OK but "foo" is an error.
18515   #
18516   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18517   # It is also a way to make sure we got the proper file name for the real test later on.
18518   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18519   if test "x$test_shortpath" = x; then
18520     # Short path failed, file does not exist as specified.
18521     # Try adding .exe or .cmd
18522     if test -f "${new_path}.exe"; then
18523       input_to_shortpath="${new_path}.exe"
18524     elif test -f "${new_path}.cmd"; then
18525       input_to_shortpath="${new_path}.cmd"
18526     else
18527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18528 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18529       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18530 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18531       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18532     fi
18533   else
18534     input_to_shortpath="$new_path"
18535   fi
18536 
18537   # Call helper function which possibly converts this using DOS-style short mode.
18538   # If so, the updated path is stored in $new_path.
18539   new_path="$input_to_shortpath"
18540 
18541   input_path="$input_to_shortpath"
18542   # Check if we need to convert this using DOS-style short mode. If the path
18543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18544   # take no chances and rewrite it.
18545   # Note: m4 eats our [], so we need to use [ and ] instead.
18546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18547   if test "x$has_forbidden_chars" != x; then
18548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18552       # Going to short mode and back again did indeed matter. Since short mode is
18553       # case insensitive, let's make it lowercase to improve readability.
18554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18555       # Now convert it back to Unix-style (cygpath)
18556       input_path=`$CYGPATH -u "$shortmode_path"`
18557       new_path="$input_path"
18558     fi
18559   fi
18560 
18561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18562   if test "x$test_cygdrive_prefix" = x; then
18563     # As a simple fix, exclude /usr/bin since it's not a real path.
18564     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18566       # a path prefixed by /cygdrive for fixpath to work.
18567       new_path="$CYGWIN_ROOT_PATH$input_path"
18568     fi
18569   fi
18570 
18571   # remove trailing .exe if any
18572   new_path="${new_path/%.exe/}"
18573 
18574     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18575 
18576   # First separate the path from the arguments. This will split at the first
18577   # space.
18578   complete="$FOUND_MAKE"
18579   path="${complete%% *}"
18580   tmp="$complete EOL"
18581   arguments="${tmp#* }"
18582 
18583   # Input might be given as Windows format, start by converting to
18584   # unix format.
18585   new_path="$path"
18586 
18587   windows_path="$new_path"
18588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18589     unix_path=`$CYGPATH -u "$windows_path"`
18590     new_path="$unix_path"
18591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18593     new_path="$unix_path"
18594   fi
18595 
18596 
18597   # Now try to locate executable using which
18598   new_path=`$WHICH "$new_path" 2> /dev/null`
18599 
18600   if test "x$new_path" = x; then
18601     # Oops. Which didn't find the executable.
18602     # The splitting of arguments from the executable at a space might have been incorrect,
18603     # since paths with space are more likely in Windows. Give it another try with the whole
18604     # argument.
18605     path="$complete"
18606     arguments="EOL"
18607     new_path="$path"
18608 
18609   windows_path="$new_path"
18610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18611     unix_path=`$CYGPATH -u "$windows_path"`
18612     new_path="$unix_path"
18613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18615     new_path="$unix_path"
18616   fi
18617 
18618 
18619     new_path=`$WHICH "$new_path" 2> /dev/null`
18620     # bat and cmd files are not always considered executable in MSYS causing which
18621     # to not find them
18622     if test "x$new_path" = x \
18623         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18624         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18625       new_path="$path"
18626 
18627   windows_path="$new_path"
18628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18629     unix_path=`$CYGPATH -u "$windows_path"`
18630     new_path="$unix_path"
18631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18633     new_path="$unix_path"
18634   fi
18635 
18636     fi
18637 
18638     if test "x$new_path" = x; then
18639       # It's still not found. Now this is an unrecoverable error.
18640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18641 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18642       has_space=`$ECHO "$complete" | $GREP " "`
18643       if test "x$has_space" != x; then
18644         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18645 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18646       fi
18647       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18648     fi
18649   fi
18650 
18651   # Now new_path has a complete unix path to the binary
18652   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18653     # Keep paths in /bin as-is, but remove trailing .exe if any
18654     new_path="${new_path/%.exe/}"
18655     # Do not save /bin paths to all_fixpath_prefixes!
18656   else
18657     # Not in mixed or Windows style, start by that.
18658     new_path=`cmd //c echo $new_path`
18659 
18660   input_path="$new_path"
18661   # Check if we need to convert this using DOS-style short mode. If the path
18662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18663   # take no chances and rewrite it.
18664   # Note: m4 eats our [], so we need to use [ and ] instead.
18665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18666   if test "x$has_forbidden_chars" != x; then
18667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18669   fi
18670 
18671     # Output is in $new_path
18672 
18673   windows_path="$new_path"
18674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18675     unix_path=`$CYGPATH -u "$windows_path"`
18676     new_path="$unix_path"
18677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18679     new_path="$unix_path"
18680   fi
18681 
18682     # remove trailing .exe if any
18683     new_path="${new_path/%.exe/}"
18684 
18685     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18686     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18687   fi
18688 
18689     else
18690       # We're on a unix platform. Hooray! :)
18691       # First separate the path from the arguments. This will split at the first
18692       # space.
18693       complete="$FOUND_MAKE"
18694       path="${complete%% *}"
18695       tmp="$complete EOL"
18696       arguments="${tmp#* }"
18697 
18698       # Cannot rely on the command "which" here since it doesn't always work.
18699       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18700       if test -z "$is_absolute_path"; then
18701         # Path to executable is not absolute. Find it.
18702         IFS_save="$IFS"
18703         IFS=:
18704         for p in $PATH; do
18705           if test -f "$p/$path" && test -x "$p/$path"; then
18706             new_path="$p/$path"
18707             break
18708           fi
18709         done
18710         IFS="$IFS_save"
18711       else
18712         # This is an absolute path, we can use it without further modifications.
18713         new_path="$path"
18714       fi
18715 
18716       if test "x$new_path" = x; then
18717         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18718 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18719         has_space=`$ECHO "$complete" | $GREP " "`
18720         if test "x$has_space" != x; then
18721           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18722 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18723         fi
18724         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18725       fi
18726     fi
18727 
18728     # Now join together the path and the arguments once again
18729     if test "x$arguments" != xEOL; then
18730       new_complete="$new_path ${arguments% *}"
18731     else
18732       new_complete="$new_path"
18733     fi
18734 
18735     if test "x$complete" != "x$new_complete"; then
18736       FOUND_MAKE="$new_complete"
18737       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18738 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18739     fi
18740   fi
18741 
18742         fi
18743       fi
18744     fi
18745   fi
18746 
18747         if test "x$FOUND_MAKE" = x; then
18748           for ac_prog in make
18749 do
18750   # Extract the first word of "$ac_prog", so it can be a program name with args.
18751 set dummy $ac_prog; ac_word=$2
18752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18753 $as_echo_n "checking for $ac_word... " >&6; }
18754 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18755   $as_echo_n "(cached) " >&6
18756 else
18757   case $CHECK_TOOLSDIR_MAKE in
18758   [\\/]* | ?:[\\/]*)
18759   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18760   ;;
18761   *)
18762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18763 for as_dir in $PATH
18764 do
18765   IFS=$as_save_IFS
18766   test -z "$as_dir" && as_dir=.
18767     for ac_exec_ext in '' $ac_executable_extensions; do
18768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18769     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18771     break 2
18772   fi
18773 done
18774   done
18775 IFS=$as_save_IFS
18776 
18777   ;;
18778 esac
18779 fi
18780 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18781 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18783 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18784 else
18785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18786 $as_echo "no" >&6; }
18787 fi
18788 
18789 
18790   test -n "$CHECK_TOOLSDIR_MAKE" && break
18791 done
18792 
18793 
18794   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18795   DESCRIPTION="make in tools-dir"
18796 
18797   # On Cygwin, we require a newer version of make than on other platforms
18798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18799     MAKE_VERSION_EXPR="-e 4\."
18800     MAKE_REQUIRED_VERSION="4.0"
18801    else
18802     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18803     MAKE_REQUIRED_VERSION="3.81"
18804   fi
18805 
18806   if test "x$MAKE_CANDIDATE" != x; then
18807     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18808 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18809     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18810     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18811     if test "x$IS_GNU_MAKE" = x; then
18812       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18813 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18814     else
18815       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18816       if test "x$IS_MODERN_MAKE" = x; then
18817         { $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
18818 $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;}
18819       else
18820         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18821           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18822             MAKE_EXPECTED_ENV='cygwin'
18823           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18824             MAKE_EXPECTED_ENV='msys'
18825           else
18826             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18827           fi
18828           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18829           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18830         else
18831           # Not relevant for non-Windows
18832           IS_MAKE_CORRECT_ENV=true
18833         fi
18834         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18835           { $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
18836 $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;}
18837         else
18838           FOUND_MAKE=$MAKE_CANDIDATE
18839 
18840   # Only process if variable expands to non-empty
18841 
18842   if test "x$FOUND_MAKE" != x; then
18843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844 
18845   # First separate the path from the arguments. This will split at the first
18846   # space.
18847   complete="$FOUND_MAKE"
18848   path="${complete%% *}"
18849   tmp="$complete EOL"
18850   arguments="${tmp#* }"
18851 
18852   # Input might be given as Windows format, start by converting to
18853   # unix format.
18854   new_path=`$CYGPATH -u "$path"`
18855 
18856   # Now try to locate executable using which
18857   new_path=`$WHICH "$new_path" 2> /dev/null`
18858   # bat and cmd files are not always considered executable in cygwin causing which
18859   # to not find them
18860   if test "x$new_path" = x \
18861       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18862       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18863     new_path=`$CYGPATH -u "$path"`
18864   fi
18865   if test "x$new_path" = x; then
18866     # Oops. Which didn't find the executable.
18867     # The splitting of arguments from the executable at a space might have been incorrect,
18868     # since paths with space are more likely in Windows. Give it another try with the whole
18869     # argument.
18870     path="$complete"
18871     arguments="EOL"
18872     new_path=`$CYGPATH -u "$path"`
18873     new_path=`$WHICH "$new_path" 2> /dev/null`
18874     # bat and cmd files are not always considered executable in cygwin causing which
18875     # to not find them
18876     if test "x$new_path" = x \
18877         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18878         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18879       new_path=`$CYGPATH -u "$path"`
18880     fi
18881     if test "x$new_path" = x; then
18882       # It's still not found. Now this is an unrecoverable error.
18883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18884 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18885       has_space=`$ECHO "$complete" | $GREP " "`
18886       if test "x$has_space" != x; then
18887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18889       fi
18890       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18891     fi
18892   fi
18893 
18894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18897   # "foo.exe" is OK but "foo" is an error.
18898   #
18899   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18900   # It is also a way to make sure we got the proper file name for the real test later on.
18901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18902   if test "x$test_shortpath" = x; then
18903     # Short path failed, file does not exist as specified.
18904     # Try adding .exe or .cmd
18905     if test -f "${new_path}.exe"; then
18906       input_to_shortpath="${new_path}.exe"
18907     elif test -f "${new_path}.cmd"; then
18908       input_to_shortpath="${new_path}.cmd"
18909     else
18910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18911 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18912       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18913 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18914       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18915     fi
18916   else
18917     input_to_shortpath="$new_path"
18918   fi
18919 
18920   # Call helper function which possibly converts this using DOS-style short mode.
18921   # If so, the updated path is stored in $new_path.
18922   new_path="$input_to_shortpath"
18923 
18924   input_path="$input_to_shortpath"
18925   # Check if we need to convert this using DOS-style short mode. If the path
18926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18927   # take no chances and rewrite it.
18928   # Note: m4 eats our [], so we need to use [ and ] instead.
18929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18930   if test "x$has_forbidden_chars" != x; then
18931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18935       # Going to short mode and back again did indeed matter. Since short mode is
18936       # case insensitive, let's make it lowercase to improve readability.
18937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18938       # Now convert it back to Unix-style (cygpath)
18939       input_path=`$CYGPATH -u "$shortmode_path"`
18940       new_path="$input_path"
18941     fi
18942   fi
18943 
18944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18945   if test "x$test_cygdrive_prefix" = x; then
18946     # As a simple fix, exclude /usr/bin since it's not a real path.
18947     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18949       # a path prefixed by /cygdrive for fixpath to work.
18950       new_path="$CYGWIN_ROOT_PATH$input_path"
18951     fi
18952   fi
18953 
18954   # remove trailing .exe if any
18955   new_path="${new_path/%.exe/}"
18956 
18957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18958 
18959   # First separate the path from the arguments. This will split at the first
18960   # space.
18961   complete="$FOUND_MAKE"
18962   path="${complete%% *}"
18963   tmp="$complete EOL"
18964   arguments="${tmp#* }"
18965 
18966   # Input might be given as Windows format, start by converting to
18967   # unix format.
18968   new_path="$path"
18969 
18970   windows_path="$new_path"
18971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18972     unix_path=`$CYGPATH -u "$windows_path"`
18973     new_path="$unix_path"
18974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18976     new_path="$unix_path"
18977   fi
18978 
18979 
18980   # Now try to locate executable using which
18981   new_path=`$WHICH "$new_path" 2> /dev/null`
18982 
18983   if test "x$new_path" = x; then
18984     # Oops. Which didn't find the executable.
18985     # The splitting of arguments from the executable at a space might have been incorrect,
18986     # since paths with space are more likely in Windows. Give it another try with the whole
18987     # argument.
18988     path="$complete"
18989     arguments="EOL"
18990     new_path="$path"
18991 
18992   windows_path="$new_path"
18993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18994     unix_path=`$CYGPATH -u "$windows_path"`
18995     new_path="$unix_path"
18996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18998     new_path="$unix_path"
18999   fi
19000 
19001 
19002     new_path=`$WHICH "$new_path" 2> /dev/null`
19003     # bat and cmd files are not always considered executable in MSYS causing which
19004     # to not find them
19005     if test "x$new_path" = x \
19006         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19007         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19008       new_path="$path"
19009 
19010   windows_path="$new_path"
19011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19012     unix_path=`$CYGPATH -u "$windows_path"`
19013     new_path="$unix_path"
19014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19016     new_path="$unix_path"
19017   fi
19018 
19019     fi
19020 
19021     if test "x$new_path" = x; then
19022       # It's still not found. Now this is an unrecoverable error.
19023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19024 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19025       has_space=`$ECHO "$complete" | $GREP " "`
19026       if test "x$has_space" != x; then
19027         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19028 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19029       fi
19030       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19031     fi
19032   fi
19033 
19034   # Now new_path has a complete unix path to the binary
19035   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19036     # Keep paths in /bin as-is, but remove trailing .exe if any
19037     new_path="${new_path/%.exe/}"
19038     # Do not save /bin paths to all_fixpath_prefixes!
19039   else
19040     # Not in mixed or Windows style, start by that.
19041     new_path=`cmd //c echo $new_path`
19042 
19043   input_path="$new_path"
19044   # Check if we need to convert this using DOS-style short mode. If the path
19045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19046   # take no chances and rewrite it.
19047   # Note: m4 eats our [], so we need to use [ and ] instead.
19048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19049   if test "x$has_forbidden_chars" != x; then
19050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19051     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19052   fi
19053 
19054     # Output is in $new_path
19055 
19056   windows_path="$new_path"
19057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19058     unix_path=`$CYGPATH -u "$windows_path"`
19059     new_path="$unix_path"
19060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19062     new_path="$unix_path"
19063   fi
19064 
19065     # remove trailing .exe if any
19066     new_path="${new_path/%.exe/}"
19067 
19068     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19069     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19070   fi
19071 
19072     else
19073       # We're on a unix platform. Hooray! :)
19074       # First separate the path from the arguments. This will split at the first
19075       # space.
19076       complete="$FOUND_MAKE"
19077       path="${complete%% *}"
19078       tmp="$complete EOL"
19079       arguments="${tmp#* }"
19080 
19081       # Cannot rely on the command "which" here since it doesn't always work.
19082       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19083       if test -z "$is_absolute_path"; then
19084         # Path to executable is not absolute. Find it.
19085         IFS_save="$IFS"
19086         IFS=:
19087         for p in $PATH; do
19088           if test -f "$p/$path" && test -x "$p/$path"; then
19089             new_path="$p/$path"
19090             break
19091           fi
19092         done
19093         IFS="$IFS_save"
19094       else
19095         # This is an absolute path, we can use it without further modifications.
19096         new_path="$path"
19097       fi
19098 
19099       if test "x$new_path" = x; then
19100         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19101 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19102         has_space=`$ECHO "$complete" | $GREP " "`
19103         if test "x$has_space" != x; then
19104           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19105 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19106         fi
19107         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19108       fi
19109     fi
19110 
19111     # Now join together the path and the arguments once again
19112     if test "x$arguments" != xEOL; then
19113       new_complete="$new_path ${arguments% *}"
19114     else
19115       new_complete="$new_path"
19116     fi
19117 
19118     if test "x$complete" != "x$new_complete"; then
19119       FOUND_MAKE="$new_complete"
19120       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19121 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19122     fi
19123   fi
19124 
19125         fi
19126       fi
19127     fi
19128   fi
19129 
19130         fi
19131         PATH=$OLD_PATH
19132       fi
19133     fi
19134 
19135     if test "x$FOUND_MAKE" = x; then
19136       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
19137     fi
19138 
19139   else
19140     # The variable is set, but is it from the command line or the environment?
19141 
19142     # Try to remove the string !MAKE! from our list.
19143     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19144     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19145       # If it failed, the variable was not from the command line. Ignore it,
19146       # but warn the user (except for BASH, which is always set by the calling BASH).
19147       if test "xMAKE" != xBASH; then
19148         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19149 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19150       fi
19151       # Try to locate tool using the code snippet
19152 
19153     # Try our hardest to locate a correct version of GNU make
19154     for ac_prog in gmake
19155 do
19156   # Extract the first word of "$ac_prog", so it can be a program name with args.
19157 set dummy $ac_prog; ac_word=$2
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19159 $as_echo_n "checking for $ac_word... " >&6; }
19160 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19161   $as_echo_n "(cached) " >&6
19162 else
19163   case $CHECK_GMAKE in
19164   [\\/]* | ?:[\\/]*)
19165   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19166   ;;
19167   *)
19168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19169 for as_dir in $PATH
19170 do
19171   IFS=$as_save_IFS
19172   test -z "$as_dir" && as_dir=.
19173     for ac_exec_ext in '' $ac_executable_extensions; do
19174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19175     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19177     break 2
19178   fi
19179 done
19180   done
19181 IFS=$as_save_IFS
19182 
19183   ;;
19184 esac
19185 fi
19186 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19187 if test -n "$CHECK_GMAKE"; then
19188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19189 $as_echo "$CHECK_GMAKE" >&6; }
19190 else
19191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19192 $as_echo "no" >&6; }
19193 fi
19194 
19195 
19196   test -n "$CHECK_GMAKE" && break
19197 done
19198 
19199 
19200   MAKE_CANDIDATE=""$CHECK_GMAKE""
19201   DESCRIPTION="gmake in PATH"
19202 
19203   # On Cygwin, we require a newer version of make than on other platforms
19204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19205     MAKE_VERSION_EXPR="-e 4\."
19206     MAKE_REQUIRED_VERSION="4.0"
19207    else
19208     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19209     MAKE_REQUIRED_VERSION="3.81"
19210   fi
19211 
19212   if test "x$MAKE_CANDIDATE" != x; then
19213     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19214 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19215     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19216     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19217     if test "x$IS_GNU_MAKE" = x; then
19218       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19219 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19220     else
19221       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19222       if test "x$IS_MODERN_MAKE" = x; then
19223         { $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
19224 $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;}
19225       else
19226         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19227           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19228             MAKE_EXPECTED_ENV='cygwin'
19229           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19230             MAKE_EXPECTED_ENV='msys'
19231           else
19232             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19233           fi
19234           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19235           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19236         else
19237           # Not relevant for non-Windows
19238           IS_MAKE_CORRECT_ENV=true
19239         fi
19240         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19241           { $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
19242 $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;}
19243         else
19244           FOUND_MAKE=$MAKE_CANDIDATE
19245 
19246   # Only process if variable expands to non-empty
19247 
19248   if test "x$FOUND_MAKE" != x; then
19249     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19250 
19251   # First separate the path from the arguments. This will split at the first
19252   # space.
19253   complete="$FOUND_MAKE"
19254   path="${complete%% *}"
19255   tmp="$complete EOL"
19256   arguments="${tmp#* }"
19257 
19258   # Input might be given as Windows format, start by converting to
19259   # unix format.
19260   new_path=`$CYGPATH -u "$path"`
19261 
19262   # Now try to locate executable using which
19263   new_path=`$WHICH "$new_path" 2> /dev/null`
19264   # bat and cmd files are not always considered executable in cygwin causing which
19265   # to not find them
19266   if test "x$new_path" = x \
19267       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19268       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19269     new_path=`$CYGPATH -u "$path"`
19270   fi
19271   if test "x$new_path" = x; then
19272     # Oops. Which didn't find the executable.
19273     # The splitting of arguments from the executable at a space might have been incorrect,
19274     # since paths with space are more likely in Windows. Give it another try with the whole
19275     # argument.
19276     path="$complete"
19277     arguments="EOL"
19278     new_path=`$CYGPATH -u "$path"`
19279     new_path=`$WHICH "$new_path" 2> /dev/null`
19280     # bat and cmd files are not always considered executable in cygwin causing which
19281     # to not find them
19282     if test "x$new_path" = x \
19283         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19284         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19285       new_path=`$CYGPATH -u "$path"`
19286     fi
19287     if test "x$new_path" = x; then
19288       # It's still not found. Now this is an unrecoverable error.
19289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19290 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19291       has_space=`$ECHO "$complete" | $GREP " "`
19292       if test "x$has_space" != x; then
19293         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19294 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19295       fi
19296       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19297     fi
19298   fi
19299 
19300   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19301   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19302   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19303   # "foo.exe" is OK but "foo" is an error.
19304   #
19305   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19306   # It is also a way to make sure we got the proper file name for the real test later on.
19307   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19308   if test "x$test_shortpath" = x; then
19309     # Short path failed, file does not exist as specified.
19310     # Try adding .exe or .cmd
19311     if test -f "${new_path}.exe"; then
19312       input_to_shortpath="${new_path}.exe"
19313     elif test -f "${new_path}.cmd"; then
19314       input_to_shortpath="${new_path}.cmd"
19315     else
19316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19317 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19318       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19319 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19320       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19321     fi
19322   else
19323     input_to_shortpath="$new_path"
19324   fi
19325 
19326   # Call helper function which possibly converts this using DOS-style short mode.
19327   # If so, the updated path is stored in $new_path.
19328   new_path="$input_to_shortpath"
19329 
19330   input_path="$input_to_shortpath"
19331   # Check if we need to convert this using DOS-style short mode. If the path
19332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19333   # take no chances and rewrite it.
19334   # Note: m4 eats our [], so we need to use [ and ] instead.
19335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19336   if test "x$has_forbidden_chars" != x; then
19337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19338     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19339     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19340     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19341       # Going to short mode and back again did indeed matter. Since short mode is
19342       # case insensitive, let's make it lowercase to improve readability.
19343       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19344       # Now convert it back to Unix-style (cygpath)
19345       input_path=`$CYGPATH -u "$shortmode_path"`
19346       new_path="$input_path"
19347     fi
19348   fi
19349 
19350   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19351   if test "x$test_cygdrive_prefix" = x; then
19352     # As a simple fix, exclude /usr/bin since it's not a real path.
19353     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19354       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19355       # a path prefixed by /cygdrive for fixpath to work.
19356       new_path="$CYGWIN_ROOT_PATH$input_path"
19357     fi
19358   fi
19359 
19360   # remove trailing .exe if any
19361   new_path="${new_path/%.exe/}"
19362 
19363     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19364 
19365   # First separate the path from the arguments. This will split at the first
19366   # space.
19367   complete="$FOUND_MAKE"
19368   path="${complete%% *}"
19369   tmp="$complete EOL"
19370   arguments="${tmp#* }"
19371 
19372   # Input might be given as Windows format, start by converting to
19373   # unix format.
19374   new_path="$path"
19375 
19376   windows_path="$new_path"
19377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19378     unix_path=`$CYGPATH -u "$windows_path"`
19379     new_path="$unix_path"
19380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19382     new_path="$unix_path"
19383   fi
19384 
19385 
19386   # Now try to locate executable using which
19387   new_path=`$WHICH "$new_path" 2> /dev/null`
19388 
19389   if test "x$new_path" = x; then
19390     # Oops. Which didn't find the executable.
19391     # The splitting of arguments from the executable at a space might have been incorrect,
19392     # since paths with space are more likely in Windows. Give it another try with the whole
19393     # argument.
19394     path="$complete"
19395     arguments="EOL"
19396     new_path="$path"
19397 
19398   windows_path="$new_path"
19399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19400     unix_path=`$CYGPATH -u "$windows_path"`
19401     new_path="$unix_path"
19402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19404     new_path="$unix_path"
19405   fi
19406 
19407 
19408     new_path=`$WHICH "$new_path" 2> /dev/null`
19409     # bat and cmd files are not always considered executable in MSYS causing which
19410     # to not find them
19411     if test "x$new_path" = x \
19412         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19413         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19414       new_path="$path"
19415 
19416   windows_path="$new_path"
19417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19418     unix_path=`$CYGPATH -u "$windows_path"`
19419     new_path="$unix_path"
19420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19422     new_path="$unix_path"
19423   fi
19424 
19425     fi
19426 
19427     if test "x$new_path" = x; then
19428       # It's still not found. Now this is an unrecoverable error.
19429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19430 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19431       has_space=`$ECHO "$complete" | $GREP " "`
19432       if test "x$has_space" != x; then
19433         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19434 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19435       fi
19436       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19437     fi
19438   fi
19439 
19440   # Now new_path has a complete unix path to the binary
19441   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19442     # Keep paths in /bin as-is, but remove trailing .exe if any
19443     new_path="${new_path/%.exe/}"
19444     # Do not save /bin paths to all_fixpath_prefixes!
19445   else
19446     # Not in mixed or Windows style, start by that.
19447     new_path=`cmd //c echo $new_path`
19448 
19449   input_path="$new_path"
19450   # Check if we need to convert this using DOS-style short mode. If the path
19451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19452   # take no chances and rewrite it.
19453   # Note: m4 eats our [], so we need to use [ and ] instead.
19454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19455   if test "x$has_forbidden_chars" != x; then
19456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19457     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19458   fi
19459 
19460     # Output is in $new_path
19461 
19462   windows_path="$new_path"
19463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19464     unix_path=`$CYGPATH -u "$windows_path"`
19465     new_path="$unix_path"
19466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19468     new_path="$unix_path"
19469   fi
19470 
19471     # remove trailing .exe if any
19472     new_path="${new_path/%.exe/}"
19473 
19474     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19475     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19476   fi
19477 
19478     else
19479       # We're on a unix platform. Hooray! :)
19480       # First separate the path from the arguments. This will split at the first
19481       # space.
19482       complete="$FOUND_MAKE"
19483       path="${complete%% *}"
19484       tmp="$complete EOL"
19485       arguments="${tmp#* }"
19486 
19487       # Cannot rely on the command "which" here since it doesn't always work.
19488       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19489       if test -z "$is_absolute_path"; then
19490         # Path to executable is not absolute. Find it.
19491         IFS_save="$IFS"
19492         IFS=:
19493         for p in $PATH; do
19494           if test -f "$p/$path" && test -x "$p/$path"; then
19495             new_path="$p/$path"
19496             break
19497           fi
19498         done
19499         IFS="$IFS_save"
19500       else
19501         # This is an absolute path, we can use it without further modifications.
19502         new_path="$path"
19503       fi
19504 
19505       if test "x$new_path" = x; then
19506         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19507 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19508         has_space=`$ECHO "$complete" | $GREP " "`
19509         if test "x$has_space" != x; then
19510           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19511 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19512         fi
19513         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19514       fi
19515     fi
19516 
19517     # Now join together the path and the arguments once again
19518     if test "x$arguments" != xEOL; then
19519       new_complete="$new_path ${arguments% *}"
19520     else
19521       new_complete="$new_path"
19522     fi
19523 
19524     if test "x$complete" != "x$new_complete"; then
19525       FOUND_MAKE="$new_complete"
19526       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19527 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19528     fi
19529   fi
19530 
19531         fi
19532       fi
19533     fi
19534   fi
19535 
19536 
19537     if test "x$FOUND_MAKE" = x; then
19538       for ac_prog in make
19539 do
19540   # Extract the first word of "$ac_prog", so it can be a program name with args.
19541 set dummy $ac_prog; ac_word=$2
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19543 $as_echo_n "checking for $ac_word... " >&6; }
19544 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19545   $as_echo_n "(cached) " >&6
19546 else
19547   case $CHECK_MAKE in
19548   [\\/]* | ?:[\\/]*)
19549   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19550   ;;
19551   *)
19552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19553 for as_dir in $PATH
19554 do
19555   IFS=$as_save_IFS
19556   test -z "$as_dir" && as_dir=.
19557     for ac_exec_ext in '' $ac_executable_extensions; do
19558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19559     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19561     break 2
19562   fi
19563 done
19564   done
19565 IFS=$as_save_IFS
19566 
19567   ;;
19568 esac
19569 fi
19570 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19571 if test -n "$CHECK_MAKE"; then
19572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19573 $as_echo "$CHECK_MAKE" >&6; }
19574 else
19575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19576 $as_echo "no" >&6; }
19577 fi
19578 
19579 
19580   test -n "$CHECK_MAKE" && break
19581 done
19582 
19583 
19584   MAKE_CANDIDATE=""$CHECK_MAKE""
19585   DESCRIPTION="make in PATH"
19586 
19587   # On Cygwin, we require a newer version of make than on other platforms
19588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19589     MAKE_VERSION_EXPR="-e 4\."
19590     MAKE_REQUIRED_VERSION="4.0"
19591    else
19592     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19593     MAKE_REQUIRED_VERSION="3.81"
19594   fi
19595 
19596   if test "x$MAKE_CANDIDATE" != x; then
19597     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19598 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19599     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19600     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19601     if test "x$IS_GNU_MAKE" = x; then
19602       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19603 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19604     else
19605       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19606       if test "x$IS_MODERN_MAKE" = x; then
19607         { $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
19608 $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;}
19609       else
19610         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19611           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19612             MAKE_EXPECTED_ENV='cygwin'
19613           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19614             MAKE_EXPECTED_ENV='msys'
19615           else
19616             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19617           fi
19618           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19619           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19620         else
19621           # Not relevant for non-Windows
19622           IS_MAKE_CORRECT_ENV=true
19623         fi
19624         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19625           { $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
19626 $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;}
19627         else
19628           FOUND_MAKE=$MAKE_CANDIDATE
19629 
19630   # Only process if variable expands to non-empty
19631 
19632   if test "x$FOUND_MAKE" != x; then
19633     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19634 
19635   # First separate the path from the arguments. This will split at the first
19636   # space.
19637   complete="$FOUND_MAKE"
19638   path="${complete%% *}"
19639   tmp="$complete EOL"
19640   arguments="${tmp#* }"
19641 
19642   # Input might be given as Windows format, start by converting to
19643   # unix format.
19644   new_path=`$CYGPATH -u "$path"`
19645 
19646   # Now try to locate executable using which
19647   new_path=`$WHICH "$new_path" 2> /dev/null`
19648   # bat and cmd files are not always considered executable in cygwin causing which
19649   # to not find them
19650   if test "x$new_path" = x \
19651       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19652       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19653     new_path=`$CYGPATH -u "$path"`
19654   fi
19655   if test "x$new_path" = x; then
19656     # Oops. Which didn't find the executable.
19657     # The splitting of arguments from the executable at a space might have been incorrect,
19658     # since paths with space are more likely in Windows. Give it another try with the whole
19659     # argument.
19660     path="$complete"
19661     arguments="EOL"
19662     new_path=`$CYGPATH -u "$path"`
19663     new_path=`$WHICH "$new_path" 2> /dev/null`
19664     # bat and cmd files are not always considered executable in cygwin causing which
19665     # to not find them
19666     if test "x$new_path" = x \
19667         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19668         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19669       new_path=`$CYGPATH -u "$path"`
19670     fi
19671     if test "x$new_path" = x; then
19672       # It's still not found. Now this is an unrecoverable error.
19673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19674 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19675       has_space=`$ECHO "$complete" | $GREP " "`
19676       if test "x$has_space" != x; then
19677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19679       fi
19680       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19681     fi
19682   fi
19683 
19684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19687   # "foo.exe" is OK but "foo" is an error.
19688   #
19689   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19690   # It is also a way to make sure we got the proper file name for the real test later on.
19691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19692   if test "x$test_shortpath" = x; then
19693     # Short path failed, file does not exist as specified.
19694     # Try adding .exe or .cmd
19695     if test -f "${new_path}.exe"; then
19696       input_to_shortpath="${new_path}.exe"
19697     elif test -f "${new_path}.cmd"; then
19698       input_to_shortpath="${new_path}.cmd"
19699     else
19700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19701 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19702       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19703 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19704       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19705     fi
19706   else
19707     input_to_shortpath="$new_path"
19708   fi
19709 
19710   # Call helper function which possibly converts this using DOS-style short mode.
19711   # If so, the updated path is stored in $new_path.
19712   new_path="$input_to_shortpath"
19713 
19714   input_path="$input_to_shortpath"
19715   # Check if we need to convert this using DOS-style short mode. If the path
19716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19717   # take no chances and rewrite it.
19718   # Note: m4 eats our [], so we need to use [ and ] instead.
19719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19720   if test "x$has_forbidden_chars" != x; then
19721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19725       # Going to short mode and back again did indeed matter. Since short mode is
19726       # case insensitive, let's make it lowercase to improve readability.
19727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19728       # Now convert it back to Unix-style (cygpath)
19729       input_path=`$CYGPATH -u "$shortmode_path"`
19730       new_path="$input_path"
19731     fi
19732   fi
19733 
19734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19735   if test "x$test_cygdrive_prefix" = x; then
19736     # As a simple fix, exclude /usr/bin since it's not a real path.
19737     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19739       # a path prefixed by /cygdrive for fixpath to work.
19740       new_path="$CYGWIN_ROOT_PATH$input_path"
19741     fi
19742   fi
19743 
19744   # remove trailing .exe if any
19745   new_path="${new_path/%.exe/}"
19746 
19747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748 
19749   # First separate the path from the arguments. This will split at the first
19750   # space.
19751   complete="$FOUND_MAKE"
19752   path="${complete%% *}"
19753   tmp="$complete EOL"
19754   arguments="${tmp#* }"
19755 
19756   # Input might be given as Windows format, start by converting to
19757   # unix format.
19758   new_path="$path"
19759 
19760   windows_path="$new_path"
19761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19762     unix_path=`$CYGPATH -u "$windows_path"`
19763     new_path="$unix_path"
19764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19766     new_path="$unix_path"
19767   fi
19768 
19769 
19770   # Now try to locate executable using which
19771   new_path=`$WHICH "$new_path" 2> /dev/null`
19772 
19773   if test "x$new_path" = x; then
19774     # Oops. Which didn't find the executable.
19775     # The splitting of arguments from the executable at a space might have been incorrect,
19776     # since paths with space are more likely in Windows. Give it another try with the whole
19777     # argument.
19778     path="$complete"
19779     arguments="EOL"
19780     new_path="$path"
19781 
19782   windows_path="$new_path"
19783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19784     unix_path=`$CYGPATH -u "$windows_path"`
19785     new_path="$unix_path"
19786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19788     new_path="$unix_path"
19789   fi
19790 
19791 
19792     new_path=`$WHICH "$new_path" 2> /dev/null`
19793     # bat and cmd files are not always considered executable in MSYS causing which
19794     # to not find them
19795     if test "x$new_path" = x \
19796         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19797         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19798       new_path="$path"
19799 
19800   windows_path="$new_path"
19801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19802     unix_path=`$CYGPATH -u "$windows_path"`
19803     new_path="$unix_path"
19804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19806     new_path="$unix_path"
19807   fi
19808 
19809     fi
19810 
19811     if test "x$new_path" = x; then
19812       # It's still not found. Now this is an unrecoverable error.
19813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19814 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19815       has_space=`$ECHO "$complete" | $GREP " "`
19816       if test "x$has_space" != x; then
19817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19819       fi
19820       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19821     fi
19822   fi
19823 
19824   # Now new_path has a complete unix path to the binary
19825   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19826     # Keep paths in /bin as-is, but remove trailing .exe if any
19827     new_path="${new_path/%.exe/}"
19828     # Do not save /bin paths to all_fixpath_prefixes!
19829   else
19830     # Not in mixed or Windows style, start by that.
19831     new_path=`cmd //c echo $new_path`
19832 
19833   input_path="$new_path"
19834   # Check if we need to convert this using DOS-style short mode. If the path
19835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19836   # take no chances and rewrite it.
19837   # Note: m4 eats our [], so we need to use [ and ] instead.
19838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19839   if test "x$has_forbidden_chars" != x; then
19840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19841     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19842   fi
19843 
19844     # Output is in $new_path
19845 
19846   windows_path="$new_path"
19847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19848     unix_path=`$CYGPATH -u "$windows_path"`
19849     new_path="$unix_path"
19850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19852     new_path="$unix_path"
19853   fi
19854 
19855     # remove trailing .exe if any
19856     new_path="${new_path/%.exe/}"
19857 
19858     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19859     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19860   fi
19861 
19862     else
19863       # We're on a unix platform. Hooray! :)
19864       # First separate the path from the arguments. This will split at the first
19865       # space.
19866       complete="$FOUND_MAKE"
19867       path="${complete%% *}"
19868       tmp="$complete EOL"
19869       arguments="${tmp#* }"
19870 
19871       # Cannot rely on the command "which" here since it doesn't always work.
19872       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19873       if test -z "$is_absolute_path"; then
19874         # Path to executable is not absolute. Find it.
19875         IFS_save="$IFS"
19876         IFS=:
19877         for p in $PATH; do
19878           if test -f "$p/$path" && test -x "$p/$path"; then
19879             new_path="$p/$path"
19880             break
19881           fi
19882         done
19883         IFS="$IFS_save"
19884       else
19885         # This is an absolute path, we can use it without further modifications.
19886         new_path="$path"
19887       fi
19888 
19889       if test "x$new_path" = x; then
19890         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19891 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19892         has_space=`$ECHO "$complete" | $GREP " "`
19893         if test "x$has_space" != x; then
19894           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19895 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19896         fi
19897         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19898       fi
19899     fi
19900 
19901     # Now join together the path and the arguments once again
19902     if test "x$arguments" != xEOL; then
19903       new_complete="$new_path ${arguments% *}"
19904     else
19905       new_complete="$new_path"
19906     fi
19907 
19908     if test "x$complete" != "x$new_complete"; then
19909       FOUND_MAKE="$new_complete"
19910       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19911 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19912     fi
19913   fi
19914 
19915         fi
19916       fi
19917     fi
19918   fi
19919 
19920     fi
19921 
19922     if test "x$FOUND_MAKE" = x; then
19923       if test "x$TOOLCHAIN_PATH" != x; then
19924         # We have a toolchain path, check that as well before giving up.
19925         OLD_PATH=$PATH
19926         PATH=$TOOLCHAIN_PATH:$PATH
19927         for ac_prog in gmake
19928 do
19929   # Extract the first word of "$ac_prog", so it can be a program name with args.
19930 set dummy $ac_prog; ac_word=$2
19931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19932 $as_echo_n "checking for $ac_word... " >&6; }
19933 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19934   $as_echo_n "(cached) " >&6
19935 else
19936   case $CHECK_TOOLSDIR_GMAKE in
19937   [\\/]* | ?:[\\/]*)
19938   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19939   ;;
19940   *)
19941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19942 for as_dir in $PATH
19943 do
19944   IFS=$as_save_IFS
19945   test -z "$as_dir" && as_dir=.
19946     for ac_exec_ext in '' $ac_executable_extensions; do
19947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19948     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19950     break 2
19951   fi
19952 done
19953   done
19954 IFS=$as_save_IFS
19955 
19956   ;;
19957 esac
19958 fi
19959 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19960 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19962 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19963 else
19964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19965 $as_echo "no" >&6; }
19966 fi
19967 
19968 
19969   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19970 done
19971 
19972 
19973   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19974   DESCRIPTION="gmake in tools-dir"
19975 
19976   # On Cygwin, we require a newer version of make than on other platforms
19977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19978     MAKE_VERSION_EXPR="-e 4\."
19979     MAKE_REQUIRED_VERSION="4.0"
19980    else
19981     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19982     MAKE_REQUIRED_VERSION="3.81"
19983   fi
19984 
19985   if test "x$MAKE_CANDIDATE" != x; then
19986     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19987 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19988     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19989     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19990     if test "x$IS_GNU_MAKE" = x; then
19991       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19992 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19993     else
19994       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19995       if test "x$IS_MODERN_MAKE" = x; then
19996         { $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
19997 $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;}
19998       else
19999         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20000           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20001             MAKE_EXPECTED_ENV='cygwin'
20002           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20003             MAKE_EXPECTED_ENV='msys'
20004           else
20005             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20006           fi
20007           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20008           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20009         else
20010           # Not relevant for non-Windows
20011           IS_MAKE_CORRECT_ENV=true
20012         fi
20013         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20014           { $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
20015 $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;}
20016         else
20017           FOUND_MAKE=$MAKE_CANDIDATE
20018 
20019   # Only process if variable expands to non-empty
20020 
20021   if test "x$FOUND_MAKE" != x; then
20022     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20023 
20024   # First separate the path from the arguments. This will split at the first
20025   # space.
20026   complete="$FOUND_MAKE"
20027   path="${complete%% *}"
20028   tmp="$complete EOL"
20029   arguments="${tmp#* }"
20030 
20031   # Input might be given as Windows format, start by converting to
20032   # unix format.
20033   new_path=`$CYGPATH -u "$path"`
20034 
20035   # Now try to locate executable using which
20036   new_path=`$WHICH "$new_path" 2> /dev/null`
20037   # bat and cmd files are not always considered executable in cygwin causing which
20038   # to not find them
20039   if test "x$new_path" = x \
20040       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20041       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20042     new_path=`$CYGPATH -u "$path"`
20043   fi
20044   if test "x$new_path" = x; then
20045     # Oops. Which didn't find the executable.
20046     # The splitting of arguments from the executable at a space might have been incorrect,
20047     # since paths with space are more likely in Windows. Give it another try with the whole
20048     # argument.
20049     path="$complete"
20050     arguments="EOL"
20051     new_path=`$CYGPATH -u "$path"`
20052     new_path=`$WHICH "$new_path" 2> /dev/null`
20053     # bat and cmd files are not always considered executable in cygwin causing which
20054     # to not find them
20055     if test "x$new_path" = x \
20056         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20057         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20058       new_path=`$CYGPATH -u "$path"`
20059     fi
20060     if test "x$new_path" = x; then
20061       # It's still not found. Now this is an unrecoverable error.
20062       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20063 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20064       has_space=`$ECHO "$complete" | $GREP " "`
20065       if test "x$has_space" != x; then
20066         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20067 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20068       fi
20069       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20070     fi
20071   fi
20072 
20073   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20074   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20075   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20076   # "foo.exe" is OK but "foo" is an error.
20077   #
20078   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20079   # It is also a way to make sure we got the proper file name for the real test later on.
20080   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20081   if test "x$test_shortpath" = x; then
20082     # Short path failed, file does not exist as specified.
20083     # Try adding .exe or .cmd
20084     if test -f "${new_path}.exe"; then
20085       input_to_shortpath="${new_path}.exe"
20086     elif test -f "${new_path}.cmd"; then
20087       input_to_shortpath="${new_path}.cmd"
20088     else
20089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20090 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20091       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20092 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20093       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20094     fi
20095   else
20096     input_to_shortpath="$new_path"
20097   fi
20098 
20099   # Call helper function which possibly converts this using DOS-style short mode.
20100   # If so, the updated path is stored in $new_path.
20101   new_path="$input_to_shortpath"
20102 
20103   input_path="$input_to_shortpath"
20104   # Check if we need to convert this using DOS-style short mode. If the path
20105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20106   # take no chances and rewrite it.
20107   # Note: m4 eats our [], so we need to use [ and ] instead.
20108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20109   if test "x$has_forbidden_chars" != x; then
20110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20114       # Going to short mode and back again did indeed matter. Since short mode is
20115       # case insensitive, let's make it lowercase to improve readability.
20116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20117       # Now convert it back to Unix-style (cygpath)
20118       input_path=`$CYGPATH -u "$shortmode_path"`
20119       new_path="$input_path"
20120     fi
20121   fi
20122 
20123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20124   if test "x$test_cygdrive_prefix" = x; then
20125     # As a simple fix, exclude /usr/bin since it's not a real path.
20126     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20128       # a path prefixed by /cygdrive for fixpath to work.
20129       new_path="$CYGWIN_ROOT_PATH$input_path"
20130     fi
20131   fi
20132 
20133   # remove trailing .exe if any
20134   new_path="${new_path/%.exe/}"
20135 
20136     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20137 
20138   # First separate the path from the arguments. This will split at the first
20139   # space.
20140   complete="$FOUND_MAKE"
20141   path="${complete%% *}"
20142   tmp="$complete EOL"
20143   arguments="${tmp#* }"
20144 
20145   # Input might be given as Windows format, start by converting to
20146   # unix format.
20147   new_path="$path"
20148 
20149   windows_path="$new_path"
20150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20151     unix_path=`$CYGPATH -u "$windows_path"`
20152     new_path="$unix_path"
20153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20155     new_path="$unix_path"
20156   fi
20157 
20158 
20159   # Now try to locate executable using which
20160   new_path=`$WHICH "$new_path" 2> /dev/null`
20161 
20162   if test "x$new_path" = x; then
20163     # Oops. Which didn't find the executable.
20164     # The splitting of arguments from the executable at a space might have been incorrect,
20165     # since paths with space are more likely in Windows. Give it another try with the whole
20166     # argument.
20167     path="$complete"
20168     arguments="EOL"
20169     new_path="$path"
20170 
20171   windows_path="$new_path"
20172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20173     unix_path=`$CYGPATH -u "$windows_path"`
20174     new_path="$unix_path"
20175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20177     new_path="$unix_path"
20178   fi
20179 
20180 
20181     new_path=`$WHICH "$new_path" 2> /dev/null`
20182     # bat and cmd files are not always considered executable in MSYS causing which
20183     # to not find them
20184     if test "x$new_path" = x \
20185         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20186         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20187       new_path="$path"
20188 
20189   windows_path="$new_path"
20190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20191     unix_path=`$CYGPATH -u "$windows_path"`
20192     new_path="$unix_path"
20193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20195     new_path="$unix_path"
20196   fi
20197 
20198     fi
20199 
20200     if test "x$new_path" = x; then
20201       # It's still not found. Now this is an unrecoverable error.
20202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20203 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20204       has_space=`$ECHO "$complete" | $GREP " "`
20205       if test "x$has_space" != x; then
20206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20208       fi
20209       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20210     fi
20211   fi
20212 
20213   # Now new_path has a complete unix path to the binary
20214   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20215     # Keep paths in /bin as-is, but remove trailing .exe if any
20216     new_path="${new_path/%.exe/}"
20217     # Do not save /bin paths to all_fixpath_prefixes!
20218   else
20219     # Not in mixed or Windows style, start by that.
20220     new_path=`cmd //c echo $new_path`
20221 
20222   input_path="$new_path"
20223   # Check if we need to convert this using DOS-style short mode. If the path
20224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20225   # take no chances and rewrite it.
20226   # Note: m4 eats our [], so we need to use [ and ] instead.
20227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20228   if test "x$has_forbidden_chars" != x; then
20229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20231   fi
20232 
20233     # Output is in $new_path
20234 
20235   windows_path="$new_path"
20236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20237     unix_path=`$CYGPATH -u "$windows_path"`
20238     new_path="$unix_path"
20239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20241     new_path="$unix_path"
20242   fi
20243 
20244     # remove trailing .exe if any
20245     new_path="${new_path/%.exe/}"
20246 
20247     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20248     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20249   fi
20250 
20251     else
20252       # We're on a unix platform. Hooray! :)
20253       # First separate the path from the arguments. This will split at the first
20254       # space.
20255       complete="$FOUND_MAKE"
20256       path="${complete%% *}"
20257       tmp="$complete EOL"
20258       arguments="${tmp#* }"
20259 
20260       # Cannot rely on the command "which" here since it doesn't always work.
20261       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20262       if test -z "$is_absolute_path"; then
20263         # Path to executable is not absolute. Find it.
20264         IFS_save="$IFS"
20265         IFS=:
20266         for p in $PATH; do
20267           if test -f "$p/$path" && test -x "$p/$path"; then
20268             new_path="$p/$path"
20269             break
20270           fi
20271         done
20272         IFS="$IFS_save"
20273       else
20274         # This is an absolute path, we can use it without further modifications.
20275         new_path="$path"
20276       fi
20277 
20278       if test "x$new_path" = x; then
20279         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20280 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20281         has_space=`$ECHO "$complete" | $GREP " "`
20282         if test "x$has_space" != x; then
20283           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20284 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20285         fi
20286         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20287       fi
20288     fi
20289 
20290     # Now join together the path and the arguments once again
20291     if test "x$arguments" != xEOL; then
20292       new_complete="$new_path ${arguments% *}"
20293     else
20294       new_complete="$new_path"
20295     fi
20296 
20297     if test "x$complete" != "x$new_complete"; then
20298       FOUND_MAKE="$new_complete"
20299       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20300 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20301     fi
20302   fi
20303 
20304         fi
20305       fi
20306     fi
20307   fi
20308 
20309         if test "x$FOUND_MAKE" = x; then
20310           for ac_prog in make
20311 do
20312   # Extract the first word of "$ac_prog", so it can be a program name with args.
20313 set dummy $ac_prog; ac_word=$2
20314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20315 $as_echo_n "checking for $ac_word... " >&6; }
20316 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20317   $as_echo_n "(cached) " >&6
20318 else
20319   case $CHECK_TOOLSDIR_MAKE in
20320   [\\/]* | ?:[\\/]*)
20321   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20322   ;;
20323   *)
20324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20325 for as_dir in $PATH
20326 do
20327   IFS=$as_save_IFS
20328   test -z "$as_dir" && as_dir=.
20329     for ac_exec_ext in '' $ac_executable_extensions; do
20330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20331     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20333     break 2
20334   fi
20335 done
20336   done
20337 IFS=$as_save_IFS
20338 
20339   ;;
20340 esac
20341 fi
20342 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20343 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20345 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20346 else
20347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20348 $as_echo "no" >&6; }
20349 fi
20350 
20351 
20352   test -n "$CHECK_TOOLSDIR_MAKE" && break
20353 done
20354 
20355 
20356   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20357   DESCRIPTION="make in tools-dir"
20358 
20359   # On Cygwin, we require a newer version of make than on other platforms
20360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20361     MAKE_VERSION_EXPR="-e 4\."
20362     MAKE_REQUIRED_VERSION="4.0"
20363    else
20364     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20365     MAKE_REQUIRED_VERSION="3.81"
20366   fi
20367 
20368   if test "x$MAKE_CANDIDATE" != x; then
20369     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20370 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20371     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20372     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20373     if test "x$IS_GNU_MAKE" = x; then
20374       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20375 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20376     else
20377       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20378       if test "x$IS_MODERN_MAKE" = x; then
20379         { $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
20380 $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;}
20381       else
20382         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20383           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20384             MAKE_EXPECTED_ENV='cygwin'
20385           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20386             MAKE_EXPECTED_ENV='msys'
20387           else
20388             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20389           fi
20390           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20391           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20392         else
20393           # Not relevant for non-Windows
20394           IS_MAKE_CORRECT_ENV=true
20395         fi
20396         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20397           { $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
20398 $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;}
20399         else
20400           FOUND_MAKE=$MAKE_CANDIDATE
20401 
20402   # Only process if variable expands to non-empty
20403 
20404   if test "x$FOUND_MAKE" != x; then
20405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20406 
20407   # First separate the path from the arguments. This will split at the first
20408   # space.
20409   complete="$FOUND_MAKE"
20410   path="${complete%% *}"
20411   tmp="$complete EOL"
20412   arguments="${tmp#* }"
20413 
20414   # Input might be given as Windows format, start by converting to
20415   # unix format.
20416   new_path=`$CYGPATH -u "$path"`
20417 
20418   # Now try to locate executable using which
20419   new_path=`$WHICH "$new_path" 2> /dev/null`
20420   # bat and cmd files are not always considered executable in cygwin causing which
20421   # to not find them
20422   if test "x$new_path" = x \
20423       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20424       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20425     new_path=`$CYGPATH -u "$path"`
20426   fi
20427   if test "x$new_path" = x; then
20428     # Oops. Which didn't find the executable.
20429     # The splitting of arguments from the executable at a space might have been incorrect,
20430     # since paths with space are more likely in Windows. Give it another try with the whole
20431     # argument.
20432     path="$complete"
20433     arguments="EOL"
20434     new_path=`$CYGPATH -u "$path"`
20435     new_path=`$WHICH "$new_path" 2> /dev/null`
20436     # bat and cmd files are not always considered executable in cygwin causing which
20437     # to not find them
20438     if test "x$new_path" = x \
20439         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20440         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20441       new_path=`$CYGPATH -u "$path"`
20442     fi
20443     if test "x$new_path" = x; then
20444       # It's still not found. Now this is an unrecoverable error.
20445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20446 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20447       has_space=`$ECHO "$complete" | $GREP " "`
20448       if test "x$has_space" != x; then
20449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20451       fi
20452       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20453     fi
20454   fi
20455 
20456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20459   # "foo.exe" is OK but "foo" is an error.
20460   #
20461   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20462   # It is also a way to make sure we got the proper file name for the real test later on.
20463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20464   if test "x$test_shortpath" = x; then
20465     # Short path failed, file does not exist as specified.
20466     # Try adding .exe or .cmd
20467     if test -f "${new_path}.exe"; then
20468       input_to_shortpath="${new_path}.exe"
20469     elif test -f "${new_path}.cmd"; then
20470       input_to_shortpath="${new_path}.cmd"
20471     else
20472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20473 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20474       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20475 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20476       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20477     fi
20478   else
20479     input_to_shortpath="$new_path"
20480   fi
20481 
20482   # Call helper function which possibly converts this using DOS-style short mode.
20483   # If so, the updated path is stored in $new_path.
20484   new_path="$input_to_shortpath"
20485 
20486   input_path="$input_to_shortpath"
20487   # Check if we need to convert this using DOS-style short mode. If the path
20488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20489   # take no chances and rewrite it.
20490   # Note: m4 eats our [], so we need to use [ and ] instead.
20491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20492   if test "x$has_forbidden_chars" != x; then
20493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20497       # Going to short mode and back again did indeed matter. Since short mode is
20498       # case insensitive, let's make it lowercase to improve readability.
20499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20500       # Now convert it back to Unix-style (cygpath)
20501       input_path=`$CYGPATH -u "$shortmode_path"`
20502       new_path="$input_path"
20503     fi
20504   fi
20505 
20506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20507   if test "x$test_cygdrive_prefix" = x; then
20508     # As a simple fix, exclude /usr/bin since it's not a real path.
20509     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20511       # a path prefixed by /cygdrive for fixpath to work.
20512       new_path="$CYGWIN_ROOT_PATH$input_path"
20513     fi
20514   fi
20515 
20516   # remove trailing .exe if any
20517   new_path="${new_path/%.exe/}"
20518 
20519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20520 
20521   # First separate the path from the arguments. This will split at the first
20522   # space.
20523   complete="$FOUND_MAKE"
20524   path="${complete%% *}"
20525   tmp="$complete EOL"
20526   arguments="${tmp#* }"
20527 
20528   # Input might be given as Windows format, start by converting to
20529   # unix format.
20530   new_path="$path"
20531 
20532   windows_path="$new_path"
20533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20534     unix_path=`$CYGPATH -u "$windows_path"`
20535     new_path="$unix_path"
20536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20538     new_path="$unix_path"
20539   fi
20540 
20541 
20542   # Now try to locate executable using which
20543   new_path=`$WHICH "$new_path" 2> /dev/null`
20544 
20545   if test "x$new_path" = x; then
20546     # Oops. Which didn't find the executable.
20547     # The splitting of arguments from the executable at a space might have been incorrect,
20548     # since paths with space are more likely in Windows. Give it another try with the whole
20549     # argument.
20550     path="$complete"
20551     arguments="EOL"
20552     new_path="$path"
20553 
20554   windows_path="$new_path"
20555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20556     unix_path=`$CYGPATH -u "$windows_path"`
20557     new_path="$unix_path"
20558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20560     new_path="$unix_path"
20561   fi
20562 
20563 
20564     new_path=`$WHICH "$new_path" 2> /dev/null`
20565     # bat and cmd files are not always considered executable in MSYS causing which
20566     # to not find them
20567     if test "x$new_path" = x \
20568         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20569         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20570       new_path="$path"
20571 
20572   windows_path="$new_path"
20573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20574     unix_path=`$CYGPATH -u "$windows_path"`
20575     new_path="$unix_path"
20576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20578     new_path="$unix_path"
20579   fi
20580 
20581     fi
20582 
20583     if test "x$new_path" = x; then
20584       # It's still not found. Now this is an unrecoverable error.
20585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20586 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20587       has_space=`$ECHO "$complete" | $GREP " "`
20588       if test "x$has_space" != x; then
20589         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20590 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20591       fi
20592       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20593     fi
20594   fi
20595 
20596   # Now new_path has a complete unix path to the binary
20597   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20598     # Keep paths in /bin as-is, but remove trailing .exe if any
20599     new_path="${new_path/%.exe/}"
20600     # Do not save /bin paths to all_fixpath_prefixes!
20601   else
20602     # Not in mixed or Windows style, start by that.
20603     new_path=`cmd //c echo $new_path`
20604 
20605   input_path="$new_path"
20606   # Check if we need to convert this using DOS-style short mode. If the path
20607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20608   # take no chances and rewrite it.
20609   # Note: m4 eats our [], so we need to use [ and ] instead.
20610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20611   if test "x$has_forbidden_chars" != x; then
20612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20614   fi
20615 
20616     # Output is in $new_path
20617 
20618   windows_path="$new_path"
20619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20620     unix_path=`$CYGPATH -u "$windows_path"`
20621     new_path="$unix_path"
20622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20624     new_path="$unix_path"
20625   fi
20626 
20627     # remove trailing .exe if any
20628     new_path="${new_path/%.exe/}"
20629 
20630     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20631     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20632   fi
20633 
20634     else
20635       # We're on a unix platform. Hooray! :)
20636       # First separate the path from the arguments. This will split at the first
20637       # space.
20638       complete="$FOUND_MAKE"
20639       path="${complete%% *}"
20640       tmp="$complete EOL"
20641       arguments="${tmp#* }"
20642 
20643       # Cannot rely on the command "which" here since it doesn't always work.
20644       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20645       if test -z "$is_absolute_path"; then
20646         # Path to executable is not absolute. Find it.
20647         IFS_save="$IFS"
20648         IFS=:
20649         for p in $PATH; do
20650           if test -f "$p/$path" && test -x "$p/$path"; then
20651             new_path="$p/$path"
20652             break
20653           fi
20654         done
20655         IFS="$IFS_save"
20656       else
20657         # This is an absolute path, we can use it without further modifications.
20658         new_path="$path"
20659       fi
20660 
20661       if test "x$new_path" = x; then
20662         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20663 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20664         has_space=`$ECHO "$complete" | $GREP " "`
20665         if test "x$has_space" != x; then
20666           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20667 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20668         fi
20669         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20670       fi
20671     fi
20672 
20673     # Now join together the path and the arguments once again
20674     if test "x$arguments" != xEOL; then
20675       new_complete="$new_path ${arguments% *}"
20676     else
20677       new_complete="$new_path"
20678     fi
20679 
20680     if test "x$complete" != "x$new_complete"; then
20681       FOUND_MAKE="$new_complete"
20682       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20683 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20684     fi
20685   fi
20686 
20687         fi
20688       fi
20689     fi
20690   fi
20691 
20692         fi
20693         PATH=$OLD_PATH
20694       fi
20695     fi
20696 
20697     if test "x$FOUND_MAKE" = x; then
20698       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
20699     fi
20700 
20701     else
20702       # If it succeeded, then it was overridden by the user. We will use it
20703       # for the tool.
20704 
20705       # First remove it from the list of overridden variables, so we can test
20706       # for unknown variables in the end.
20707       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20708 
20709       # Check if we try to supply an empty value
20710       if test "x$MAKE" = x; then
20711         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20712 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20713         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20714 $as_echo_n "checking for MAKE... " >&6; }
20715         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20716 $as_echo "disabled" >&6; }
20717       else
20718         # Check if the provided tool contains a complete path.
20719         tool_specified="$MAKE"
20720         tool_basename="${tool_specified##*/}"
20721         if test "x$tool_basename" = "x$tool_specified"; then
20722           # A command without a complete path is provided, search $PATH.
20723           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20724 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20725           # Extract the first word of "$tool_basename", so it can be a program name with args.
20726 set dummy $tool_basename; ac_word=$2
20727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20728 $as_echo_n "checking for $ac_word... " >&6; }
20729 if ${ac_cv_path_MAKE+:} false; then :
20730   $as_echo_n "(cached) " >&6
20731 else
20732   case $MAKE in
20733   [\\/]* | ?:[\\/]*)
20734   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20735   ;;
20736   *)
20737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20738 for as_dir in $PATH
20739 do
20740   IFS=$as_save_IFS
20741   test -z "$as_dir" && as_dir=.
20742     for ac_exec_ext in '' $ac_executable_extensions; do
20743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20744     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20746     break 2
20747   fi
20748 done
20749   done
20750 IFS=$as_save_IFS
20751 
20752   ;;
20753 esac
20754 fi
20755 MAKE=$ac_cv_path_MAKE
20756 if test -n "$MAKE"; then
20757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20758 $as_echo "$MAKE" >&6; }
20759 else
20760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20761 $as_echo "no" >&6; }
20762 fi
20763 
20764 
20765           if test "x$MAKE" = x; then
20766             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20767           fi
20768         else
20769           # Otherwise we believe it is a complete path. Use it as it is.
20770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20771 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20772           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20773 $as_echo_n "checking for MAKE... " >&6; }
20774           if test ! -x "$tool_specified"; then
20775             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20776 $as_echo "not found" >&6; }
20777             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20778           fi
20779           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20780 $as_echo "$tool_specified" >&6; }
20781         fi
20782       fi
20783     fi
20784 
20785     # If MAKE was set by user, verify the version
20786 
20787   MAKE_CANDIDATE=""$MAKE""
20788   DESCRIPTION="user supplied MAKE=$MAKE"
20789 
20790   # On Cygwin, we require a newer version of make than on other platforms
20791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20792     MAKE_VERSION_EXPR="-e 4\."
20793     MAKE_REQUIRED_VERSION="4.0"
20794    else
20795     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20796     MAKE_REQUIRED_VERSION="3.81"
20797   fi
20798 
20799   if test "x$MAKE_CANDIDATE" != x; then
20800     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20801 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20802     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20803     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20804     if test "x$IS_GNU_MAKE" = x; then
20805       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20806 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20807     else
20808       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20809       if test "x$IS_MODERN_MAKE" = x; then
20810         { $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
20811 $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;}
20812       else
20813         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20814           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20815             MAKE_EXPECTED_ENV='cygwin'
20816           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20817             MAKE_EXPECTED_ENV='msys'
20818           else
20819             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20820           fi
20821           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20822           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20823         else
20824           # Not relevant for non-Windows
20825           IS_MAKE_CORRECT_ENV=true
20826         fi
20827         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20828           { $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
20829 $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;}
20830         else
20831           FOUND_MAKE=$MAKE_CANDIDATE
20832 
20833   # Only process if variable expands to non-empty
20834 
20835   if test "x$FOUND_MAKE" != x; then
20836     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20837 
20838   # First separate the path from the arguments. This will split at the first
20839   # space.
20840   complete="$FOUND_MAKE"
20841   path="${complete%% *}"
20842   tmp="$complete EOL"
20843   arguments="${tmp#* }"
20844 
20845   # Input might be given as Windows format, start by converting to
20846   # unix format.
20847   new_path=`$CYGPATH -u "$path"`
20848 
20849   # Now try to locate executable using which
20850   new_path=`$WHICH "$new_path" 2> /dev/null`
20851   # bat and cmd files are not always considered executable in cygwin causing which
20852   # to not find them
20853   if test "x$new_path" = x \
20854       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20855       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20856     new_path=`$CYGPATH -u "$path"`
20857   fi
20858   if test "x$new_path" = x; then
20859     # Oops. Which didn't find the executable.
20860     # The splitting of arguments from the executable at a space might have been incorrect,
20861     # since paths with space are more likely in Windows. Give it another try with the whole
20862     # argument.
20863     path="$complete"
20864     arguments="EOL"
20865     new_path=`$CYGPATH -u "$path"`
20866     new_path=`$WHICH "$new_path" 2> /dev/null`
20867     # bat and cmd files are not always considered executable in cygwin causing which
20868     # to not find them
20869     if test "x$new_path" = x \
20870         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20871         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20872       new_path=`$CYGPATH -u "$path"`
20873     fi
20874     if test "x$new_path" = x; then
20875       # It's still not found. Now this is an unrecoverable error.
20876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20877 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20878       has_space=`$ECHO "$complete" | $GREP " "`
20879       if test "x$has_space" != x; then
20880         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20881 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20882       fi
20883       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20884     fi
20885   fi
20886 
20887   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20888   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20889   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20890   # "foo.exe" is OK but "foo" is an error.
20891   #
20892   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20893   # It is also a way to make sure we got the proper file name for the real test later on.
20894   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20895   if test "x$test_shortpath" = x; then
20896     # Short path failed, file does not exist as specified.
20897     # Try adding .exe or .cmd
20898     if test -f "${new_path}.exe"; then
20899       input_to_shortpath="${new_path}.exe"
20900     elif test -f "${new_path}.cmd"; then
20901       input_to_shortpath="${new_path}.cmd"
20902     else
20903       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20904 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20905       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20906 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20907       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20908     fi
20909   else
20910     input_to_shortpath="$new_path"
20911   fi
20912 
20913   # Call helper function which possibly converts this using DOS-style short mode.
20914   # If so, the updated path is stored in $new_path.
20915   new_path="$input_to_shortpath"
20916 
20917   input_path="$input_to_shortpath"
20918   # Check if we need to convert this using DOS-style short mode. If the path
20919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20920   # take no chances and rewrite it.
20921   # Note: m4 eats our [], so we need to use [ and ] instead.
20922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20923   if test "x$has_forbidden_chars" != x; then
20924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20928       # Going to short mode and back again did indeed matter. Since short mode is
20929       # case insensitive, let's make it lowercase to improve readability.
20930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20931       # Now convert it back to Unix-style (cygpath)
20932       input_path=`$CYGPATH -u "$shortmode_path"`
20933       new_path="$input_path"
20934     fi
20935   fi
20936 
20937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20938   if test "x$test_cygdrive_prefix" = x; then
20939     # As a simple fix, exclude /usr/bin since it's not a real path.
20940     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20942       # a path prefixed by /cygdrive for fixpath to work.
20943       new_path="$CYGWIN_ROOT_PATH$input_path"
20944     fi
20945   fi
20946 
20947   # remove trailing .exe if any
20948   new_path="${new_path/%.exe/}"
20949 
20950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20951 
20952   # First separate the path from the arguments. This will split at the first
20953   # space.
20954   complete="$FOUND_MAKE"
20955   path="${complete%% *}"
20956   tmp="$complete EOL"
20957   arguments="${tmp#* }"
20958 
20959   # Input might be given as Windows format, start by converting to
20960   # unix format.
20961   new_path="$path"
20962 
20963   windows_path="$new_path"
20964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20965     unix_path=`$CYGPATH -u "$windows_path"`
20966     new_path="$unix_path"
20967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20968     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20969     new_path="$unix_path"
20970   fi
20971 
20972 
20973   # Now try to locate executable using which
20974   new_path=`$WHICH "$new_path" 2> /dev/null`
20975 
20976   if test "x$new_path" = x; then
20977     # Oops. Which didn't find the executable.
20978     # The splitting of arguments from the executable at a space might have been incorrect,
20979     # since paths with space are more likely in Windows. Give it another try with the whole
20980     # argument.
20981     path="$complete"
20982     arguments="EOL"
20983     new_path="$path"
20984 
20985   windows_path="$new_path"
20986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20987     unix_path=`$CYGPATH -u "$windows_path"`
20988     new_path="$unix_path"
20989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20991     new_path="$unix_path"
20992   fi
20993 
20994 
20995     new_path=`$WHICH "$new_path" 2> /dev/null`
20996     # bat and cmd files are not always considered executable in MSYS causing which
20997     # to not find them
20998     if test "x$new_path" = x \
20999         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21000         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21001       new_path="$path"
21002 
21003   windows_path="$new_path"
21004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21005     unix_path=`$CYGPATH -u "$windows_path"`
21006     new_path="$unix_path"
21007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21009     new_path="$unix_path"
21010   fi
21011 
21012     fi
21013 
21014     if test "x$new_path" = x; then
21015       # It's still not found. Now this is an unrecoverable error.
21016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21017 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21018       has_space=`$ECHO "$complete" | $GREP " "`
21019       if test "x$has_space" != x; then
21020         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21021 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21022       fi
21023       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21024     fi
21025   fi
21026 
21027   # Now new_path has a complete unix path to the binary
21028   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21029     # Keep paths in /bin as-is, but remove trailing .exe if any
21030     new_path="${new_path/%.exe/}"
21031     # Do not save /bin paths to all_fixpath_prefixes!
21032   else
21033     # Not in mixed or Windows style, start by that.
21034     new_path=`cmd //c echo $new_path`
21035 
21036   input_path="$new_path"
21037   # Check if we need to convert this using DOS-style short mode. If the path
21038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21039   # take no chances and rewrite it.
21040   # Note: m4 eats our [], so we need to use [ and ] instead.
21041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21042   if test "x$has_forbidden_chars" != x; then
21043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21044     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21045   fi
21046 
21047     # Output is in $new_path
21048 
21049   windows_path="$new_path"
21050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21051     unix_path=`$CYGPATH -u "$windows_path"`
21052     new_path="$unix_path"
21053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21055     new_path="$unix_path"
21056   fi
21057 
21058     # remove trailing .exe if any
21059     new_path="${new_path/%.exe/}"
21060 
21061     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21062     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21063   fi
21064 
21065     else
21066       # We're on a unix platform. Hooray! :)
21067       # First separate the path from the arguments. This will split at the first
21068       # space.
21069       complete="$FOUND_MAKE"
21070       path="${complete%% *}"
21071       tmp="$complete EOL"
21072       arguments="${tmp#* }"
21073 
21074       # Cannot rely on the command "which" here since it doesn't always work.
21075       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21076       if test -z "$is_absolute_path"; then
21077         # Path to executable is not absolute. Find it.
21078         IFS_save="$IFS"
21079         IFS=:
21080         for p in $PATH; do
21081           if test -f "$p/$path" && test -x "$p/$path"; then
21082             new_path="$p/$path"
21083             break
21084           fi
21085         done
21086         IFS="$IFS_save"
21087       else
21088         # This is an absolute path, we can use it without further modifications.
21089         new_path="$path"
21090       fi
21091 
21092       if test "x$new_path" = x; then
21093         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21094 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21095         has_space=`$ECHO "$complete" | $GREP " "`
21096         if test "x$has_space" != x; then
21097           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21098 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21099         fi
21100         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21101       fi
21102     fi
21103 
21104     # Now join together the path and the arguments once again
21105     if test "x$arguments" != xEOL; then
21106       new_complete="$new_path ${arguments% *}"
21107     else
21108       new_complete="$new_path"
21109     fi
21110 
21111     if test "x$complete" != "x$new_complete"; then
21112       FOUND_MAKE="$new_complete"
21113       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21114 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21115     fi
21116   fi
21117 
21118         fi
21119       fi
21120     fi
21121   fi
21122 
21123     if test "x$FOUND_MAKE" = x; then
21124       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21125     fi
21126 
21127   fi
21128 
21129 
21130   MAKE=$FOUND_MAKE
21131 
21132   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21133 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21134 
21135 
21136   # Check if make supports the output sync option and if so, setup using it.
21137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21138 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21139   if $MAKE --version -O > /dev/null 2>&1; then
21140     OUTPUT_SYNC_SUPPORTED=true
21141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21142 $as_echo "yes" >&6; }
21143     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21144 $as_echo_n "checking for output-sync value... " >&6; }
21145 
21146 # Check whether --with-output-sync was given.
21147 if test "${with_output_sync+set}" = set; then :
21148   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21149 fi
21150 
21151     if test "x$OUTPUT_SYNC" = "x"; then
21152       OUTPUT_SYNC=none
21153     fi
21154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21155 $as_echo "$OUTPUT_SYNC" >&6; }
21156     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21157       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21158     fi
21159   else
21160     OUTPUT_SYNC_SUPPORTED=false
21161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21162 $as_echo "no" >&6; }
21163   fi
21164 
21165 
21166 
21167 
21168 
21169 
21170   # Test if find supports -delete
21171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21172 $as_echo_n "checking if find supports -delete... " >&6; }
21173   FIND_DELETE="-delete"
21174 
21175   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21176 
21177   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21178 
21179   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21180   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21181     # No, it does not.
21182     $RM $DELETEDIR/TestIfFindSupportsDelete
21183     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21184       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21185       FIND_DELETE="-print | $XARGS $RM"
21186     else
21187       FIND_DELETE="-exec $RM \{\} \+"
21188     fi
21189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21190 $as_echo "no" >&6; }
21191   else
21192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21193 $as_echo "yes" >&6; }
21194   fi
21195   $RMDIR $DELETEDIR
21196 
21197 
21198 
21199   # Test which kind of tar was found
21200   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21201     TAR_TYPE="gnu"
21202   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21203     TAR_TYPE="bsd"
21204   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21205     TAR_TYPE="solaris"
21206   fi
21207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21208 $as_echo_n "checking what type of tar was found... " >&6; }
21209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21210 $as_echo "$TAR_TYPE" >&6; }
21211 
21212   TAR_CREATE_FILE_PARAM=""
21213 
21214   if test "x$TAR_TYPE" = "xgnu"; then
21215     TAR_INCLUDE_PARAM="T"
21216     TAR_SUPPORTS_TRANSFORM="true"
21217     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21218       # When using gnu tar for Solaris targets, need to use compatibility mode
21219       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21220     fi
21221   else
21222     TAR_INCLUDE_PARAM="I"
21223     TAR_SUPPORTS_TRANSFORM="false"
21224   fi
21225 
21226 
21227 
21228 
21229 
21230 
21231   # These tools might not be installed by default,
21232   # need hint on how to install them.
21233 
21234 
21235 
21236   # Publish this variable in the help.
21237 
21238 
21239   if [ -z "${UNZIP+x}" ]; then
21240     # The variable is not set by user, try to locate tool using the code snippet
21241     for ac_prog in unzip
21242 do
21243   # Extract the first word of "$ac_prog", so it can be a program name with args.
21244 set dummy $ac_prog; ac_word=$2
21245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21246 $as_echo_n "checking for $ac_word... " >&6; }
21247 if ${ac_cv_path_UNZIP+:} false; then :
21248   $as_echo_n "(cached) " >&6
21249 else
21250   case $UNZIP in
21251   [\\/]* | ?:[\\/]*)
21252   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21253   ;;
21254   *)
21255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256 for as_dir in $PATH
21257 do
21258   IFS=$as_save_IFS
21259   test -z "$as_dir" && as_dir=.
21260     for ac_exec_ext in '' $ac_executable_extensions; do
21261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21262     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264     break 2
21265   fi
21266 done
21267   done
21268 IFS=$as_save_IFS
21269 
21270   ;;
21271 esac
21272 fi
21273 UNZIP=$ac_cv_path_UNZIP
21274 if test -n "$UNZIP"; then
21275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21276 $as_echo "$UNZIP" >&6; }
21277 else
21278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21279 $as_echo "no" >&6; }
21280 fi
21281 
21282 
21283   test -n "$UNZIP" && break
21284 done
21285 
21286   else
21287     # The variable is set, but is it from the command line or the environment?
21288 
21289     # Try to remove the string !UNZIP! from our list.
21290     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21291     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21292       # If it failed, the variable was not from the command line. Ignore it,
21293       # but warn the user (except for BASH, which is always set by the calling BASH).
21294       if test "xUNZIP" != xBASH; then
21295         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21296 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21297       fi
21298       # Try to locate tool using the code snippet
21299       for ac_prog in unzip
21300 do
21301   # Extract the first word of "$ac_prog", so it can be a program name with args.
21302 set dummy $ac_prog; ac_word=$2
21303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21304 $as_echo_n "checking for $ac_word... " >&6; }
21305 if ${ac_cv_path_UNZIP+:} false; then :
21306   $as_echo_n "(cached) " >&6
21307 else
21308   case $UNZIP in
21309   [\\/]* | ?:[\\/]*)
21310   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21311   ;;
21312   *)
21313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21314 for as_dir in $PATH
21315 do
21316   IFS=$as_save_IFS
21317   test -z "$as_dir" && as_dir=.
21318     for ac_exec_ext in '' $ac_executable_extensions; do
21319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21320     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21322     break 2
21323   fi
21324 done
21325   done
21326 IFS=$as_save_IFS
21327 
21328   ;;
21329 esac
21330 fi
21331 UNZIP=$ac_cv_path_UNZIP
21332 if test -n "$UNZIP"; then
21333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21334 $as_echo "$UNZIP" >&6; }
21335 else
21336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21337 $as_echo "no" >&6; }
21338 fi
21339 
21340 
21341   test -n "$UNZIP" && break
21342 done
21343 
21344     else
21345       # If it succeeded, then it was overridden by the user. We will use it
21346       # for the tool.
21347 
21348       # First remove it from the list of overridden variables, so we can test
21349       # for unknown variables in the end.
21350       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21351 
21352       # Check if we try to supply an empty value
21353       if test "x$UNZIP" = x; then
21354         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21355 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21357 $as_echo_n "checking for UNZIP... " >&6; }
21358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21359 $as_echo "disabled" >&6; }
21360       else
21361         # Check if the provided tool contains a complete path.
21362         tool_specified="$UNZIP"
21363         tool_basename="${tool_specified##*/}"
21364         if test "x$tool_basename" = "x$tool_specified"; then
21365           # A command without a complete path is provided, search $PATH.
21366           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21367 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21368           # Extract the first word of "$tool_basename", so it can be a program name with args.
21369 set dummy $tool_basename; ac_word=$2
21370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21371 $as_echo_n "checking for $ac_word... " >&6; }
21372 if ${ac_cv_path_UNZIP+:} false; then :
21373   $as_echo_n "(cached) " >&6
21374 else
21375   case $UNZIP in
21376   [\\/]* | ?:[\\/]*)
21377   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21378   ;;
21379   *)
21380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21381 for as_dir in $PATH
21382 do
21383   IFS=$as_save_IFS
21384   test -z "$as_dir" && as_dir=.
21385     for ac_exec_ext in '' $ac_executable_extensions; do
21386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21387     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21389     break 2
21390   fi
21391 done
21392   done
21393 IFS=$as_save_IFS
21394 
21395   ;;
21396 esac
21397 fi
21398 UNZIP=$ac_cv_path_UNZIP
21399 if test -n "$UNZIP"; then
21400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21401 $as_echo "$UNZIP" >&6; }
21402 else
21403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21404 $as_echo "no" >&6; }
21405 fi
21406 
21407 
21408           if test "x$UNZIP" = x; then
21409             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21410           fi
21411         else
21412           # Otherwise we believe it is a complete path. Use it as it is.
21413           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21414 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21415           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21416 $as_echo_n "checking for UNZIP... " >&6; }
21417           if test ! -x "$tool_specified"; then
21418             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21419 $as_echo "not found" >&6; }
21420             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21421           fi
21422           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21423 $as_echo "$tool_specified" >&6; }
21424         fi
21425       fi
21426     fi
21427 
21428   fi
21429 
21430 
21431 
21432   if test "x$UNZIP" = x; then
21433     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21434   fi
21435 
21436 
21437 
21438 
21439 
21440   # Publish this variable in the help.
21441 
21442 
21443   if [ -z "${ZIP+x}" ]; then
21444     # The variable is not set by user, try to locate tool using the code snippet
21445     for ac_prog in zip
21446 do
21447   # Extract the first word of "$ac_prog", so it can be a program name with args.
21448 set dummy $ac_prog; ac_word=$2
21449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21450 $as_echo_n "checking for $ac_word... " >&6; }
21451 if ${ac_cv_path_ZIP+:} false; then :
21452   $as_echo_n "(cached) " >&6
21453 else
21454   case $ZIP in
21455   [\\/]* | ?:[\\/]*)
21456   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21457   ;;
21458   *)
21459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460 for as_dir in $PATH
21461 do
21462   IFS=$as_save_IFS
21463   test -z "$as_dir" && as_dir=.
21464     for ac_exec_ext in '' $ac_executable_extensions; do
21465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21466     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21468     break 2
21469   fi
21470 done
21471   done
21472 IFS=$as_save_IFS
21473 
21474   ;;
21475 esac
21476 fi
21477 ZIP=$ac_cv_path_ZIP
21478 if test -n "$ZIP"; then
21479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21480 $as_echo "$ZIP" >&6; }
21481 else
21482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21483 $as_echo "no" >&6; }
21484 fi
21485 
21486 
21487   test -n "$ZIP" && break
21488 done
21489 
21490   else
21491     # The variable is set, but is it from the command line or the environment?
21492 
21493     # Try to remove the string !ZIP! from our list.
21494     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21495     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21496       # If it failed, the variable was not from the command line. Ignore it,
21497       # but warn the user (except for BASH, which is always set by the calling BASH).
21498       if test "xZIP" != xBASH; then
21499         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21500 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21501       fi
21502       # Try to locate tool using the code snippet
21503       for ac_prog in zip
21504 do
21505   # Extract the first word of "$ac_prog", so it can be a program name with args.
21506 set dummy $ac_prog; ac_word=$2
21507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21508 $as_echo_n "checking for $ac_word... " >&6; }
21509 if ${ac_cv_path_ZIP+:} false; then :
21510   $as_echo_n "(cached) " >&6
21511 else
21512   case $ZIP in
21513   [\\/]* | ?:[\\/]*)
21514   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21515   ;;
21516   *)
21517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21518 for as_dir in $PATH
21519 do
21520   IFS=$as_save_IFS
21521   test -z "$as_dir" && as_dir=.
21522     for ac_exec_ext in '' $ac_executable_extensions; do
21523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21524     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21526     break 2
21527   fi
21528 done
21529   done
21530 IFS=$as_save_IFS
21531 
21532   ;;
21533 esac
21534 fi
21535 ZIP=$ac_cv_path_ZIP
21536 if test -n "$ZIP"; then
21537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21538 $as_echo "$ZIP" >&6; }
21539 else
21540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21541 $as_echo "no" >&6; }
21542 fi
21543 
21544 
21545   test -n "$ZIP" && break
21546 done
21547 
21548     else
21549       # If it succeeded, then it was overridden by the user. We will use it
21550       # for the tool.
21551 
21552       # First remove it from the list of overridden variables, so we can test
21553       # for unknown variables in the end.
21554       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21555 
21556       # Check if we try to supply an empty value
21557       if test "x$ZIP" = x; then
21558         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21559 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21560         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21561 $as_echo_n "checking for ZIP... " >&6; }
21562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21563 $as_echo "disabled" >&6; }
21564       else
21565         # Check if the provided tool contains a complete path.
21566         tool_specified="$ZIP"
21567         tool_basename="${tool_specified##*/}"
21568         if test "x$tool_basename" = "x$tool_specified"; then
21569           # A command without a complete path is provided, search $PATH.
21570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21571 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21572           # Extract the first word of "$tool_basename", so it can be a program name with args.
21573 set dummy $tool_basename; ac_word=$2
21574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21575 $as_echo_n "checking for $ac_word... " >&6; }
21576 if ${ac_cv_path_ZIP+:} false; then :
21577   $as_echo_n "(cached) " >&6
21578 else
21579   case $ZIP in
21580   [\\/]* | ?:[\\/]*)
21581   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21582   ;;
21583   *)
21584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21585 for as_dir in $PATH
21586 do
21587   IFS=$as_save_IFS
21588   test -z "$as_dir" && as_dir=.
21589     for ac_exec_ext in '' $ac_executable_extensions; do
21590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21591     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21593     break 2
21594   fi
21595 done
21596   done
21597 IFS=$as_save_IFS
21598 
21599   ;;
21600 esac
21601 fi
21602 ZIP=$ac_cv_path_ZIP
21603 if test -n "$ZIP"; then
21604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21605 $as_echo "$ZIP" >&6; }
21606 else
21607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21608 $as_echo "no" >&6; }
21609 fi
21610 
21611 
21612           if test "x$ZIP" = x; then
21613             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21614           fi
21615         else
21616           # Otherwise we believe it is a complete path. Use it as it is.
21617           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21618 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21619           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21620 $as_echo_n "checking for ZIP... " >&6; }
21621           if test ! -x "$tool_specified"; then
21622             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21623 $as_echo "not found" >&6; }
21624             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21625           fi
21626           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21627 $as_echo "$tool_specified" >&6; }
21628         fi
21629       fi
21630     fi
21631 
21632   fi
21633 
21634 
21635 
21636   if test "x$ZIP" = x; then
21637     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21638   fi
21639 
21640 
21641 
21642   # Non-required basic tools
21643 
21644 
21645 
21646   # Publish this variable in the help.
21647 
21648 
21649   if [ -z "${LDD+x}" ]; then
21650     # The variable is not set by user, try to locate tool using the code snippet
21651     for ac_prog in ldd
21652 do
21653   # Extract the first word of "$ac_prog", so it can be a program name with args.
21654 set dummy $ac_prog; ac_word=$2
21655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21656 $as_echo_n "checking for $ac_word... " >&6; }
21657 if ${ac_cv_path_LDD+:} false; then :
21658   $as_echo_n "(cached) " >&6
21659 else
21660   case $LDD in
21661   [\\/]* | ?:[\\/]*)
21662   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21663   ;;
21664   *)
21665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21666 for as_dir in $PATH
21667 do
21668   IFS=$as_save_IFS
21669   test -z "$as_dir" && as_dir=.
21670     for ac_exec_ext in '' $ac_executable_extensions; do
21671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21672     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21674     break 2
21675   fi
21676 done
21677   done
21678 IFS=$as_save_IFS
21679 
21680   ;;
21681 esac
21682 fi
21683 LDD=$ac_cv_path_LDD
21684 if test -n "$LDD"; then
21685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21686 $as_echo "$LDD" >&6; }
21687 else
21688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21689 $as_echo "no" >&6; }
21690 fi
21691 
21692 
21693   test -n "$LDD" && break
21694 done
21695 
21696   else
21697     # The variable is set, but is it from the command line or the environment?
21698 
21699     # Try to remove the string !LDD! from our list.
21700     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21701     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21702       # If it failed, the variable was not from the command line. Ignore it,
21703       # but warn the user (except for BASH, which is always set by the calling BASH).
21704       if test "xLDD" != xBASH; then
21705         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21706 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21707       fi
21708       # Try to locate tool using the code snippet
21709       for ac_prog in ldd
21710 do
21711   # Extract the first word of "$ac_prog", so it can be a program name with args.
21712 set dummy $ac_prog; ac_word=$2
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21714 $as_echo_n "checking for $ac_word... " >&6; }
21715 if ${ac_cv_path_LDD+:} false; then :
21716   $as_echo_n "(cached) " >&6
21717 else
21718   case $LDD in
21719   [\\/]* | ?:[\\/]*)
21720   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21721   ;;
21722   *)
21723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21724 for as_dir in $PATH
21725 do
21726   IFS=$as_save_IFS
21727   test -z "$as_dir" && as_dir=.
21728     for ac_exec_ext in '' $ac_executable_extensions; do
21729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21730     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21732     break 2
21733   fi
21734 done
21735   done
21736 IFS=$as_save_IFS
21737 
21738   ;;
21739 esac
21740 fi
21741 LDD=$ac_cv_path_LDD
21742 if test -n "$LDD"; then
21743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21744 $as_echo "$LDD" >&6; }
21745 else
21746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21747 $as_echo "no" >&6; }
21748 fi
21749 
21750 
21751   test -n "$LDD" && break
21752 done
21753 
21754     else
21755       # If it succeeded, then it was overridden by the user. We will use it
21756       # for the tool.
21757 
21758       # First remove it from the list of overridden variables, so we can test
21759       # for unknown variables in the end.
21760       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21761 
21762       # Check if we try to supply an empty value
21763       if test "x$LDD" = x; then
21764         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21765 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21767 $as_echo_n "checking for LDD... " >&6; }
21768         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21769 $as_echo "disabled" >&6; }
21770       else
21771         # Check if the provided tool contains a complete path.
21772         tool_specified="$LDD"
21773         tool_basename="${tool_specified##*/}"
21774         if test "x$tool_basename" = "x$tool_specified"; then
21775           # A command without a complete path is provided, search $PATH.
21776           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21777 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21778           # Extract the first word of "$tool_basename", so it can be a program name with args.
21779 set dummy $tool_basename; ac_word=$2
21780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21781 $as_echo_n "checking for $ac_word... " >&6; }
21782 if ${ac_cv_path_LDD+:} false; then :
21783   $as_echo_n "(cached) " >&6
21784 else
21785   case $LDD in
21786   [\\/]* | ?:[\\/]*)
21787   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21788   ;;
21789   *)
21790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21791 for as_dir in $PATH
21792 do
21793   IFS=$as_save_IFS
21794   test -z "$as_dir" && as_dir=.
21795     for ac_exec_ext in '' $ac_executable_extensions; do
21796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21797     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21799     break 2
21800   fi
21801 done
21802   done
21803 IFS=$as_save_IFS
21804 
21805   ;;
21806 esac
21807 fi
21808 LDD=$ac_cv_path_LDD
21809 if test -n "$LDD"; then
21810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21811 $as_echo "$LDD" >&6; }
21812 else
21813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21814 $as_echo "no" >&6; }
21815 fi
21816 
21817 
21818           if test "x$LDD" = x; then
21819             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21820           fi
21821         else
21822           # Otherwise we believe it is a complete path. Use it as it is.
21823           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21824 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21825           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21826 $as_echo_n "checking for LDD... " >&6; }
21827           if test ! -x "$tool_specified"; then
21828             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21829 $as_echo "not found" >&6; }
21830             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21831           fi
21832           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21833 $as_echo "$tool_specified" >&6; }
21834         fi
21835       fi
21836     fi
21837 
21838   fi
21839 
21840 
21841   if test "x$LDD" = "x"; then
21842     # List shared lib dependencies is used for
21843     # debug output and checking for forbidden dependencies.
21844     # We can build without it.
21845     LDD="true"
21846   fi
21847 
21848 
21849   # Publish this variable in the help.
21850 
21851 
21852   if [ -z "${OTOOL+x}" ]; then
21853     # The variable is not set by user, try to locate tool using the code snippet
21854     for ac_prog in otool
21855 do
21856   # Extract the first word of "$ac_prog", so it can be a program name with args.
21857 set dummy $ac_prog; ac_word=$2
21858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21859 $as_echo_n "checking for $ac_word... " >&6; }
21860 if ${ac_cv_path_OTOOL+:} false; then :
21861   $as_echo_n "(cached) " >&6
21862 else
21863   case $OTOOL in
21864   [\\/]* | ?:[\\/]*)
21865   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21866   ;;
21867   *)
21868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21869 for as_dir in $PATH
21870 do
21871   IFS=$as_save_IFS
21872   test -z "$as_dir" && as_dir=.
21873     for ac_exec_ext in '' $ac_executable_extensions; do
21874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21875     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21877     break 2
21878   fi
21879 done
21880   done
21881 IFS=$as_save_IFS
21882 
21883   ;;
21884 esac
21885 fi
21886 OTOOL=$ac_cv_path_OTOOL
21887 if test -n "$OTOOL"; then
21888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21889 $as_echo "$OTOOL" >&6; }
21890 else
21891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21892 $as_echo "no" >&6; }
21893 fi
21894 
21895 
21896   test -n "$OTOOL" && break
21897 done
21898 
21899   else
21900     # The variable is set, but is it from the command line or the environment?
21901 
21902     # Try to remove the string !OTOOL! from our list.
21903     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21904     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21905       # If it failed, the variable was not from the command line. Ignore it,
21906       # but warn the user (except for BASH, which is always set by the calling BASH).
21907       if test "xOTOOL" != xBASH; then
21908         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21909 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21910       fi
21911       # Try to locate tool using the code snippet
21912       for ac_prog in otool
21913 do
21914   # Extract the first word of "$ac_prog", so it can be a program name with args.
21915 set dummy $ac_prog; ac_word=$2
21916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21917 $as_echo_n "checking for $ac_word... " >&6; }
21918 if ${ac_cv_path_OTOOL+:} false; then :
21919   $as_echo_n "(cached) " >&6
21920 else
21921   case $OTOOL in
21922   [\\/]* | ?:[\\/]*)
21923   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21924   ;;
21925   *)
21926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21927 for as_dir in $PATH
21928 do
21929   IFS=$as_save_IFS
21930   test -z "$as_dir" && as_dir=.
21931     for ac_exec_ext in '' $ac_executable_extensions; do
21932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21933     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21935     break 2
21936   fi
21937 done
21938   done
21939 IFS=$as_save_IFS
21940 
21941   ;;
21942 esac
21943 fi
21944 OTOOL=$ac_cv_path_OTOOL
21945 if test -n "$OTOOL"; then
21946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21947 $as_echo "$OTOOL" >&6; }
21948 else
21949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21950 $as_echo "no" >&6; }
21951 fi
21952 
21953 
21954   test -n "$OTOOL" && break
21955 done
21956 
21957     else
21958       # If it succeeded, then it was overridden by the user. We will use it
21959       # for the tool.
21960 
21961       # First remove it from the list of overridden variables, so we can test
21962       # for unknown variables in the end.
21963       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21964 
21965       # Check if we try to supply an empty value
21966       if test "x$OTOOL" = x; then
21967         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21968 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21969         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21970 $as_echo_n "checking for OTOOL... " >&6; }
21971         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21972 $as_echo "disabled" >&6; }
21973       else
21974         # Check if the provided tool contains a complete path.
21975         tool_specified="$OTOOL"
21976         tool_basename="${tool_specified##*/}"
21977         if test "x$tool_basename" = "x$tool_specified"; then
21978           # A command without a complete path is provided, search $PATH.
21979           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21980 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21981           # Extract the first word of "$tool_basename", so it can be a program name with args.
21982 set dummy $tool_basename; ac_word=$2
21983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21984 $as_echo_n "checking for $ac_word... " >&6; }
21985 if ${ac_cv_path_OTOOL+:} false; then :
21986   $as_echo_n "(cached) " >&6
21987 else
21988   case $OTOOL in
21989   [\\/]* | ?:[\\/]*)
21990   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21991   ;;
21992   *)
21993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21994 for as_dir in $PATH
21995 do
21996   IFS=$as_save_IFS
21997   test -z "$as_dir" && as_dir=.
21998     for ac_exec_ext in '' $ac_executable_extensions; do
21999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22000     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22002     break 2
22003   fi
22004 done
22005   done
22006 IFS=$as_save_IFS
22007 
22008   ;;
22009 esac
22010 fi
22011 OTOOL=$ac_cv_path_OTOOL
22012 if test -n "$OTOOL"; then
22013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22014 $as_echo "$OTOOL" >&6; }
22015 else
22016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22017 $as_echo "no" >&6; }
22018 fi
22019 
22020 
22021           if test "x$OTOOL" = x; then
22022             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22023           fi
22024         else
22025           # Otherwise we believe it is a complete path. Use it as it is.
22026           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22027 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22028           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22029 $as_echo_n "checking for OTOOL... " >&6; }
22030           if test ! -x "$tool_specified"; then
22031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22032 $as_echo "not found" >&6; }
22033             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22034           fi
22035           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22036 $as_echo "$tool_specified" >&6; }
22037         fi
22038       fi
22039     fi
22040 
22041   fi
22042 
22043 
22044   if test "x$OTOOL" = "x"; then
22045     OTOOL="true"
22046   fi
22047 
22048 
22049   # Publish this variable in the help.
22050 
22051 
22052   if [ -z "${READELF+x}" ]; then
22053     # The variable is not set by user, try to locate tool using the code snippet
22054     for ac_prog in greadelf readelf
22055 do
22056   # Extract the first word of "$ac_prog", so it can be a program name with args.
22057 set dummy $ac_prog; ac_word=$2
22058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22059 $as_echo_n "checking for $ac_word... " >&6; }
22060 if ${ac_cv_path_READELF+:} false; then :
22061   $as_echo_n "(cached) " >&6
22062 else
22063   case $READELF in
22064   [\\/]* | ?:[\\/]*)
22065   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22066   ;;
22067   *)
22068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22069 for as_dir in $PATH
22070 do
22071   IFS=$as_save_IFS
22072   test -z "$as_dir" && as_dir=.
22073     for ac_exec_ext in '' $ac_executable_extensions; do
22074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22075     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22077     break 2
22078   fi
22079 done
22080   done
22081 IFS=$as_save_IFS
22082 
22083   ;;
22084 esac
22085 fi
22086 READELF=$ac_cv_path_READELF
22087 if test -n "$READELF"; then
22088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22089 $as_echo "$READELF" >&6; }
22090 else
22091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22092 $as_echo "no" >&6; }
22093 fi
22094 
22095 
22096   test -n "$READELF" && break
22097 done
22098 
22099   else
22100     # The variable is set, but is it from the command line or the environment?
22101 
22102     # Try to remove the string !READELF! from our list.
22103     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22104     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22105       # If it failed, the variable was not from the command line. Ignore it,
22106       # but warn the user (except for BASH, which is always set by the calling BASH).
22107       if test "xREADELF" != xBASH; then
22108         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22109 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22110       fi
22111       # Try to locate tool using the code snippet
22112       for ac_prog in greadelf readelf
22113 do
22114   # Extract the first word of "$ac_prog", so it can be a program name with args.
22115 set dummy $ac_prog; ac_word=$2
22116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22117 $as_echo_n "checking for $ac_word... " >&6; }
22118 if ${ac_cv_path_READELF+:} false; then :
22119   $as_echo_n "(cached) " >&6
22120 else
22121   case $READELF in
22122   [\\/]* | ?:[\\/]*)
22123   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22124   ;;
22125   *)
22126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22127 for as_dir in $PATH
22128 do
22129   IFS=$as_save_IFS
22130   test -z "$as_dir" && as_dir=.
22131     for ac_exec_ext in '' $ac_executable_extensions; do
22132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22133     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22135     break 2
22136   fi
22137 done
22138   done
22139 IFS=$as_save_IFS
22140 
22141   ;;
22142 esac
22143 fi
22144 READELF=$ac_cv_path_READELF
22145 if test -n "$READELF"; then
22146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22147 $as_echo "$READELF" >&6; }
22148 else
22149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22150 $as_echo "no" >&6; }
22151 fi
22152 
22153 
22154   test -n "$READELF" && break
22155 done
22156 
22157     else
22158       # If it succeeded, then it was overridden by the user. We will use it
22159       # for the tool.
22160 
22161       # First remove it from the list of overridden variables, so we can test
22162       # for unknown variables in the end.
22163       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22164 
22165       # Check if we try to supply an empty value
22166       if test "x$READELF" = x; then
22167         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22168 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22170 $as_echo_n "checking for READELF... " >&6; }
22171         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22172 $as_echo "disabled" >&6; }
22173       else
22174         # Check if the provided tool contains a complete path.
22175         tool_specified="$READELF"
22176         tool_basename="${tool_specified##*/}"
22177         if test "x$tool_basename" = "x$tool_specified"; then
22178           # A command without a complete path is provided, search $PATH.
22179           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22180 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22181           # Extract the first word of "$tool_basename", so it can be a program name with args.
22182 set dummy $tool_basename; ac_word=$2
22183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22184 $as_echo_n "checking for $ac_word... " >&6; }
22185 if ${ac_cv_path_READELF+:} false; then :
22186   $as_echo_n "(cached) " >&6
22187 else
22188   case $READELF in
22189   [\\/]* | ?:[\\/]*)
22190   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22191   ;;
22192   *)
22193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22194 for as_dir in $PATH
22195 do
22196   IFS=$as_save_IFS
22197   test -z "$as_dir" && as_dir=.
22198     for ac_exec_ext in '' $ac_executable_extensions; do
22199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22200     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22202     break 2
22203   fi
22204 done
22205   done
22206 IFS=$as_save_IFS
22207 
22208   ;;
22209 esac
22210 fi
22211 READELF=$ac_cv_path_READELF
22212 if test -n "$READELF"; then
22213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22214 $as_echo "$READELF" >&6; }
22215 else
22216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22217 $as_echo "no" >&6; }
22218 fi
22219 
22220 
22221           if test "x$READELF" = x; then
22222             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22223           fi
22224         else
22225           # Otherwise we believe it is a complete path. Use it as it is.
22226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22227 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22228           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22229 $as_echo_n "checking for READELF... " >&6; }
22230           if test ! -x "$tool_specified"; then
22231             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22232 $as_echo "not found" >&6; }
22233             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22234           fi
22235           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22236 $as_echo "$tool_specified" >&6; }
22237         fi
22238       fi
22239     fi
22240 
22241   fi
22242 
22243 
22244 
22245 
22246   # Publish this variable in the help.
22247 
22248 
22249   if [ -z "${HG+x}" ]; then
22250     # The variable is not set by user, try to locate tool using the code snippet
22251     for ac_prog in hg
22252 do
22253   # Extract the first word of "$ac_prog", so it can be a program name with args.
22254 set dummy $ac_prog; ac_word=$2
22255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22256 $as_echo_n "checking for $ac_word... " >&6; }
22257 if ${ac_cv_path_HG+:} false; then :
22258   $as_echo_n "(cached) " >&6
22259 else
22260   case $HG in
22261   [\\/]* | ?:[\\/]*)
22262   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22263   ;;
22264   *)
22265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22266 for as_dir in $PATH
22267 do
22268   IFS=$as_save_IFS
22269   test -z "$as_dir" && as_dir=.
22270     for ac_exec_ext in '' $ac_executable_extensions; do
22271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22272     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22274     break 2
22275   fi
22276 done
22277   done
22278 IFS=$as_save_IFS
22279 
22280   ;;
22281 esac
22282 fi
22283 HG=$ac_cv_path_HG
22284 if test -n "$HG"; then
22285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22286 $as_echo "$HG" >&6; }
22287 else
22288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22289 $as_echo "no" >&6; }
22290 fi
22291 
22292 
22293   test -n "$HG" && break
22294 done
22295 
22296   else
22297     # The variable is set, but is it from the command line or the environment?
22298 
22299     # Try to remove the string !HG! from our list.
22300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22302       # If it failed, the variable was not from the command line. Ignore it,
22303       # but warn the user (except for BASH, which is always set by the calling BASH).
22304       if test "xHG" != xBASH; then
22305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22306 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22307       fi
22308       # Try to locate tool using the code snippet
22309       for ac_prog in hg
22310 do
22311   # Extract the first word of "$ac_prog", so it can be a program name with args.
22312 set dummy $ac_prog; ac_word=$2
22313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22314 $as_echo_n "checking for $ac_word... " >&6; }
22315 if ${ac_cv_path_HG+:} false; then :
22316   $as_echo_n "(cached) " >&6
22317 else
22318   case $HG in
22319   [\\/]* | ?:[\\/]*)
22320   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22321   ;;
22322   *)
22323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22324 for as_dir in $PATH
22325 do
22326   IFS=$as_save_IFS
22327   test -z "$as_dir" && as_dir=.
22328     for ac_exec_ext in '' $ac_executable_extensions; do
22329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22330     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22332     break 2
22333   fi
22334 done
22335   done
22336 IFS=$as_save_IFS
22337 
22338   ;;
22339 esac
22340 fi
22341 HG=$ac_cv_path_HG
22342 if test -n "$HG"; then
22343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22344 $as_echo "$HG" >&6; }
22345 else
22346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22347 $as_echo "no" >&6; }
22348 fi
22349 
22350 
22351   test -n "$HG" && break
22352 done
22353 
22354     else
22355       # If it succeeded, then it was overridden by the user. We will use it
22356       # for the tool.
22357 
22358       # First remove it from the list of overridden variables, so we can test
22359       # for unknown variables in the end.
22360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22361 
22362       # Check if we try to supply an empty value
22363       if test "x$HG" = x; then
22364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22365 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22367 $as_echo_n "checking for HG... " >&6; }
22368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22369 $as_echo "disabled" >&6; }
22370       else
22371         # Check if the provided tool contains a complete path.
22372         tool_specified="$HG"
22373         tool_basename="${tool_specified##*/}"
22374         if test "x$tool_basename" = "x$tool_specified"; then
22375           # A command without a complete path is provided, search $PATH.
22376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22377 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22378           # Extract the first word of "$tool_basename", so it can be a program name with args.
22379 set dummy $tool_basename; ac_word=$2
22380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22381 $as_echo_n "checking for $ac_word... " >&6; }
22382 if ${ac_cv_path_HG+:} false; then :
22383   $as_echo_n "(cached) " >&6
22384 else
22385   case $HG in
22386   [\\/]* | ?:[\\/]*)
22387   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22388   ;;
22389   *)
22390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22391 for as_dir in $PATH
22392 do
22393   IFS=$as_save_IFS
22394   test -z "$as_dir" && as_dir=.
22395     for ac_exec_ext in '' $ac_executable_extensions; do
22396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22397     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22399     break 2
22400   fi
22401 done
22402   done
22403 IFS=$as_save_IFS
22404 
22405   ;;
22406 esac
22407 fi
22408 HG=$ac_cv_path_HG
22409 if test -n "$HG"; then
22410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22411 $as_echo "$HG" >&6; }
22412 else
22413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22414 $as_echo "no" >&6; }
22415 fi
22416 
22417 
22418           if test "x$HG" = x; then
22419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22420           fi
22421         else
22422           # Otherwise we believe it is a complete path. Use it as it is.
22423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22424 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22426 $as_echo_n "checking for HG... " >&6; }
22427           if test ! -x "$tool_specified"; then
22428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22429 $as_echo "not found" >&6; }
22430             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22431           fi
22432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22433 $as_echo "$tool_specified" >&6; }
22434         fi
22435       fi
22436     fi
22437 
22438   fi
22439 
22440 
22441 
22442 
22443   # Publish this variable in the help.
22444 
22445 
22446   if [ -z "${STAT+x}" ]; then
22447     # The variable is not set by user, try to locate tool using the code snippet
22448     for ac_prog in stat
22449 do
22450   # Extract the first word of "$ac_prog", so it can be a program name with args.
22451 set dummy $ac_prog; ac_word=$2
22452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22453 $as_echo_n "checking for $ac_word... " >&6; }
22454 if ${ac_cv_path_STAT+:} false; then :
22455   $as_echo_n "(cached) " >&6
22456 else
22457   case $STAT in
22458   [\\/]* | ?:[\\/]*)
22459   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22460   ;;
22461   *)
22462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22463 for as_dir in $PATH
22464 do
22465   IFS=$as_save_IFS
22466   test -z "$as_dir" && as_dir=.
22467     for ac_exec_ext in '' $ac_executable_extensions; do
22468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22469     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22471     break 2
22472   fi
22473 done
22474   done
22475 IFS=$as_save_IFS
22476 
22477   ;;
22478 esac
22479 fi
22480 STAT=$ac_cv_path_STAT
22481 if test -n "$STAT"; then
22482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22483 $as_echo "$STAT" >&6; }
22484 else
22485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22486 $as_echo "no" >&6; }
22487 fi
22488 
22489 
22490   test -n "$STAT" && break
22491 done
22492 
22493   else
22494     # The variable is set, but is it from the command line or the environment?
22495 
22496     # Try to remove the string !STAT! from our list.
22497     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22498     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22499       # If it failed, the variable was not from the command line. Ignore it,
22500       # but warn the user (except for BASH, which is always set by the calling BASH).
22501       if test "xSTAT" != xBASH; then
22502         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22503 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22504       fi
22505       # Try to locate tool using the code snippet
22506       for ac_prog in stat
22507 do
22508   # Extract the first word of "$ac_prog", so it can be a program name with args.
22509 set dummy $ac_prog; ac_word=$2
22510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22511 $as_echo_n "checking for $ac_word... " >&6; }
22512 if ${ac_cv_path_STAT+:} false; then :
22513   $as_echo_n "(cached) " >&6
22514 else
22515   case $STAT in
22516   [\\/]* | ?:[\\/]*)
22517   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22518   ;;
22519   *)
22520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22521 for as_dir in $PATH
22522 do
22523   IFS=$as_save_IFS
22524   test -z "$as_dir" && as_dir=.
22525     for ac_exec_ext in '' $ac_executable_extensions; do
22526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22527     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22529     break 2
22530   fi
22531 done
22532   done
22533 IFS=$as_save_IFS
22534 
22535   ;;
22536 esac
22537 fi
22538 STAT=$ac_cv_path_STAT
22539 if test -n "$STAT"; then
22540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22541 $as_echo "$STAT" >&6; }
22542 else
22543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22544 $as_echo "no" >&6; }
22545 fi
22546 
22547 
22548   test -n "$STAT" && break
22549 done
22550 
22551     else
22552       # If it succeeded, then it was overridden by the user. We will use it
22553       # for the tool.
22554 
22555       # First remove it from the list of overridden variables, so we can test
22556       # for unknown variables in the end.
22557       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22558 
22559       # Check if we try to supply an empty value
22560       if test "x$STAT" = x; then
22561         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22562 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22564 $as_echo_n "checking for STAT... " >&6; }
22565         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22566 $as_echo "disabled" >&6; }
22567       else
22568         # Check if the provided tool contains a complete path.
22569         tool_specified="$STAT"
22570         tool_basename="${tool_specified##*/}"
22571         if test "x$tool_basename" = "x$tool_specified"; then
22572           # A command without a complete path is provided, search $PATH.
22573           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22574 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22575           # Extract the first word of "$tool_basename", so it can be a program name with args.
22576 set dummy $tool_basename; ac_word=$2
22577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22578 $as_echo_n "checking for $ac_word... " >&6; }
22579 if ${ac_cv_path_STAT+:} false; then :
22580   $as_echo_n "(cached) " >&6
22581 else
22582   case $STAT in
22583   [\\/]* | ?:[\\/]*)
22584   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22585   ;;
22586   *)
22587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22588 for as_dir in $PATH
22589 do
22590   IFS=$as_save_IFS
22591   test -z "$as_dir" && as_dir=.
22592     for ac_exec_ext in '' $ac_executable_extensions; do
22593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22594     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22596     break 2
22597   fi
22598 done
22599   done
22600 IFS=$as_save_IFS
22601 
22602   ;;
22603 esac
22604 fi
22605 STAT=$ac_cv_path_STAT
22606 if test -n "$STAT"; then
22607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22608 $as_echo "$STAT" >&6; }
22609 else
22610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22611 $as_echo "no" >&6; }
22612 fi
22613 
22614 
22615           if test "x$STAT" = x; then
22616             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22617           fi
22618         else
22619           # Otherwise we believe it is a complete path. Use it as it is.
22620           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22621 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22622           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22623 $as_echo_n "checking for STAT... " >&6; }
22624           if test ! -x "$tool_specified"; then
22625             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22626 $as_echo "not found" >&6; }
22627             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22628           fi
22629           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22630 $as_echo "$tool_specified" >&6; }
22631         fi
22632       fi
22633     fi
22634 
22635   fi
22636 
22637 
22638 
22639 
22640   # Publish this variable in the help.
22641 
22642 
22643   if [ -z "${TIME+x}" ]; then
22644     # The variable is not set by user, try to locate tool using the code snippet
22645     for ac_prog in time
22646 do
22647   # Extract the first word of "$ac_prog", so it can be a program name with args.
22648 set dummy $ac_prog; ac_word=$2
22649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22650 $as_echo_n "checking for $ac_word... " >&6; }
22651 if ${ac_cv_path_TIME+:} false; then :
22652   $as_echo_n "(cached) " >&6
22653 else
22654   case $TIME in
22655   [\\/]* | ?:[\\/]*)
22656   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22657   ;;
22658   *)
22659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22660 for as_dir in $PATH
22661 do
22662   IFS=$as_save_IFS
22663   test -z "$as_dir" && as_dir=.
22664     for ac_exec_ext in '' $ac_executable_extensions; do
22665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22666     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22668     break 2
22669   fi
22670 done
22671   done
22672 IFS=$as_save_IFS
22673 
22674   ;;
22675 esac
22676 fi
22677 TIME=$ac_cv_path_TIME
22678 if test -n "$TIME"; then
22679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22680 $as_echo "$TIME" >&6; }
22681 else
22682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22683 $as_echo "no" >&6; }
22684 fi
22685 
22686 
22687   test -n "$TIME" && break
22688 done
22689 
22690   else
22691     # The variable is set, but is it from the command line or the environment?
22692 
22693     # Try to remove the string !TIME! from our list.
22694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22696       # If it failed, the variable was not from the command line. Ignore it,
22697       # but warn the user (except for BASH, which is always set by the calling BASH).
22698       if test "xTIME" != xBASH; then
22699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22700 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22701       fi
22702       # Try to locate tool using the code snippet
22703       for ac_prog in time
22704 do
22705   # Extract the first word of "$ac_prog", so it can be a program name with args.
22706 set dummy $ac_prog; ac_word=$2
22707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22708 $as_echo_n "checking for $ac_word... " >&6; }
22709 if ${ac_cv_path_TIME+:} false; then :
22710   $as_echo_n "(cached) " >&6
22711 else
22712   case $TIME in
22713   [\\/]* | ?:[\\/]*)
22714   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22715   ;;
22716   *)
22717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22718 for as_dir in $PATH
22719 do
22720   IFS=$as_save_IFS
22721   test -z "$as_dir" && as_dir=.
22722     for ac_exec_ext in '' $ac_executable_extensions; do
22723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22724     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22726     break 2
22727   fi
22728 done
22729   done
22730 IFS=$as_save_IFS
22731 
22732   ;;
22733 esac
22734 fi
22735 TIME=$ac_cv_path_TIME
22736 if test -n "$TIME"; then
22737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22738 $as_echo "$TIME" >&6; }
22739 else
22740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22741 $as_echo "no" >&6; }
22742 fi
22743 
22744 
22745   test -n "$TIME" && break
22746 done
22747 
22748     else
22749       # If it succeeded, then it was overridden by the user. We will use it
22750       # for the tool.
22751 
22752       # First remove it from the list of overridden variables, so we can test
22753       # for unknown variables in the end.
22754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22755 
22756       # Check if we try to supply an empty value
22757       if test "x$TIME" = x; then
22758         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22759 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22761 $as_echo_n "checking for TIME... " >&6; }
22762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22763 $as_echo "disabled" >&6; }
22764       else
22765         # Check if the provided tool contains a complete path.
22766         tool_specified="$TIME"
22767         tool_basename="${tool_specified##*/}"
22768         if test "x$tool_basename" = "x$tool_specified"; then
22769           # A command without a complete path is provided, search $PATH.
22770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22771 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22772           # Extract the first word of "$tool_basename", so it can be a program name with args.
22773 set dummy $tool_basename; ac_word=$2
22774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22775 $as_echo_n "checking for $ac_word... " >&6; }
22776 if ${ac_cv_path_TIME+:} false; then :
22777   $as_echo_n "(cached) " >&6
22778 else
22779   case $TIME in
22780   [\\/]* | ?:[\\/]*)
22781   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22782   ;;
22783   *)
22784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22785 for as_dir in $PATH
22786 do
22787   IFS=$as_save_IFS
22788   test -z "$as_dir" && as_dir=.
22789     for ac_exec_ext in '' $ac_executable_extensions; do
22790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22791     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22793     break 2
22794   fi
22795 done
22796   done
22797 IFS=$as_save_IFS
22798 
22799   ;;
22800 esac
22801 fi
22802 TIME=$ac_cv_path_TIME
22803 if test -n "$TIME"; then
22804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22805 $as_echo "$TIME" >&6; }
22806 else
22807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22808 $as_echo "no" >&6; }
22809 fi
22810 
22811 
22812           if test "x$TIME" = x; then
22813             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22814           fi
22815         else
22816           # Otherwise we believe it is a complete path. Use it as it is.
22817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22818 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22819           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22820 $as_echo_n "checking for TIME... " >&6; }
22821           if test ! -x "$tool_specified"; then
22822             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22823 $as_echo "not found" >&6; }
22824             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22825           fi
22826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22827 $as_echo "$tool_specified" >&6; }
22828         fi
22829       fi
22830     fi
22831 
22832   fi
22833 
22834 
22835   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22836   # be in the user path.
22837 
22838 
22839   # Publish this variable in the help.
22840 
22841 
22842   if [ -z "${DTRACE+x}" ]; then
22843     # The variable is not set by user, try to locate tool using the code snippet
22844     for ac_prog in dtrace
22845 do
22846   # Extract the first word of "$ac_prog", so it can be a program name with args.
22847 set dummy $ac_prog; ac_word=$2
22848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22849 $as_echo_n "checking for $ac_word... " >&6; }
22850 if ${ac_cv_path_DTRACE+:} false; then :
22851   $as_echo_n "(cached) " >&6
22852 else
22853   case $DTRACE in
22854   [\\/]* | ?:[\\/]*)
22855   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22856   ;;
22857   *)
22858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22859 as_dummy="$PATH:/usr/sbin"
22860 for as_dir in $as_dummy
22861 do
22862   IFS=$as_save_IFS
22863   test -z "$as_dir" && as_dir=.
22864     for ac_exec_ext in '' $ac_executable_extensions; do
22865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22866     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22868     break 2
22869   fi
22870 done
22871   done
22872 IFS=$as_save_IFS
22873 
22874   ;;
22875 esac
22876 fi
22877 DTRACE=$ac_cv_path_DTRACE
22878 if test -n "$DTRACE"; then
22879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22880 $as_echo "$DTRACE" >&6; }
22881 else
22882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22883 $as_echo "no" >&6; }
22884 fi
22885 
22886 
22887   test -n "$DTRACE" && break
22888 done
22889 
22890   else
22891     # The variable is set, but is it from the command line or the environment?
22892 
22893     # Try to remove the string !DTRACE! from our list.
22894     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22895     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22896       # If it failed, the variable was not from the command line. Ignore it,
22897       # but warn the user (except for BASH, which is always set by the calling BASH).
22898       if test "xDTRACE" != xBASH; then
22899         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22900 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22901       fi
22902       # Try to locate tool using the code snippet
22903       for ac_prog in dtrace
22904 do
22905   # Extract the first word of "$ac_prog", so it can be a program name with args.
22906 set dummy $ac_prog; ac_word=$2
22907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22908 $as_echo_n "checking for $ac_word... " >&6; }
22909 if ${ac_cv_path_DTRACE+:} false; then :
22910   $as_echo_n "(cached) " >&6
22911 else
22912   case $DTRACE in
22913   [\\/]* | ?:[\\/]*)
22914   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22915   ;;
22916   *)
22917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22918 as_dummy="$PATH:/usr/sbin"
22919 for as_dir in $as_dummy
22920 do
22921   IFS=$as_save_IFS
22922   test -z "$as_dir" && as_dir=.
22923     for ac_exec_ext in '' $ac_executable_extensions; do
22924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22925     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22927     break 2
22928   fi
22929 done
22930   done
22931 IFS=$as_save_IFS
22932 
22933   ;;
22934 esac
22935 fi
22936 DTRACE=$ac_cv_path_DTRACE
22937 if test -n "$DTRACE"; then
22938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22939 $as_echo "$DTRACE" >&6; }
22940 else
22941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22942 $as_echo "no" >&6; }
22943 fi
22944 
22945 
22946   test -n "$DTRACE" && break
22947 done
22948 
22949     else
22950       # If it succeeded, then it was overridden by the user. We will use it
22951       # for the tool.
22952 
22953       # First remove it from the list of overridden variables, so we can test
22954       # for unknown variables in the end.
22955       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22956 
22957       # Check if we try to supply an empty value
22958       if test "x$DTRACE" = x; then
22959         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22960 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22961         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22962 $as_echo_n "checking for DTRACE... " >&6; }
22963         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22964 $as_echo "disabled" >&6; }
22965       else
22966         # Check if the provided tool contains a complete path.
22967         tool_specified="$DTRACE"
22968         tool_basename="${tool_specified##*/}"
22969         if test "x$tool_basename" = "x$tool_specified"; then
22970           # A command without a complete path is provided, search $PATH.
22971           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22972 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22973           # Extract the first word of "$tool_basename", so it can be a program name with args.
22974 set dummy $tool_basename; ac_word=$2
22975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22976 $as_echo_n "checking for $ac_word... " >&6; }
22977 if ${ac_cv_path_DTRACE+:} false; then :
22978   $as_echo_n "(cached) " >&6
22979 else
22980   case $DTRACE in
22981   [\\/]* | ?:[\\/]*)
22982   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22983   ;;
22984   *)
22985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22986 for as_dir in $PATH
22987 do
22988   IFS=$as_save_IFS
22989   test -z "$as_dir" && as_dir=.
22990     for ac_exec_ext in '' $ac_executable_extensions; do
22991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22992     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22994     break 2
22995   fi
22996 done
22997   done
22998 IFS=$as_save_IFS
22999 
23000   ;;
23001 esac
23002 fi
23003 DTRACE=$ac_cv_path_DTRACE
23004 if test -n "$DTRACE"; then
23005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23006 $as_echo "$DTRACE" >&6; }
23007 else
23008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23009 $as_echo "no" >&6; }
23010 fi
23011 
23012 
23013           if test "x$DTRACE" = x; then
23014             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23015           fi
23016         else
23017           # Otherwise we believe it is a complete path. Use it as it is.
23018           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23019 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23020           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23021 $as_echo_n "checking for DTRACE... " >&6; }
23022           if test ! -x "$tool_specified"; then
23023             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23024 $as_echo "not found" >&6; }
23025             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23026           fi
23027           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23028 $as_echo "$tool_specified" >&6; }
23029         fi
23030       fi
23031     fi
23032 
23033   fi
23034 
23035 
23036 
23037 
23038   # Publish this variable in the help.
23039 
23040 
23041   if [ -z "${PATCH+x}" ]; then
23042     # The variable is not set by user, try to locate tool using the code snippet
23043     for ac_prog in gpatch patch
23044 do
23045   # Extract the first word of "$ac_prog", so it can be a program name with args.
23046 set dummy $ac_prog; ac_word=$2
23047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23048 $as_echo_n "checking for $ac_word... " >&6; }
23049 if ${ac_cv_path_PATCH+:} false; then :
23050   $as_echo_n "(cached) " >&6
23051 else
23052   case $PATCH in
23053   [\\/]* | ?:[\\/]*)
23054   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23055   ;;
23056   *)
23057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23058 for as_dir in $PATH
23059 do
23060   IFS=$as_save_IFS
23061   test -z "$as_dir" && as_dir=.
23062     for ac_exec_ext in '' $ac_executable_extensions; do
23063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23064     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23066     break 2
23067   fi
23068 done
23069   done
23070 IFS=$as_save_IFS
23071 
23072   ;;
23073 esac
23074 fi
23075 PATCH=$ac_cv_path_PATCH
23076 if test -n "$PATCH"; then
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23078 $as_echo "$PATCH" >&6; }
23079 else
23080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23081 $as_echo "no" >&6; }
23082 fi
23083 
23084 
23085   test -n "$PATCH" && break
23086 done
23087 
23088   else
23089     # The variable is set, but is it from the command line or the environment?
23090 
23091     # Try to remove the string !PATCH! from our list.
23092     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23093     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23094       # If it failed, the variable was not from the command line. Ignore it,
23095       # but warn the user (except for BASH, which is always set by the calling BASH).
23096       if test "xPATCH" != xBASH; then
23097         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23098 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23099       fi
23100       # Try to locate tool using the code snippet
23101       for ac_prog in gpatch patch
23102 do
23103   # Extract the first word of "$ac_prog", so it can be a program name with args.
23104 set dummy $ac_prog; ac_word=$2
23105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23106 $as_echo_n "checking for $ac_word... " >&6; }
23107 if ${ac_cv_path_PATCH+:} false; then :
23108   $as_echo_n "(cached) " >&6
23109 else
23110   case $PATCH in
23111   [\\/]* | ?:[\\/]*)
23112   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23113   ;;
23114   *)
23115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23116 for as_dir in $PATH
23117 do
23118   IFS=$as_save_IFS
23119   test -z "$as_dir" && as_dir=.
23120     for ac_exec_ext in '' $ac_executable_extensions; do
23121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23122     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23124     break 2
23125   fi
23126 done
23127   done
23128 IFS=$as_save_IFS
23129 
23130   ;;
23131 esac
23132 fi
23133 PATCH=$ac_cv_path_PATCH
23134 if test -n "$PATCH"; then
23135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23136 $as_echo "$PATCH" >&6; }
23137 else
23138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23139 $as_echo "no" >&6; }
23140 fi
23141 
23142 
23143   test -n "$PATCH" && break
23144 done
23145 
23146     else
23147       # If it succeeded, then it was overridden by the user. We will use it
23148       # for the tool.
23149 
23150       # First remove it from the list of overridden variables, so we can test
23151       # for unknown variables in the end.
23152       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23153 
23154       # Check if we try to supply an empty value
23155       if test "x$PATCH" = x; then
23156         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23157 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23159 $as_echo_n "checking for PATCH... " >&6; }
23160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23161 $as_echo "disabled" >&6; }
23162       else
23163         # Check if the provided tool contains a complete path.
23164         tool_specified="$PATCH"
23165         tool_basename="${tool_specified##*/}"
23166         if test "x$tool_basename" = "x$tool_specified"; then
23167           # A command without a complete path is provided, search $PATH.
23168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23169 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23170           # Extract the first word of "$tool_basename", so it can be a program name with args.
23171 set dummy $tool_basename; ac_word=$2
23172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23173 $as_echo_n "checking for $ac_word... " >&6; }
23174 if ${ac_cv_path_PATCH+:} false; then :
23175   $as_echo_n "(cached) " >&6
23176 else
23177   case $PATCH in
23178   [\\/]* | ?:[\\/]*)
23179   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23180   ;;
23181   *)
23182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23183 for as_dir in $PATH
23184 do
23185   IFS=$as_save_IFS
23186   test -z "$as_dir" && as_dir=.
23187     for ac_exec_ext in '' $ac_executable_extensions; do
23188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23189     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23191     break 2
23192   fi
23193 done
23194   done
23195 IFS=$as_save_IFS
23196 
23197   ;;
23198 esac
23199 fi
23200 PATCH=$ac_cv_path_PATCH
23201 if test -n "$PATCH"; then
23202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23203 $as_echo "$PATCH" >&6; }
23204 else
23205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23206 $as_echo "no" >&6; }
23207 fi
23208 
23209 
23210           if test "x$PATCH" = x; then
23211             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23212           fi
23213         else
23214           # Otherwise we believe it is a complete path. Use it as it is.
23215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23216 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23217           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23218 $as_echo_n "checking for PATCH... " >&6; }
23219           if test ! -x "$tool_specified"; then
23220             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23221 $as_echo "not found" >&6; }
23222             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23223           fi
23224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23225 $as_echo "$tool_specified" >&6; }
23226         fi
23227       fi
23228     fi
23229 
23230   fi
23231 
23232 
23233   # Check if it's GNU time
23234   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23235   if test "x$IS_GNU_TIME" != x; then
23236     IS_GNU_TIME=yes
23237   else
23238     IS_GNU_TIME=no
23239   fi
23240 
23241 
23242   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23243 
23244 
23245 
23246   # Publish this variable in the help.
23247 
23248 
23249   if [ -z "${DSYMUTIL+x}" ]; then
23250     # The variable is not set by user, try to locate tool using the code snippet
23251     for ac_prog in dsymutil
23252 do
23253   # Extract the first word of "$ac_prog", so it can be a program name with args.
23254 set dummy $ac_prog; ac_word=$2
23255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23256 $as_echo_n "checking for $ac_word... " >&6; }
23257 if ${ac_cv_path_DSYMUTIL+:} false; then :
23258   $as_echo_n "(cached) " >&6
23259 else
23260   case $DSYMUTIL in
23261   [\\/]* | ?:[\\/]*)
23262   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23263   ;;
23264   *)
23265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23266 for as_dir in $PATH
23267 do
23268   IFS=$as_save_IFS
23269   test -z "$as_dir" && as_dir=.
23270     for ac_exec_ext in '' $ac_executable_extensions; do
23271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23272     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23274     break 2
23275   fi
23276 done
23277   done
23278 IFS=$as_save_IFS
23279 
23280   ;;
23281 esac
23282 fi
23283 DSYMUTIL=$ac_cv_path_DSYMUTIL
23284 if test -n "$DSYMUTIL"; then
23285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23286 $as_echo "$DSYMUTIL" >&6; }
23287 else
23288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23289 $as_echo "no" >&6; }
23290 fi
23291 
23292 
23293   test -n "$DSYMUTIL" && break
23294 done
23295 
23296   else
23297     # The variable is set, but is it from the command line or the environment?
23298 
23299     # Try to remove the string !DSYMUTIL! from our list.
23300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23302       # If it failed, the variable was not from the command line. Ignore it,
23303       # but warn the user (except for BASH, which is always set by the calling BASH).
23304       if test "xDSYMUTIL" != xBASH; then
23305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23306 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23307       fi
23308       # Try to locate tool using the code snippet
23309       for ac_prog in dsymutil
23310 do
23311   # Extract the first word of "$ac_prog", so it can be a program name with args.
23312 set dummy $ac_prog; ac_word=$2
23313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23314 $as_echo_n "checking for $ac_word... " >&6; }
23315 if ${ac_cv_path_DSYMUTIL+:} false; then :
23316   $as_echo_n "(cached) " >&6
23317 else
23318   case $DSYMUTIL in
23319   [\\/]* | ?:[\\/]*)
23320   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23321   ;;
23322   *)
23323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23324 for as_dir in $PATH
23325 do
23326   IFS=$as_save_IFS
23327   test -z "$as_dir" && as_dir=.
23328     for ac_exec_ext in '' $ac_executable_extensions; do
23329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23330     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23332     break 2
23333   fi
23334 done
23335   done
23336 IFS=$as_save_IFS
23337 
23338   ;;
23339 esac
23340 fi
23341 DSYMUTIL=$ac_cv_path_DSYMUTIL
23342 if test -n "$DSYMUTIL"; then
23343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23344 $as_echo "$DSYMUTIL" >&6; }
23345 else
23346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23347 $as_echo "no" >&6; }
23348 fi
23349 
23350 
23351   test -n "$DSYMUTIL" && break
23352 done
23353 
23354     else
23355       # If it succeeded, then it was overridden by the user. We will use it
23356       # for the tool.
23357 
23358       # First remove it from the list of overridden variables, so we can test
23359       # for unknown variables in the end.
23360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23361 
23362       # Check if we try to supply an empty value
23363       if test "x$DSYMUTIL" = x; then
23364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23365 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23367 $as_echo_n "checking for DSYMUTIL... " >&6; }
23368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23369 $as_echo "disabled" >&6; }
23370       else
23371         # Check if the provided tool contains a complete path.
23372         tool_specified="$DSYMUTIL"
23373         tool_basename="${tool_specified##*/}"
23374         if test "x$tool_basename" = "x$tool_specified"; then
23375           # A command without a complete path is provided, search $PATH.
23376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23377 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23378           # Extract the first word of "$tool_basename", so it can be a program name with args.
23379 set dummy $tool_basename; ac_word=$2
23380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23381 $as_echo_n "checking for $ac_word... " >&6; }
23382 if ${ac_cv_path_DSYMUTIL+:} false; then :
23383   $as_echo_n "(cached) " >&6
23384 else
23385   case $DSYMUTIL in
23386   [\\/]* | ?:[\\/]*)
23387   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23388   ;;
23389   *)
23390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23391 for as_dir in $PATH
23392 do
23393   IFS=$as_save_IFS
23394   test -z "$as_dir" && as_dir=.
23395     for ac_exec_ext in '' $ac_executable_extensions; do
23396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23397     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23399     break 2
23400   fi
23401 done
23402   done
23403 IFS=$as_save_IFS
23404 
23405   ;;
23406 esac
23407 fi
23408 DSYMUTIL=$ac_cv_path_DSYMUTIL
23409 if test -n "$DSYMUTIL"; then
23410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23411 $as_echo "$DSYMUTIL" >&6; }
23412 else
23413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23414 $as_echo "no" >&6; }
23415 fi
23416 
23417 
23418           if test "x$DSYMUTIL" = x; then
23419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23420           fi
23421         else
23422           # Otherwise we believe it is a complete path. Use it as it is.
23423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23424 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23426 $as_echo_n "checking for DSYMUTIL... " >&6; }
23427           if test ! -x "$tool_specified"; then
23428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23429 $as_echo "not found" >&6; }
23430             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23431           fi
23432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23433 $as_echo "$tool_specified" >&6; }
23434         fi
23435       fi
23436     fi
23437 
23438   fi
23439 
23440 
23441 
23442   if test "x$DSYMUTIL" = x; then
23443     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23444   fi
23445 
23446 
23447 
23448 
23449 
23450   # Publish this variable in the help.
23451 
23452 
23453   if [ -z "${XATTR+x}" ]; then
23454     # The variable is not set by user, try to locate tool using the code snippet
23455     for ac_prog in xattr
23456 do
23457   # Extract the first word of "$ac_prog", so it can be a program name with args.
23458 set dummy $ac_prog; ac_word=$2
23459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23460 $as_echo_n "checking for $ac_word... " >&6; }
23461 if ${ac_cv_path_XATTR+:} false; then :
23462   $as_echo_n "(cached) " >&6
23463 else
23464   case $XATTR in
23465   [\\/]* | ?:[\\/]*)
23466   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23467   ;;
23468   *)
23469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23470 for as_dir in $PATH
23471 do
23472   IFS=$as_save_IFS
23473   test -z "$as_dir" && as_dir=.
23474     for ac_exec_ext in '' $ac_executable_extensions; do
23475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23476     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23478     break 2
23479   fi
23480 done
23481   done
23482 IFS=$as_save_IFS
23483 
23484   ;;
23485 esac
23486 fi
23487 XATTR=$ac_cv_path_XATTR
23488 if test -n "$XATTR"; then
23489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23490 $as_echo "$XATTR" >&6; }
23491 else
23492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23493 $as_echo "no" >&6; }
23494 fi
23495 
23496 
23497   test -n "$XATTR" && break
23498 done
23499 
23500   else
23501     # The variable is set, but is it from the command line or the environment?
23502 
23503     # Try to remove the string !XATTR! from our list.
23504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23506       # If it failed, the variable was not from the command line. Ignore it,
23507       # but warn the user (except for BASH, which is always set by the calling BASH).
23508       if test "xXATTR" != xBASH; then
23509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23510 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23511       fi
23512       # Try to locate tool using the code snippet
23513       for ac_prog in xattr
23514 do
23515   # Extract the first word of "$ac_prog", so it can be a program name with args.
23516 set dummy $ac_prog; ac_word=$2
23517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23518 $as_echo_n "checking for $ac_word... " >&6; }
23519 if ${ac_cv_path_XATTR+:} false; then :
23520   $as_echo_n "(cached) " >&6
23521 else
23522   case $XATTR in
23523   [\\/]* | ?:[\\/]*)
23524   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23525   ;;
23526   *)
23527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23528 for as_dir in $PATH
23529 do
23530   IFS=$as_save_IFS
23531   test -z "$as_dir" && as_dir=.
23532     for ac_exec_ext in '' $ac_executable_extensions; do
23533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23534     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23536     break 2
23537   fi
23538 done
23539   done
23540 IFS=$as_save_IFS
23541 
23542   ;;
23543 esac
23544 fi
23545 XATTR=$ac_cv_path_XATTR
23546 if test -n "$XATTR"; then
23547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23548 $as_echo "$XATTR" >&6; }
23549 else
23550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23551 $as_echo "no" >&6; }
23552 fi
23553 
23554 
23555   test -n "$XATTR" && break
23556 done
23557 
23558     else
23559       # If it succeeded, then it was overridden by the user. We will use it
23560       # for the tool.
23561 
23562       # First remove it from the list of overridden variables, so we can test
23563       # for unknown variables in the end.
23564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23565 
23566       # Check if we try to supply an empty value
23567       if test "x$XATTR" = x; then
23568         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23569 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23570         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23571 $as_echo_n "checking for XATTR... " >&6; }
23572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23573 $as_echo "disabled" >&6; }
23574       else
23575         # Check if the provided tool contains a complete path.
23576         tool_specified="$XATTR"
23577         tool_basename="${tool_specified##*/}"
23578         if test "x$tool_basename" = "x$tool_specified"; then
23579           # A command without a complete path is provided, search $PATH.
23580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23581 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23582           # Extract the first word of "$tool_basename", so it can be a program name with args.
23583 set dummy $tool_basename; ac_word=$2
23584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23585 $as_echo_n "checking for $ac_word... " >&6; }
23586 if ${ac_cv_path_XATTR+:} false; then :
23587   $as_echo_n "(cached) " >&6
23588 else
23589   case $XATTR in
23590   [\\/]* | ?:[\\/]*)
23591   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23592   ;;
23593   *)
23594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23595 for as_dir in $PATH
23596 do
23597   IFS=$as_save_IFS
23598   test -z "$as_dir" && as_dir=.
23599     for ac_exec_ext in '' $ac_executable_extensions; do
23600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23601     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23603     break 2
23604   fi
23605 done
23606   done
23607 IFS=$as_save_IFS
23608 
23609   ;;
23610 esac
23611 fi
23612 XATTR=$ac_cv_path_XATTR
23613 if test -n "$XATTR"; then
23614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23615 $as_echo "$XATTR" >&6; }
23616 else
23617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23618 $as_echo "no" >&6; }
23619 fi
23620 
23621 
23622           if test "x$XATTR" = x; then
23623             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23624           fi
23625         else
23626           # Otherwise we believe it is a complete path. Use it as it is.
23627           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23628 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23629           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23630 $as_echo_n "checking for XATTR... " >&6; }
23631           if test ! -x "$tool_specified"; then
23632             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23633 $as_echo "not found" >&6; }
23634             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23635           fi
23636           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23637 $as_echo "$tool_specified" >&6; }
23638         fi
23639       fi
23640     fi
23641 
23642   fi
23643 
23644 
23645 
23646   if test "x$XATTR" = x; then
23647     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23648   fi
23649 
23650 
23651 
23652 
23653   # Publish this variable in the help.
23654 
23655 
23656   if [ -z "${CODESIGN+x}" ]; then
23657     # The variable is not set by user, try to locate tool using the code snippet
23658     for ac_prog in codesign
23659 do
23660   # Extract the first word of "$ac_prog", so it can be a program name with args.
23661 set dummy $ac_prog; ac_word=$2
23662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23663 $as_echo_n "checking for $ac_word... " >&6; }
23664 if ${ac_cv_path_CODESIGN+:} false; then :
23665   $as_echo_n "(cached) " >&6
23666 else
23667   case $CODESIGN in
23668   [\\/]* | ?:[\\/]*)
23669   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23670   ;;
23671   *)
23672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23673 for as_dir in $PATH
23674 do
23675   IFS=$as_save_IFS
23676   test -z "$as_dir" && as_dir=.
23677     for ac_exec_ext in '' $ac_executable_extensions; do
23678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23679     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23681     break 2
23682   fi
23683 done
23684   done
23685 IFS=$as_save_IFS
23686 
23687   ;;
23688 esac
23689 fi
23690 CODESIGN=$ac_cv_path_CODESIGN
23691 if test -n "$CODESIGN"; then
23692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23693 $as_echo "$CODESIGN" >&6; }
23694 else
23695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23696 $as_echo "no" >&6; }
23697 fi
23698 
23699 
23700   test -n "$CODESIGN" && break
23701 done
23702 
23703   else
23704     # The variable is set, but is it from the command line or the environment?
23705 
23706     # Try to remove the string !CODESIGN! from our list.
23707     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23708     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23709       # If it failed, the variable was not from the command line. Ignore it,
23710       # but warn the user (except for BASH, which is always set by the calling BASH).
23711       if test "xCODESIGN" != xBASH; then
23712         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23713 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23714       fi
23715       # Try to locate tool using the code snippet
23716       for ac_prog in codesign
23717 do
23718   # Extract the first word of "$ac_prog", so it can be a program name with args.
23719 set dummy $ac_prog; ac_word=$2
23720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23721 $as_echo_n "checking for $ac_word... " >&6; }
23722 if ${ac_cv_path_CODESIGN+:} false; then :
23723   $as_echo_n "(cached) " >&6
23724 else
23725   case $CODESIGN in
23726   [\\/]* | ?:[\\/]*)
23727   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23728   ;;
23729   *)
23730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23731 for as_dir in $PATH
23732 do
23733   IFS=$as_save_IFS
23734   test -z "$as_dir" && as_dir=.
23735     for ac_exec_ext in '' $ac_executable_extensions; do
23736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23737     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23739     break 2
23740   fi
23741 done
23742   done
23743 IFS=$as_save_IFS
23744 
23745   ;;
23746 esac
23747 fi
23748 CODESIGN=$ac_cv_path_CODESIGN
23749 if test -n "$CODESIGN"; then
23750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23751 $as_echo "$CODESIGN" >&6; }
23752 else
23753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23754 $as_echo "no" >&6; }
23755 fi
23756 
23757 
23758   test -n "$CODESIGN" && break
23759 done
23760 
23761     else
23762       # If it succeeded, then it was overridden by the user. We will use it
23763       # for the tool.
23764 
23765       # First remove it from the list of overridden variables, so we can test
23766       # for unknown variables in the end.
23767       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23768 
23769       # Check if we try to supply an empty value
23770       if test "x$CODESIGN" = x; then
23771         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23772 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23773         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23774 $as_echo_n "checking for CODESIGN... " >&6; }
23775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23776 $as_echo "disabled" >&6; }
23777       else
23778         # Check if the provided tool contains a complete path.
23779         tool_specified="$CODESIGN"
23780         tool_basename="${tool_specified##*/}"
23781         if test "x$tool_basename" = "x$tool_specified"; then
23782           # A command without a complete path is provided, search $PATH.
23783           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23784 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23785           # Extract the first word of "$tool_basename", so it can be a program name with args.
23786 set dummy $tool_basename; ac_word=$2
23787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23788 $as_echo_n "checking for $ac_word... " >&6; }
23789 if ${ac_cv_path_CODESIGN+:} false; then :
23790   $as_echo_n "(cached) " >&6
23791 else
23792   case $CODESIGN in
23793   [\\/]* | ?:[\\/]*)
23794   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23795   ;;
23796   *)
23797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23798 for as_dir in $PATH
23799 do
23800   IFS=$as_save_IFS
23801   test -z "$as_dir" && as_dir=.
23802     for ac_exec_ext in '' $ac_executable_extensions; do
23803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23804     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23806     break 2
23807   fi
23808 done
23809   done
23810 IFS=$as_save_IFS
23811 
23812   ;;
23813 esac
23814 fi
23815 CODESIGN=$ac_cv_path_CODESIGN
23816 if test -n "$CODESIGN"; then
23817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23818 $as_echo "$CODESIGN" >&6; }
23819 else
23820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23821 $as_echo "no" >&6; }
23822 fi
23823 
23824 
23825           if test "x$CODESIGN" = x; then
23826             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23827           fi
23828         else
23829           # Otherwise we believe it is a complete path. Use it as it is.
23830           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23831 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23832           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23833 $as_echo_n "checking for CODESIGN... " >&6; }
23834           if test ! -x "$tool_specified"; then
23835             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23836 $as_echo "not found" >&6; }
23837             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23838           fi
23839           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23840 $as_echo "$tool_specified" >&6; }
23841         fi
23842       fi
23843     fi
23844 
23845   fi
23846 
23847 
23848     if test "x$CODESIGN" != "x"; then
23849       # Verify that the openjdk_codesign certificate is present
23850       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23851 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23852       $RM codesign-testfile
23853       $TOUCH codesign-testfile
23854       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23855       $RM codesign-testfile
23856       if test "x$CODESIGN" = x; then
23857         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23858 $as_echo "no" >&6; }
23859       else
23860         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23861 $as_echo "yes" >&6; }
23862       fi
23863     fi
23864 
23865 
23866 
23867   # Publish this variable in the help.
23868 
23869 
23870   if [ -z "${SETFILE+x}" ]; then
23871     # The variable is not set by user, try to locate tool using the code snippet
23872     for ac_prog in SetFile
23873 do
23874   # Extract the first word of "$ac_prog", so it can be a program name with args.
23875 set dummy $ac_prog; ac_word=$2
23876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23877 $as_echo_n "checking for $ac_word... " >&6; }
23878 if ${ac_cv_path_SETFILE+:} false; then :
23879   $as_echo_n "(cached) " >&6
23880 else
23881   case $SETFILE in
23882   [\\/]* | ?:[\\/]*)
23883   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23884   ;;
23885   *)
23886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23887 for as_dir in $PATH
23888 do
23889   IFS=$as_save_IFS
23890   test -z "$as_dir" && as_dir=.
23891     for ac_exec_ext in '' $ac_executable_extensions; do
23892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23893     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23895     break 2
23896   fi
23897 done
23898   done
23899 IFS=$as_save_IFS
23900 
23901   ;;
23902 esac
23903 fi
23904 SETFILE=$ac_cv_path_SETFILE
23905 if test -n "$SETFILE"; then
23906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23907 $as_echo "$SETFILE" >&6; }
23908 else
23909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23910 $as_echo "no" >&6; }
23911 fi
23912 
23913 
23914   test -n "$SETFILE" && break
23915 done
23916 
23917   else
23918     # The variable is set, but is it from the command line or the environment?
23919 
23920     # Try to remove the string !SETFILE! from our list.
23921     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23922     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23923       # If it failed, the variable was not from the command line. Ignore it,
23924       # but warn the user (except for BASH, which is always set by the calling BASH).
23925       if test "xSETFILE" != xBASH; then
23926         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23927 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23928       fi
23929       # Try to locate tool using the code snippet
23930       for ac_prog in SetFile
23931 do
23932   # Extract the first word of "$ac_prog", so it can be a program name with args.
23933 set dummy $ac_prog; ac_word=$2
23934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23935 $as_echo_n "checking for $ac_word... " >&6; }
23936 if ${ac_cv_path_SETFILE+:} false; then :
23937   $as_echo_n "(cached) " >&6
23938 else
23939   case $SETFILE in
23940   [\\/]* | ?:[\\/]*)
23941   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23942   ;;
23943   *)
23944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23945 for as_dir in $PATH
23946 do
23947   IFS=$as_save_IFS
23948   test -z "$as_dir" && as_dir=.
23949     for ac_exec_ext in '' $ac_executable_extensions; do
23950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23951     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23953     break 2
23954   fi
23955 done
23956   done
23957 IFS=$as_save_IFS
23958 
23959   ;;
23960 esac
23961 fi
23962 SETFILE=$ac_cv_path_SETFILE
23963 if test -n "$SETFILE"; then
23964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23965 $as_echo "$SETFILE" >&6; }
23966 else
23967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23968 $as_echo "no" >&6; }
23969 fi
23970 
23971 
23972   test -n "$SETFILE" && break
23973 done
23974 
23975     else
23976       # If it succeeded, then it was overridden by the user. We will use it
23977       # for the tool.
23978 
23979       # First remove it from the list of overridden variables, so we can test
23980       # for unknown variables in the end.
23981       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23982 
23983       # Check if we try to supply an empty value
23984       if test "x$SETFILE" = x; then
23985         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23986 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23987         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23988 $as_echo_n "checking for SETFILE... " >&6; }
23989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23990 $as_echo "disabled" >&6; }
23991       else
23992         # Check if the provided tool contains a complete path.
23993         tool_specified="$SETFILE"
23994         tool_basename="${tool_specified##*/}"
23995         if test "x$tool_basename" = "x$tool_specified"; then
23996           # A command without a complete path is provided, search $PATH.
23997           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23998 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23999           # Extract the first word of "$tool_basename", so it can be a program name with args.
24000 set dummy $tool_basename; ac_word=$2
24001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24002 $as_echo_n "checking for $ac_word... " >&6; }
24003 if ${ac_cv_path_SETFILE+:} false; then :
24004   $as_echo_n "(cached) " >&6
24005 else
24006   case $SETFILE in
24007   [\\/]* | ?:[\\/]*)
24008   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24009   ;;
24010   *)
24011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24012 for as_dir in $PATH
24013 do
24014   IFS=$as_save_IFS
24015   test -z "$as_dir" && as_dir=.
24016     for ac_exec_ext in '' $ac_executable_extensions; do
24017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24018     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24020     break 2
24021   fi
24022 done
24023   done
24024 IFS=$as_save_IFS
24025 
24026   ;;
24027 esac
24028 fi
24029 SETFILE=$ac_cv_path_SETFILE
24030 if test -n "$SETFILE"; then
24031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24032 $as_echo "$SETFILE" >&6; }
24033 else
24034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24035 $as_echo "no" >&6; }
24036 fi
24037 
24038 
24039           if test "x$SETFILE" = x; then
24040             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24041           fi
24042         else
24043           # Otherwise we believe it is a complete path. Use it as it is.
24044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24045 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24046           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24047 $as_echo_n "checking for SETFILE... " >&6; }
24048           if test ! -x "$tool_specified"; then
24049             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24050 $as_echo "not found" >&6; }
24051             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24052           fi
24053           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24054 $as_echo "$tool_specified" >&6; }
24055         fi
24056       fi
24057     fi
24058 
24059   fi
24060 
24061 
24062 
24063   if test "x$SETFILE" = x; then
24064     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24065   fi
24066 
24067 
24068   fi
24069 
24070 
24071   # Test if bash supports pipefail.
24072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24073 $as_echo_n "checking if bash supports pipefail... " >&6; }
24074   if ${BASH} -c 'set -o pipefail'; then
24075     BASH_ARGS="$BASH_ARGS -o pipefail"
24076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24077 $as_echo "yes" >&6; }
24078   else
24079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24080 $as_echo "no" >&6; }
24081   fi
24082 
24083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24084 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24085   if ${BASH} -e -c 'true'; then
24086     BASH_ARGS="$BASH_ARGS -e"
24087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24088 $as_echo "yes" >&6; }
24089   else
24090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24091 $as_echo "no" >&6; }
24092   fi
24093 
24094 
24095 
24096 
24097 # Check if pkg-config is available.
24098 
24099 
24100 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24101         if test -n "$ac_tool_prefix"; then
24102   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24103 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24105 $as_echo_n "checking for $ac_word... " >&6; }
24106 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24107   $as_echo_n "(cached) " >&6
24108 else
24109   case $PKG_CONFIG in
24110   [\\/]* | ?:[\\/]*)
24111   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24112   ;;
24113   *)
24114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24115 for as_dir in $PATH
24116 do
24117   IFS=$as_save_IFS
24118   test -z "$as_dir" && as_dir=.
24119     for ac_exec_ext in '' $ac_executable_extensions; do
24120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24121     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24123     break 2
24124   fi
24125 done
24126   done
24127 IFS=$as_save_IFS
24128 
24129   ;;
24130 esac
24131 fi
24132 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24133 if test -n "$PKG_CONFIG"; then
24134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24135 $as_echo "$PKG_CONFIG" >&6; }
24136 else
24137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24138 $as_echo "no" >&6; }
24139 fi
24140 
24141 
24142 fi
24143 if test -z "$ac_cv_path_PKG_CONFIG"; then
24144   ac_pt_PKG_CONFIG=$PKG_CONFIG
24145   # Extract the first word of "pkg-config", so it can be a program name with args.
24146 set dummy pkg-config; ac_word=$2
24147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24148 $as_echo_n "checking for $ac_word... " >&6; }
24149 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24150   $as_echo_n "(cached) " >&6
24151 else
24152   case $ac_pt_PKG_CONFIG in
24153   [\\/]* | ?:[\\/]*)
24154   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24155   ;;
24156   *)
24157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24158 for as_dir in $PATH
24159 do
24160   IFS=$as_save_IFS
24161   test -z "$as_dir" && as_dir=.
24162     for ac_exec_ext in '' $ac_executable_extensions; do
24163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24164     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24166     break 2
24167   fi
24168 done
24169   done
24170 IFS=$as_save_IFS
24171 
24172   ;;
24173 esac
24174 fi
24175 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24176 if test -n "$ac_pt_PKG_CONFIG"; then
24177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24178 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24179 else
24180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24181 $as_echo "no" >&6; }
24182 fi
24183 
24184   if test "x$ac_pt_PKG_CONFIG" = x; then
24185     PKG_CONFIG=""
24186   else
24187     case $cross_compiling:$ac_tool_warned in
24188 yes:)
24189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24190 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24191 ac_tool_warned=yes ;;
24192 esac
24193     PKG_CONFIG=$ac_pt_PKG_CONFIG
24194   fi
24195 else
24196   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24197 fi
24198 
24199 fi
24200 if test -n "$PKG_CONFIG"; then
24201         _pkg_min_version=0.9.0
24202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24203 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24204         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24205                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24206 $as_echo "yes" >&6; }
24207         else
24208                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24209 $as_echo "no" >&6; }
24210                 PKG_CONFIG=""
24211         fi
24212 
24213 fi
24214 
24215 # After basic tools have been setup, we can check build os specific details.
24216 
24217   ###############################################################################
24218 
24219   # Note that this is the build platform OS version!
24220 
24221   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24222   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24223   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24224   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24225 
24226 
24227 
24228 
24229 
24230 # Misc basic settings
24231 
24232 
24233 # Check whether --with-default-make-target was given.
24234 if test "${with_default_make_target+set}" = set; then :
24235   withval=$with_default_make_target;
24236 fi
24237 
24238   if test "x$with_default_make_target" = "x" \
24239       || test "x$with_default_make_target" = "xyes"; then
24240     DEFAULT_MAKE_TARGET="exploded-image"
24241   elif test "x$with_default_make_target" = "xno"; then
24242     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24243   else
24244     DEFAULT_MAKE_TARGET="$with_default_make_target"
24245   fi
24246 
24247 
24248 
24249 
24250 ###############################################################################
24251 #
24252 # Determine OpenJDK variants, options and version numbers.
24253 #
24254 ###############################################################################
24255 
24256 # We need build & target for this.
24257 
24258   # Should we build a JDK without a graphical UI?
24259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24260 $as_echo_n "checking headless only... " >&6; }
24261   # Check whether --enable-headless-only was given.
24262 if test "${enable_headless_only+set}" = set; then :
24263   enableval=$enable_headless_only;
24264 fi
24265 
24266 
24267   if test "x$enable_headless_only" = "xyes"; then
24268     ENABLE_HEADLESS_ONLY="true"
24269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24270 $as_echo "yes" >&6; }
24271   elif test "x$enable_headless_only" = "xno"; then
24272     ENABLE_HEADLESS_ONLY="false"
24273     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24274 $as_echo "no" >&6; }
24275   elif test "x$enable_headless_only" = "x"; then
24276     ENABLE_HEADLESS_ONLY="false"
24277     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24278 $as_echo "no" >&6; }
24279   else
24280     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24281   fi
24282 
24283 
24284 
24285   # Choose cacerts source file
24286 
24287 # Check whether --with-cacerts-file was given.
24288 if test "${with_cacerts_file+set}" = set; then :
24289   withval=$with_cacerts_file;
24290 fi
24291 
24292   if test "x$with_cacerts_file" != x; then
24293     CACERTS_FILE=$with_cacerts_file
24294   fi
24295 
24296 
24297   # Enable or disable unlimited crypto
24298   # Check whether --enable-unlimited-crypto was given.
24299 if test "${enable_unlimited_crypto+set}" = set; then :
24300   enableval=$enable_unlimited_crypto;
24301 else
24302   enable_unlimited_crypto=no
24303 fi
24304 
24305   if test "x$enable_unlimited_crypto" = "xyes"; then
24306     UNLIMITED_CRYPTO=true
24307   else
24308     UNLIMITED_CRYPTO=false
24309   fi
24310 
24311 
24312   # Should we build the serviceability agent (SA)?
24313   INCLUDE_SA=true
24314   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24315     INCLUDE_SA=false
24316   fi
24317   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24318     INCLUDE_SA=false
24319   fi
24320 
24321 
24322   # Compress jars
24323   COMPRESS_JARS=false
24324 
24325 
24326 
24327   # Setup default copyright year. Mostly overridden when building close to a new year.
24328 
24329 # Check whether --with-copyright-year was given.
24330 if test "${with_copyright_year+set}" = set; then :
24331   withval=$with_copyright_year;
24332 fi
24333 
24334   if test "x$with_copyright_year" = xyes; then
24335     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24336   elif test "x$with_copyright_year" != x; then
24337     COPYRIGHT_YEAR="$with_copyright_year"
24338   else
24339     COPYRIGHT_YEAR=`$DATE +'%Y'`
24340   fi
24341 
24342 
24343 
24344   # Check whether --enable-keep-packaged-modules was given.
24345 if test "${enable_keep_packaged_modules+set}" = set; then :
24346   enableval=$enable_keep_packaged_modules;
24347 fi
24348 
24349 
24350   if test "x$enable_keep_packaged_modules" = "xyes"; then
24351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24352 $as_echo_n "checking if packaged modules are kept... " >&6; }
24353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24354 $as_echo "yes" >&6; }
24355     JLINK_KEEP_PACKAGED_MODULES=true
24356   elif test "x$enable_keep_packaged_modules" = "xno"; then
24357     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24358 $as_echo_n "checking if packaged modules are kept... " >&6; }
24359     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24360 $as_echo "no" >&6; }
24361     JLINK_KEEP_PACKAGED_MODULES=false
24362   elif test "x$enable_keep_packaged_modules" = "x"; then
24363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24364 $as_echo "yes (default)" >&6; }
24365     JLINK_KEEP_PACKAGED_MODULES=true
24366   else
24367     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24368   fi
24369 
24370 
24371 
24372 
24373   # Warn user that old version arguments are deprecated.
24374 
24375 
24376 # Check whether --with-milestone was given.
24377 if test "${with_milestone+set}" = set; then :
24378   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24379 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24380 fi
24381 
24382 
24383 
24384 
24385 # Check whether --with-update-version was given.
24386 if test "${with_update_version+set}" = set; then :
24387   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24388 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24389 fi
24390 
24391 
24392 
24393 
24394 # Check whether --with-user-release-suffix was given.
24395 if test "${with_user_release_suffix+set}" = set; then :
24396   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
24397 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24398 fi
24399 
24400 
24401 
24402 
24403 # Check whether --with-build-number was given.
24404 if test "${with_build_number+set}" = set; then :
24405   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24406 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24407 fi
24408 
24409 
24410 
24411   # Source the version numbers file
24412   . $AUTOCONF_DIR/version-numbers
24413 
24414   # Some non-version number information is set in that file
24415 
24416 
24417 
24418 
24419 
24420 
24421 
24422 
24423 
24424   # Override version from arguments
24425 
24426   # If --with-version-string is set, process it first. It is possible to
24427   # override parts with more specific flags, since these are processed later.
24428 
24429 # Check whether --with-version-string was given.
24430 if test "${with_version_string+set}" = set; then :
24431   withval=$with_version_string;
24432 fi
24433 
24434   if test "x$with_version_string" = xyes; then
24435     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24436   elif test "x$with_version_string" != x; then
24437     # Additional [] needed to keep m4 from mangling shell constructs.
24438     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24439       VERSION_MAJOR=${BASH_REMATCH[1]}
24440       VERSION_MINOR=${BASH_REMATCH[3]}
24441       VERSION_SECURITY=${BASH_REMATCH[5]}
24442       VERSION_PATCH=${BASH_REMATCH[7]}
24443       VERSION_PRE=${BASH_REMATCH[9]}
24444       version_plus_separator=${BASH_REMATCH[11]}
24445       VERSION_BUILD=${BASH_REMATCH[12]}
24446       VERSION_OPT=${BASH_REMATCH[14]}
24447       # Unspecified numerical fields are interpreted as 0.
24448       if test "x$VERSION_MINOR" = x; then
24449         VERSION_MINOR=0
24450       fi
24451       if test "x$VERSION_SECURITY" = x; then
24452         VERSION_SECURITY=0
24453       fi
24454       if test "x$VERSION_PATCH" = x; then
24455         VERSION_PATCH=0
24456       fi
24457       if test "x$version_plus_separator" != x \
24458           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24459         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24460       fi
24461       # Stop the version part process from setting default values.
24462       # We still allow them to explicitely override though.
24463       NO_DEFAULT_VERSION_PARTS=true
24464     else
24465       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24466     fi
24467   fi
24468 
24469 
24470 # Check whether --with-version-pre was given.
24471 if test "${with_version_pre+set}" = set; then :
24472   withval=$with_version_pre; with_version_pre_present=true
24473 else
24474   with_version_pre_present=false
24475 fi
24476 
24477 
24478   if test "x$with_version_pre_present" = xtrue; then
24479     if test "x$with_version_pre" = xyes; then
24480       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24481     elif test "x$with_version_pre" = xno; then
24482       # Interpret --without-* as empty string instead of the literal "no"
24483       VERSION_PRE=
24484     else
24485       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24486        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24487       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24488         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24489 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24490       fi
24491     fi
24492   else
24493     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24494       # Default is to use "internal" as pre
24495       VERSION_PRE="internal"
24496     fi
24497   fi
24498 
24499 
24500 # Check whether --with-version-opt was given.
24501 if test "${with_version_opt+set}" = set; then :
24502   withval=$with_version_opt; with_version_opt_present=true
24503 else
24504   with_version_opt_present=false
24505 fi
24506 
24507 
24508   if test "x$with_version_opt_present" = xtrue; then
24509     if test "x$with_version_opt" = xyes; then
24510       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24511     elif test "x$with_version_opt" = xno; then
24512       # Interpret --without-* as empty string instead of the literal "no"
24513       VERSION_OPT=
24514     else
24515       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24516        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24517       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24518         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24519 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24520       fi
24521     fi
24522   else
24523     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24524       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24525       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24526       # Outer [ ] to quote m4.
24527        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24528       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24529     fi
24530   fi
24531 
24532 
24533 # Check whether --with-version-build was given.
24534 if test "${with_version_build+set}" = set; then :
24535   withval=$with_version_build; with_version_build_present=true
24536 else
24537   with_version_build_present=false
24538 fi
24539 
24540 
24541   if test "x$with_version_build_present" = xtrue; then
24542     if test "x$with_version_build" = xyes; then
24543       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24544     elif test "x$with_version_build" = xno; then
24545       # Interpret --without-* as empty string instead of the literal "no"
24546       VERSION_BUILD=
24547     elif test "x$with_version_build" = x; then
24548       VERSION_BUILD=
24549     else
24550 
24551   # Additional [] needed to keep m4 from mangling shell constructs.
24552   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24553     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24554   fi
24555   # Extract the version number without leading zeros.
24556   cleaned_value=${BASH_REMATCH[1]}
24557   if test "x$cleaned_value" = x; then
24558     # Special case for zero
24559     cleaned_value=${BASH_REMATCH[2]}
24560   fi
24561 
24562   if test $cleaned_value -gt 255; then
24563     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24564   fi
24565   if test "x$cleaned_value" != "x$with_version_build"; then
24566     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24567 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24568   fi
24569   VERSION_BUILD=$cleaned_value
24570 
24571     fi
24572   else
24573     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24574       # Default is to not have a build number.
24575       VERSION_BUILD=""
24576       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24577       VERSION_BUILD=0
24578     fi
24579   fi
24580 
24581 
24582 # Check whether --with-version-major was given.
24583 if test "${with_version_major+set}" = set; then :
24584   withval=$with_version_major; with_version_major_present=true
24585 else
24586   with_version_major_present=false
24587 fi
24588 
24589 
24590   if test "x$with_version_major_present" = xtrue; then
24591     if test "x$with_version_major" = xyes; then
24592       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24593     else
24594 
24595   # Additional [] needed to keep m4 from mangling shell constructs.
24596   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24597     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24598   fi
24599   # Extract the version number without leading zeros.
24600   cleaned_value=${BASH_REMATCH[1]}
24601   if test "x$cleaned_value" = x; then
24602     # Special case for zero
24603     cleaned_value=${BASH_REMATCH[2]}
24604   fi
24605 
24606   if test $cleaned_value -gt 255; then
24607     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24608   fi
24609   if test "x$cleaned_value" != "x$with_version_major"; then
24610     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24611 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24612   fi
24613   VERSION_MAJOR=$cleaned_value
24614 
24615     fi
24616   else
24617     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24618       # Default is to get value from version-numbers
24619       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24620     fi
24621   fi
24622 
24623 
24624 # Check whether --with-version-minor was given.
24625 if test "${with_version_minor+set}" = set; then :
24626   withval=$with_version_minor; with_version_minor_present=true
24627 else
24628   with_version_minor_present=false
24629 fi
24630 
24631 
24632   if test "x$with_version_minor_present" = xtrue; then
24633     if test "x$with_version_minor" = xyes; then
24634       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24635     elif test "x$with_version_minor" = xno; then
24636       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24637       VERSION_MINOR=0
24638     elif test "x$with_version_minor" = x; then
24639       VERSION_MINOR=0
24640     else
24641 
24642   # Additional [] needed to keep m4 from mangling shell constructs.
24643   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24644     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24645   fi
24646   # Extract the version number without leading zeros.
24647   cleaned_value=${BASH_REMATCH[1]}
24648   if test "x$cleaned_value" = x; then
24649     # Special case for zero
24650     cleaned_value=${BASH_REMATCH[2]}
24651   fi
24652 
24653   if test $cleaned_value -gt 255; then
24654     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24655   fi
24656   if test "x$cleaned_value" != "x$with_version_minor"; then
24657     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24658 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24659   fi
24660   VERSION_MINOR=$cleaned_value
24661 
24662     fi
24663   else
24664     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24665       # Default is 0, if unspecified
24666       VERSION_MINOR=0
24667     fi
24668   fi
24669 
24670 
24671 # Check whether --with-version-security was given.
24672 if test "${with_version_security+set}" = set; then :
24673   withval=$with_version_security; with_version_security_present=true
24674 else
24675   with_version_security_present=false
24676 fi
24677 
24678 
24679   if test "x$with_version_security_present" = xtrue; then
24680     if test "x$with_version_security" = xyes; then
24681       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24682     elif test "x$with_version_security" = xno; then
24683       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24684       VERSION_SECURITY=0
24685     elif test "x$with_version_security" = x; then
24686       VERSION_SECURITY=0
24687     else
24688 
24689   # Additional [] needed to keep m4 from mangling shell constructs.
24690   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24691     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24692   fi
24693   # Extract the version number without leading zeros.
24694   cleaned_value=${BASH_REMATCH[1]}
24695   if test "x$cleaned_value" = x; then
24696     # Special case for zero
24697     cleaned_value=${BASH_REMATCH[2]}
24698   fi
24699 
24700   if test $cleaned_value -gt 255; then
24701     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24702   fi
24703   if test "x$cleaned_value" != "x$with_version_security"; then
24704     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24705 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24706   fi
24707   VERSION_SECURITY=$cleaned_value
24708 
24709     fi
24710   else
24711     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24712       # Default is 0, if unspecified
24713       VERSION_SECURITY=0
24714     fi
24715   fi
24716 
24717 
24718 # Check whether --with-version-patch was given.
24719 if test "${with_version_patch+set}" = set; then :
24720   withval=$with_version_patch; with_version_patch_present=true
24721 else
24722   with_version_patch_present=false
24723 fi
24724 
24725 
24726   if test "x$with_version_patch_present" = xtrue; then
24727     if test "x$with_version_patch" = xyes; then
24728       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24729     elif test "x$with_version_patch" = xno; then
24730       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24731       VERSION_PATCH=0
24732     elif test "x$with_version_patch" = x; then
24733       VERSION_PATCH=0
24734     else
24735 
24736   # Additional [] needed to keep m4 from mangling shell constructs.
24737   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24738     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24739   fi
24740   # Extract the version number without leading zeros.
24741   cleaned_value=${BASH_REMATCH[1]}
24742   if test "x$cleaned_value" = x; then
24743     # Special case for zero
24744     cleaned_value=${BASH_REMATCH[2]}
24745   fi
24746 
24747   if test $cleaned_value -gt 255; then
24748     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24749   fi
24750   if test "x$cleaned_value" != "x$with_version_patch"; then
24751     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24752 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24753   fi
24754   VERSION_PATCH=$cleaned_value
24755 
24756     fi
24757   else
24758     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24759       # Default is 0, if unspecified
24760       VERSION_PATCH=0
24761     fi
24762   fi
24763 
24764   # Calculate derived version properties
24765 
24766   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24767   if test "x$VERSION_PRE" = x; then
24768     VERSION_IS_GA=true
24769   else
24770     VERSION_IS_GA=false
24771   fi
24772 
24773   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24774   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24775 
24776   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24777   # Strip trailing zeroes from stripped_version_number
24778   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24779   VERSION_NUMBER=$stripped_version_number
24780 
24781   # The complete version string, with additional build information
24782   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24783     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24784   else
24785     # If either build or opt is set, we need a + separator
24786     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24787   fi
24788 
24789   # The short version string, just VERSION_NUMBER and PRE, if present.
24790   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24791 
24792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24793 $as_echo_n "checking for version string... " >&6; }
24794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24795 $as_echo "$VERSION_STRING" >&6; }
24796 
24797 
24798 
24799 
24800 
24801 
24802 
24803 
24804 
24805 
24806 
24807 
24808 
24809 
24810 
24811 ###############################################################################
24812 #
24813 # Setup BootJDK, used to bootstrap the build.
24814 #
24815 ###############################################################################
24816 
24817 
24818   BOOT_JDK_FOUND=no
24819 
24820 # Check whether --with-boot-jdk was given.
24821 if test "${with_boot_jdk+set}" = set; then :
24822   withval=$with_boot_jdk;
24823 fi
24824 
24825 
24826   # We look for the Boot JDK through various means, going from more certain to
24827   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24828   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24829   # must check if this is indeed valid; otherwise we'll continue looking.
24830 
24831   # Test: Is bootjdk explicitely set by command line arguments?
24832 
24833   if test "x$BOOT_JDK_FOUND" = xno; then
24834     # Now execute the test
24835 
24836   if test "x$with_boot_jdk" != x; then
24837     BOOT_JDK=$with_boot_jdk
24838     BOOT_JDK_FOUND=maybe
24839     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24840 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24841   fi
24842 
24843 
24844     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24845     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24846       # Do we have a bin/java?
24847       if test ! -x "$BOOT_JDK/bin/java"; then
24848         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24849 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24850         BOOT_JDK_FOUND=no
24851       else
24852         # Do we have a bin/javac?
24853         if test ! -x "$BOOT_JDK/bin/javac"; then
24854           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24855 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24856           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24857 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24858           BOOT_JDK_FOUND=no
24859         else
24860           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24861           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24862 
24863           # Extra M4 quote needed to protect [] in grep expression.
24864           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24865           if test "x$FOUND_CORRECT_VERSION" = x; then
24866             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24868             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24869 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24870             BOOT_JDK_FOUND=no
24871           else
24872             # We're done! :-)
24873             BOOT_JDK_FOUND=yes
24874 
24875   # Only process if variable expands to non-empty
24876 
24877   if test "x$BOOT_JDK" != x; then
24878     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24879 
24880   # Input might be given as Windows format, start by converting to
24881   # unix format.
24882   path="$BOOT_JDK"
24883   new_path=`$CYGPATH -u "$path"`
24884 
24885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24888   # "foo.exe" is OK but "foo" is an error.
24889   #
24890   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24891   # It is also a way to make sure we got the proper file name for the real test later on.
24892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24893   if test "x$test_shortpath" = x; then
24894     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24895 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24896     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24897   fi
24898 
24899   # Call helper function which possibly converts this using DOS-style short mode.
24900   # If so, the updated path is stored in $new_path.
24901 
24902   input_path="$new_path"
24903   # Check if we need to convert this using DOS-style short mode. If the path
24904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24905   # take no chances and rewrite it.
24906   # Note: m4 eats our [], so we need to use [ and ] instead.
24907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24908   if test "x$has_forbidden_chars" != x; then
24909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24913       # Going to short mode and back again did indeed matter. Since short mode is
24914       # case insensitive, let's make it lowercase to improve readability.
24915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24916       # Now convert it back to Unix-style (cygpath)
24917       input_path=`$CYGPATH -u "$shortmode_path"`
24918       new_path="$input_path"
24919     fi
24920   fi
24921 
24922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24923   if test "x$test_cygdrive_prefix" = x; then
24924     # As a simple fix, exclude /usr/bin since it's not a real path.
24925     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24927       # a path prefixed by /cygdrive for fixpath to work.
24928       new_path="$CYGWIN_ROOT_PATH$input_path"
24929     fi
24930   fi
24931 
24932 
24933   if test "x$path" != "x$new_path"; then
24934     BOOT_JDK="$new_path"
24935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24936 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24937   fi
24938 
24939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24940 
24941   path="$BOOT_JDK"
24942   has_colon=`$ECHO $path | $GREP ^.:`
24943   new_path="$path"
24944   if test "x$has_colon" = x; then
24945     # Not in mixed or Windows style, start by that.
24946     new_path=`cmd //c echo $path`
24947   fi
24948 
24949 
24950   input_path="$new_path"
24951   # Check if we need to convert this using DOS-style short mode. If the path
24952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24953   # take no chances and rewrite it.
24954   # Note: m4 eats our [], so we need to use [ and ] instead.
24955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24956   if test "x$has_forbidden_chars" != x; then
24957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24959   fi
24960 
24961 
24962   windows_path="$new_path"
24963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24964     unix_path=`$CYGPATH -u "$windows_path"`
24965     new_path="$unix_path"
24966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24968     new_path="$unix_path"
24969   fi
24970 
24971   if test "x$path" != "x$new_path"; then
24972     BOOT_JDK="$new_path"
24973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24975   fi
24976 
24977   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24978   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24979 
24980     else
24981       # We're on a unix platform. Hooray! :)
24982       path="$BOOT_JDK"
24983       has_space=`$ECHO "$path" | $GREP " "`
24984       if test "x$has_space" != x; then
24985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24987         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24988       fi
24989 
24990       # Use eval to expand a potential ~
24991       eval path="$path"
24992       if test ! -f "$path" && test ! -d "$path"; then
24993         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24994       fi
24995 
24996       if test -d "$path"; then
24997         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24998       else
24999         dir="`$DIRNAME "$path"`"
25000         base="`$BASENAME "$path"`"
25001         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25002       fi
25003     fi
25004   fi
25005 
25006             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25007 $as_echo_n "checking for Boot JDK... " >&6; }
25008             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25009 $as_echo "$BOOT_JDK" >&6; }
25010             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25011 $as_echo_n "checking Boot JDK version... " >&6; }
25012             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25013             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25014 $as_echo "$BOOT_JDK_VERSION" >&6; }
25015           fi # end check jdk version
25016         fi # end check javac
25017       fi # end check java
25018     fi # end check boot jdk found
25019   fi
25020 
25021   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25022     # Having specified an argument which is incorrect will produce an instant failure;
25023     # we should not go on looking
25024     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25025   fi
25026 
25027   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25028 
25029   if test "x$BOOT_JDK_FOUND" = xno; then
25030     # Now execute the test
25031 
25032   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25033     # First check at user selected default
25034 
25035   if test "x$BOOT_JDK_FOUND" = xno; then
25036     # Now execute the test
25037 
25038   if test -x /usr/libexec/java_home; then
25039     BOOT_JDK=`/usr/libexec/java_home `
25040     BOOT_JDK_FOUND=maybe
25041     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25042 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25043   fi
25044 
25045 
25046     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25047     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25048       # Do we have a bin/java?
25049       if test ! -x "$BOOT_JDK/bin/java"; then
25050         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25052         BOOT_JDK_FOUND=no
25053       else
25054         # Do we have a bin/javac?
25055         if test ! -x "$BOOT_JDK/bin/javac"; then
25056           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25058           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25059 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25060           BOOT_JDK_FOUND=no
25061         else
25062           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25063           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25064 
25065           # Extra M4 quote needed to protect [] in grep expression.
25066           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25067           if test "x$FOUND_CORRECT_VERSION" = x; then
25068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25070             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25071 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25072             BOOT_JDK_FOUND=no
25073           else
25074             # We're done! :-)
25075             BOOT_JDK_FOUND=yes
25076 
25077   # Only process if variable expands to non-empty
25078 
25079   if test "x$BOOT_JDK" != x; then
25080     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25081 
25082   # Input might be given as Windows format, start by converting to
25083   # unix format.
25084   path="$BOOT_JDK"
25085   new_path=`$CYGPATH -u "$path"`
25086 
25087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25090   # "foo.exe" is OK but "foo" is an error.
25091   #
25092   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25093   # It is also a way to make sure we got the proper file name for the real test later on.
25094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25095   if test "x$test_shortpath" = x; then
25096     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25098     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25099   fi
25100 
25101   # Call helper function which possibly converts this using DOS-style short mode.
25102   # If so, the updated path is stored in $new_path.
25103 
25104   input_path="$new_path"
25105   # Check if we need to convert this using DOS-style short mode. If the path
25106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25107   # take no chances and rewrite it.
25108   # Note: m4 eats our [], so we need to use [ and ] instead.
25109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25110   if test "x$has_forbidden_chars" != x; then
25111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25115       # Going to short mode and back again did indeed matter. Since short mode is
25116       # case insensitive, let's make it lowercase to improve readability.
25117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25118       # Now convert it back to Unix-style (cygpath)
25119       input_path=`$CYGPATH -u "$shortmode_path"`
25120       new_path="$input_path"
25121     fi
25122   fi
25123 
25124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25125   if test "x$test_cygdrive_prefix" = x; then
25126     # As a simple fix, exclude /usr/bin since it's not a real path.
25127     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25129       # a path prefixed by /cygdrive for fixpath to work.
25130       new_path="$CYGWIN_ROOT_PATH$input_path"
25131     fi
25132   fi
25133 
25134 
25135   if test "x$path" != "x$new_path"; then
25136     BOOT_JDK="$new_path"
25137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25138 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25139   fi
25140 
25141     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142 
25143   path="$BOOT_JDK"
25144   has_colon=`$ECHO $path | $GREP ^.:`
25145   new_path="$path"
25146   if test "x$has_colon" = x; then
25147     # Not in mixed or Windows style, start by that.
25148     new_path=`cmd //c echo $path`
25149   fi
25150 
25151 
25152   input_path="$new_path"
25153   # Check if we need to convert this using DOS-style short mode. If the path
25154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25155   # take no chances and rewrite it.
25156   # Note: m4 eats our [], so we need to use [ and ] instead.
25157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25158   if test "x$has_forbidden_chars" != x; then
25159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25161   fi
25162 
25163 
25164   windows_path="$new_path"
25165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25166     unix_path=`$CYGPATH -u "$windows_path"`
25167     new_path="$unix_path"
25168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25170     new_path="$unix_path"
25171   fi
25172 
25173   if test "x$path" != "x$new_path"; then
25174     BOOT_JDK="$new_path"
25175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25177   fi
25178 
25179   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25180   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25181 
25182     else
25183       # We're on a unix platform. Hooray! :)
25184       path="$BOOT_JDK"
25185       has_space=`$ECHO "$path" | $GREP " "`
25186       if test "x$has_space" != x; then
25187         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25188 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25189         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25190       fi
25191 
25192       # Use eval to expand a potential ~
25193       eval path="$path"
25194       if test ! -f "$path" && test ! -d "$path"; then
25195         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25196       fi
25197 
25198       if test -d "$path"; then
25199         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25200       else
25201         dir="`$DIRNAME "$path"`"
25202         base="`$BASENAME "$path"`"
25203         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25204       fi
25205     fi
25206   fi
25207 
25208             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25209 $as_echo_n "checking for Boot JDK... " >&6; }
25210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25211 $as_echo "$BOOT_JDK" >&6; }
25212             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25213 $as_echo_n "checking Boot JDK version... " >&6; }
25214             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25216 $as_echo "$BOOT_JDK_VERSION" >&6; }
25217           fi # end check jdk version
25218         fi # end check javac
25219       fi # end check java
25220     fi # end check boot jdk found
25221   fi
25222 
25223     # If that did not work out (e.g. too old), try explicit versions instead
25224 
25225   if test "x$BOOT_JDK_FOUND" = xno; then
25226     # Now execute the test
25227 
25228   if test -x /usr/libexec/java_home; then
25229     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25230     BOOT_JDK_FOUND=maybe
25231     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25232 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25233   fi
25234 
25235 
25236     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25237     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25238       # Do we have a bin/java?
25239       if test ! -x "$BOOT_JDK/bin/java"; then
25240         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25241 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25242         BOOT_JDK_FOUND=no
25243       else
25244         # Do we have a bin/javac?
25245         if test ! -x "$BOOT_JDK/bin/javac"; then
25246           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25247 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25248           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25249 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25250           BOOT_JDK_FOUND=no
25251         else
25252           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25253           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25254 
25255           # Extra M4 quote needed to protect [] in grep expression.
25256           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25257           if test "x$FOUND_CORRECT_VERSION" = x; then
25258             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25259 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25260             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25261 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25262             BOOT_JDK_FOUND=no
25263           else
25264             # We're done! :-)
25265             BOOT_JDK_FOUND=yes
25266 
25267   # Only process if variable expands to non-empty
25268 
25269   if test "x$BOOT_JDK" != x; then
25270     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25271 
25272   # Input might be given as Windows format, start by converting to
25273   # unix format.
25274   path="$BOOT_JDK"
25275   new_path=`$CYGPATH -u "$path"`
25276 
25277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25280   # "foo.exe" is OK but "foo" is an error.
25281   #
25282   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25283   # It is also a way to make sure we got the proper file name for the real test later on.
25284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25285   if test "x$test_shortpath" = x; then
25286     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25287 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25288     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25289   fi
25290 
25291   # Call helper function which possibly converts this using DOS-style short mode.
25292   # If so, the updated path is stored in $new_path.
25293 
25294   input_path="$new_path"
25295   # Check if we need to convert this using DOS-style short mode. If the path
25296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25297   # take no chances and rewrite it.
25298   # Note: m4 eats our [], so we need to use [ and ] instead.
25299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25300   if test "x$has_forbidden_chars" != x; then
25301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25305       # Going to short mode and back again did indeed matter. Since short mode is
25306       # case insensitive, let's make it lowercase to improve readability.
25307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25308       # Now convert it back to Unix-style (cygpath)
25309       input_path=`$CYGPATH -u "$shortmode_path"`
25310       new_path="$input_path"
25311     fi
25312   fi
25313 
25314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25315   if test "x$test_cygdrive_prefix" = x; then
25316     # As a simple fix, exclude /usr/bin since it's not a real path.
25317     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25319       # a path prefixed by /cygdrive for fixpath to work.
25320       new_path="$CYGWIN_ROOT_PATH$input_path"
25321     fi
25322   fi
25323 
25324 
25325   if test "x$path" != "x$new_path"; then
25326     BOOT_JDK="$new_path"
25327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25328 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25329   fi
25330 
25331     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25332 
25333   path="$BOOT_JDK"
25334   has_colon=`$ECHO $path | $GREP ^.:`
25335   new_path="$path"
25336   if test "x$has_colon" = x; then
25337     # Not in mixed or Windows style, start by that.
25338     new_path=`cmd //c echo $path`
25339   fi
25340 
25341 
25342   input_path="$new_path"
25343   # Check if we need to convert this using DOS-style short mode. If the path
25344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25345   # take no chances and rewrite it.
25346   # Note: m4 eats our [], so we need to use [ and ] instead.
25347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25348   if test "x$has_forbidden_chars" != x; then
25349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25350     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25351   fi
25352 
25353 
25354   windows_path="$new_path"
25355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25356     unix_path=`$CYGPATH -u "$windows_path"`
25357     new_path="$unix_path"
25358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25360     new_path="$unix_path"
25361   fi
25362 
25363   if test "x$path" != "x$new_path"; then
25364     BOOT_JDK="$new_path"
25365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25366 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25367   fi
25368 
25369   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25370   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25371 
25372     else
25373       # We're on a unix platform. Hooray! :)
25374       path="$BOOT_JDK"
25375       has_space=`$ECHO "$path" | $GREP " "`
25376       if test "x$has_space" != x; then
25377         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25378 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25379         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25380       fi
25381 
25382       # Use eval to expand a potential ~
25383       eval path="$path"
25384       if test ! -f "$path" && test ! -d "$path"; then
25385         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25386       fi
25387 
25388       if test -d "$path"; then
25389         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25390       else
25391         dir="`$DIRNAME "$path"`"
25392         base="`$BASENAME "$path"`"
25393         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25394       fi
25395     fi
25396   fi
25397 
25398             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25399 $as_echo_n "checking for Boot JDK... " >&6; }
25400             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25401 $as_echo "$BOOT_JDK" >&6; }
25402             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25403 $as_echo_n "checking Boot JDK version... " >&6; }
25404             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25405             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25406 $as_echo "$BOOT_JDK_VERSION" >&6; }
25407           fi # end check jdk version
25408         fi # end check javac
25409       fi # end check java
25410     fi # end check boot jdk found
25411   fi
25412 
25413 
25414   if test "x$BOOT_JDK_FOUND" = xno; then
25415     # Now execute the test
25416 
25417   if test -x /usr/libexec/java_home; then
25418     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25419     BOOT_JDK_FOUND=maybe
25420     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25421 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25422   fi
25423 
25424 
25425     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25426     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25427       # Do we have a bin/java?
25428       if test ! -x "$BOOT_JDK/bin/java"; then
25429         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25431         BOOT_JDK_FOUND=no
25432       else
25433         # Do we have a bin/javac?
25434         if test ! -x "$BOOT_JDK/bin/javac"; then
25435           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25437           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25438 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25439           BOOT_JDK_FOUND=no
25440         else
25441           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25442           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25443 
25444           # Extra M4 quote needed to protect [] in grep expression.
25445           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25446           if test "x$FOUND_CORRECT_VERSION" = x; then
25447             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25449             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25450 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25451             BOOT_JDK_FOUND=no
25452           else
25453             # We're done! :-)
25454             BOOT_JDK_FOUND=yes
25455 
25456   # Only process if variable expands to non-empty
25457 
25458   if test "x$BOOT_JDK" != x; then
25459     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460 
25461   # Input might be given as Windows format, start by converting to
25462   # unix format.
25463   path="$BOOT_JDK"
25464   new_path=`$CYGPATH -u "$path"`
25465 
25466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25469   # "foo.exe" is OK but "foo" is an error.
25470   #
25471   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25472   # It is also a way to make sure we got the proper file name for the real test later on.
25473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25474   if test "x$test_shortpath" = x; then
25475     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25476 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25477     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25478   fi
25479 
25480   # Call helper function which possibly converts this using DOS-style short mode.
25481   # If so, the updated path is stored in $new_path.
25482 
25483   input_path="$new_path"
25484   # Check if we need to convert this using DOS-style short mode. If the path
25485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25486   # take no chances and rewrite it.
25487   # Note: m4 eats our [], so we need to use [ and ] instead.
25488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25489   if test "x$has_forbidden_chars" != x; then
25490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25491     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25492     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25493     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25494       # Going to short mode and back again did indeed matter. Since short mode is
25495       # case insensitive, let's make it lowercase to improve readability.
25496       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25497       # Now convert it back to Unix-style (cygpath)
25498       input_path=`$CYGPATH -u "$shortmode_path"`
25499       new_path="$input_path"
25500     fi
25501   fi
25502 
25503   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25504   if test "x$test_cygdrive_prefix" = x; then
25505     # As a simple fix, exclude /usr/bin since it's not a real path.
25506     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25507       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25508       # a path prefixed by /cygdrive for fixpath to work.
25509       new_path="$CYGWIN_ROOT_PATH$input_path"
25510     fi
25511   fi
25512 
25513 
25514   if test "x$path" != "x$new_path"; then
25515     BOOT_JDK="$new_path"
25516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25517 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25518   fi
25519 
25520     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521 
25522   path="$BOOT_JDK"
25523   has_colon=`$ECHO $path | $GREP ^.:`
25524   new_path="$path"
25525   if test "x$has_colon" = x; then
25526     # Not in mixed or Windows style, start by that.
25527     new_path=`cmd //c echo $path`
25528   fi
25529 
25530 
25531   input_path="$new_path"
25532   # Check if we need to convert this using DOS-style short mode. If the path
25533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25534   # take no chances and rewrite it.
25535   # Note: m4 eats our [], so we need to use [ and ] instead.
25536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25537   if test "x$has_forbidden_chars" != x; then
25538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25540   fi
25541 
25542 
25543   windows_path="$new_path"
25544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25545     unix_path=`$CYGPATH -u "$windows_path"`
25546     new_path="$unix_path"
25547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25549     new_path="$unix_path"
25550   fi
25551 
25552   if test "x$path" != "x$new_path"; then
25553     BOOT_JDK="$new_path"
25554     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25555 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25556   fi
25557 
25558   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25559   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25560 
25561     else
25562       # We're on a unix platform. Hooray! :)
25563       path="$BOOT_JDK"
25564       has_space=`$ECHO "$path" | $GREP " "`
25565       if test "x$has_space" != x; then
25566         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25568         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25569       fi
25570 
25571       # Use eval to expand a potential ~
25572       eval path="$path"
25573       if test ! -f "$path" && test ! -d "$path"; then
25574         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25575       fi
25576 
25577       if test -d "$path"; then
25578         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25579       else
25580         dir="`$DIRNAME "$path"`"
25581         base="`$BASENAME "$path"`"
25582         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25583       fi
25584     fi
25585   fi
25586 
25587             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25588 $as_echo_n "checking for Boot JDK... " >&6; }
25589             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25590 $as_echo "$BOOT_JDK" >&6; }
25591             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25592 $as_echo_n "checking Boot JDK version... " >&6; }
25593             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25594             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25595 $as_echo "$BOOT_JDK_VERSION" >&6; }
25596           fi # end check jdk version
25597         fi # end check javac
25598       fi # end check java
25599     fi # end check boot jdk found
25600   fi
25601 
25602 
25603   if test "x$BOOT_JDK_FOUND" = xno; then
25604     # Now execute the test
25605 
25606   if test -x /usr/libexec/java_home; then
25607     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25608     BOOT_JDK_FOUND=maybe
25609     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25610 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25611   fi
25612 
25613 
25614     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25615     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25616       # Do we have a bin/java?
25617       if test ! -x "$BOOT_JDK/bin/java"; then
25618         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25619 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25620         BOOT_JDK_FOUND=no
25621       else
25622         # Do we have a bin/javac?
25623         if test ! -x "$BOOT_JDK/bin/javac"; then
25624           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25626           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25627 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25628           BOOT_JDK_FOUND=no
25629         else
25630           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25631           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25632 
25633           # Extra M4 quote needed to protect [] in grep expression.
25634           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25635           if test "x$FOUND_CORRECT_VERSION" = x; then
25636             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25637 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25638             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25639 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25640             BOOT_JDK_FOUND=no
25641           else
25642             # We're done! :-)
25643             BOOT_JDK_FOUND=yes
25644 
25645   # Only process if variable expands to non-empty
25646 
25647   if test "x$BOOT_JDK" != x; then
25648     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25649 
25650   # Input might be given as Windows format, start by converting to
25651   # unix format.
25652   path="$BOOT_JDK"
25653   new_path=`$CYGPATH -u "$path"`
25654 
25655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25658   # "foo.exe" is OK but "foo" is an error.
25659   #
25660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25661   # It is also a way to make sure we got the proper file name for the real test later on.
25662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25663   if test "x$test_shortpath" = x; then
25664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25666     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25667   fi
25668 
25669   # Call helper function which possibly converts this using DOS-style short mode.
25670   # If so, the updated path is stored in $new_path.
25671 
25672   input_path="$new_path"
25673   # Check if we need to convert this using DOS-style short mode. If the path
25674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25675   # take no chances and rewrite it.
25676   # Note: m4 eats our [], so we need to use [ and ] instead.
25677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25678   if test "x$has_forbidden_chars" != x; then
25679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25683       # Going to short mode and back again did indeed matter. Since short mode is
25684       # case insensitive, let's make it lowercase to improve readability.
25685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25686       # Now convert it back to Unix-style (cygpath)
25687       input_path=`$CYGPATH -u "$shortmode_path"`
25688       new_path="$input_path"
25689     fi
25690   fi
25691 
25692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25693   if test "x$test_cygdrive_prefix" = x; then
25694     # As a simple fix, exclude /usr/bin since it's not a real path.
25695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25697       # a path prefixed by /cygdrive for fixpath to work.
25698       new_path="$CYGWIN_ROOT_PATH$input_path"
25699     fi
25700   fi
25701 
25702 
25703   if test "x$path" != "x$new_path"; then
25704     BOOT_JDK="$new_path"
25705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25707   fi
25708 
25709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25710 
25711   path="$BOOT_JDK"
25712   has_colon=`$ECHO $path | $GREP ^.:`
25713   new_path="$path"
25714   if test "x$has_colon" = x; then
25715     # Not in mixed or Windows style, start by that.
25716     new_path=`cmd //c echo $path`
25717   fi
25718 
25719 
25720   input_path="$new_path"
25721   # Check if we need to convert this using DOS-style short mode. If the path
25722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25723   # take no chances and rewrite it.
25724   # Note: m4 eats our [], so we need to use [ and ] instead.
25725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25726   if test "x$has_forbidden_chars" != x; then
25727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25729   fi
25730 
25731 
25732   windows_path="$new_path"
25733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25734     unix_path=`$CYGPATH -u "$windows_path"`
25735     new_path="$unix_path"
25736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25738     new_path="$unix_path"
25739   fi
25740 
25741   if test "x$path" != "x$new_path"; then
25742     BOOT_JDK="$new_path"
25743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25745   fi
25746 
25747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25749 
25750     else
25751       # We're on a unix platform. Hooray! :)
25752       path="$BOOT_JDK"
25753       has_space=`$ECHO "$path" | $GREP " "`
25754       if test "x$has_space" != x; then
25755         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25756 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25757         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25758       fi
25759 
25760       # Use eval to expand a potential ~
25761       eval path="$path"
25762       if test ! -f "$path" && test ! -d "$path"; then
25763         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25764       fi
25765 
25766       if test -d "$path"; then
25767         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25768       else
25769         dir="`$DIRNAME "$path"`"
25770         base="`$BASENAME "$path"`"
25771         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25772       fi
25773     fi
25774   fi
25775 
25776             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25777 $as_echo_n "checking for Boot JDK... " >&6; }
25778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25779 $as_echo "$BOOT_JDK" >&6; }
25780             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25781 $as_echo_n "checking Boot JDK version... " >&6; }
25782             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25783             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25784 $as_echo "$BOOT_JDK_VERSION" >&6; }
25785           fi # end check jdk version
25786         fi # end check javac
25787       fi # end check java
25788     fi # end check boot jdk found
25789   fi
25790 
25791   fi
25792 
25793 
25794     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25795     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25796       # Do we have a bin/java?
25797       if test ! -x "$BOOT_JDK/bin/java"; then
25798         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25800         BOOT_JDK_FOUND=no
25801       else
25802         # Do we have a bin/javac?
25803         if test ! -x "$BOOT_JDK/bin/javac"; then
25804           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25805 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25806           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25807 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25808           BOOT_JDK_FOUND=no
25809         else
25810           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25811           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25812 
25813           # Extra M4 quote needed to protect [] in grep expression.
25814           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25815           if test "x$FOUND_CORRECT_VERSION" = x; then
25816             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25817 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25818             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25819 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25820             BOOT_JDK_FOUND=no
25821           else
25822             # We're done! :-)
25823             BOOT_JDK_FOUND=yes
25824 
25825   # Only process if variable expands to non-empty
25826 
25827   if test "x$BOOT_JDK" != x; then
25828     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25829 
25830   # Input might be given as Windows format, start by converting to
25831   # unix format.
25832   path="$BOOT_JDK"
25833   new_path=`$CYGPATH -u "$path"`
25834 
25835   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25836   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25837   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25838   # "foo.exe" is OK but "foo" is an error.
25839   #
25840   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25841   # It is also a way to make sure we got the proper file name for the real test later on.
25842   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25843   if test "x$test_shortpath" = x; then
25844     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25845 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25846     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25847   fi
25848 
25849   # Call helper function which possibly converts this using DOS-style short mode.
25850   # If so, the updated path is stored in $new_path.
25851 
25852   input_path="$new_path"
25853   # Check if we need to convert this using DOS-style short mode. If the path
25854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25855   # take no chances and rewrite it.
25856   # Note: m4 eats our [], so we need to use [ and ] instead.
25857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25858   if test "x$has_forbidden_chars" != x; then
25859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25860     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25861     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25862     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25863       # Going to short mode and back again did indeed matter. Since short mode is
25864       # case insensitive, let's make it lowercase to improve readability.
25865       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25866       # Now convert it back to Unix-style (cygpath)
25867       input_path=`$CYGPATH -u "$shortmode_path"`
25868       new_path="$input_path"
25869     fi
25870   fi
25871 
25872   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25873   if test "x$test_cygdrive_prefix" = x; then
25874     # As a simple fix, exclude /usr/bin since it's not a real path.
25875     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25876       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25877       # a path prefixed by /cygdrive for fixpath to work.
25878       new_path="$CYGWIN_ROOT_PATH$input_path"
25879     fi
25880   fi
25881 
25882 
25883   if test "x$path" != "x$new_path"; then
25884     BOOT_JDK="$new_path"
25885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25886 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25887   fi
25888 
25889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25890 
25891   path="$BOOT_JDK"
25892   has_colon=`$ECHO $path | $GREP ^.:`
25893   new_path="$path"
25894   if test "x$has_colon" = x; then
25895     # Not in mixed or Windows style, start by that.
25896     new_path=`cmd //c echo $path`
25897   fi
25898 
25899 
25900   input_path="$new_path"
25901   # Check if we need to convert this using DOS-style short mode. If the path
25902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25903   # take no chances and rewrite it.
25904   # Note: m4 eats our [], so we need to use [ and ] instead.
25905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25906   if test "x$has_forbidden_chars" != x; then
25907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25908     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25909   fi
25910 
25911 
25912   windows_path="$new_path"
25913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25914     unix_path=`$CYGPATH -u "$windows_path"`
25915     new_path="$unix_path"
25916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25918     new_path="$unix_path"
25919   fi
25920 
25921   if test "x$path" != "x$new_path"; then
25922     BOOT_JDK="$new_path"
25923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25924 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25925   fi
25926 
25927   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25928   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25929 
25930     else
25931       # We're on a unix platform. Hooray! :)
25932       path="$BOOT_JDK"
25933       has_space=`$ECHO "$path" | $GREP " "`
25934       if test "x$has_space" != x; then
25935         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25936 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25937         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25938       fi
25939 
25940       # Use eval to expand a potential ~
25941       eval path="$path"
25942       if test ! -f "$path" && test ! -d "$path"; then
25943         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25944       fi
25945 
25946       if test -d "$path"; then
25947         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25948       else
25949         dir="`$DIRNAME "$path"`"
25950         base="`$BASENAME "$path"`"
25951         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25952       fi
25953     fi
25954   fi
25955 
25956             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25957 $as_echo_n "checking for Boot JDK... " >&6; }
25958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25959 $as_echo "$BOOT_JDK" >&6; }
25960             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25961 $as_echo_n "checking Boot JDK version... " >&6; }
25962             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25963             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25964 $as_echo "$BOOT_JDK_VERSION" >&6; }
25965           fi # end check jdk version
25966         fi # end check javac
25967       fi # end check java
25968     fi # end check boot jdk found
25969   fi
25970 
25971 
25972   # Test: Is $JAVA_HOME set?
25973 
25974   if test "x$BOOT_JDK_FOUND" = xno; then
25975     # Now execute the test
25976 
25977   if test "x$JAVA_HOME" != x; then
25978     JAVA_HOME_PROCESSED="$JAVA_HOME"
25979 
25980   # Only process if variable expands to non-empty
25981 
25982   if test "x$JAVA_HOME_PROCESSED" != x; then
25983     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25984 
25985   # Input might be given as Windows format, start by converting to
25986   # unix format.
25987   path="$JAVA_HOME_PROCESSED"
25988   new_path=`$CYGPATH -u "$path"`
25989 
25990   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25991   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25992   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25993   # "foo.exe" is OK but "foo" is an error.
25994   #
25995   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25996   # It is also a way to make sure we got the proper file name for the real test later on.
25997   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25998   if test "x$test_shortpath" = x; then
25999     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26000 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26001     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26002   fi
26003 
26004   # Call helper function which possibly converts this using DOS-style short mode.
26005   # If so, the updated path is stored in $new_path.
26006 
26007   input_path="$new_path"
26008   # Check if we need to convert this using DOS-style short mode. If the path
26009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26010   # take no chances and rewrite it.
26011   # Note: m4 eats our [], so we need to use [ and ] instead.
26012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26013   if test "x$has_forbidden_chars" != x; then
26014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26015     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26016     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26017     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26018       # Going to short mode and back again did indeed matter. Since short mode is
26019       # case insensitive, let's make it lowercase to improve readability.
26020       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26021       # Now convert it back to Unix-style (cygpath)
26022       input_path=`$CYGPATH -u "$shortmode_path"`
26023       new_path="$input_path"
26024     fi
26025   fi
26026 
26027   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26028   if test "x$test_cygdrive_prefix" = x; then
26029     # As a simple fix, exclude /usr/bin since it's not a real path.
26030     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26031       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26032       # a path prefixed by /cygdrive for fixpath to work.
26033       new_path="$CYGWIN_ROOT_PATH$input_path"
26034     fi
26035   fi
26036 
26037 
26038   if test "x$path" != "x$new_path"; then
26039     JAVA_HOME_PROCESSED="$new_path"
26040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26041 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26042   fi
26043 
26044     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26045 
26046   path="$JAVA_HOME_PROCESSED"
26047   has_colon=`$ECHO $path | $GREP ^.:`
26048   new_path="$path"
26049   if test "x$has_colon" = x; then
26050     # Not in mixed or Windows style, start by that.
26051     new_path=`cmd //c echo $path`
26052   fi
26053 
26054 
26055   input_path="$new_path"
26056   # Check if we need to convert this using DOS-style short mode. If the path
26057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26058   # take no chances and rewrite it.
26059   # Note: m4 eats our [], so we need to use [ and ] instead.
26060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26061   if test "x$has_forbidden_chars" != x; then
26062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26063     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26064   fi
26065 
26066 
26067   windows_path="$new_path"
26068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26069     unix_path=`$CYGPATH -u "$windows_path"`
26070     new_path="$unix_path"
26071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26073     new_path="$unix_path"
26074   fi
26075 
26076   if test "x$path" != "x$new_path"; then
26077     JAVA_HOME_PROCESSED="$new_path"
26078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26079 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26080   fi
26081 
26082   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26083   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26084 
26085     else
26086       # We're on a unix platform. Hooray! :)
26087       path="$JAVA_HOME_PROCESSED"
26088       has_space=`$ECHO "$path" | $GREP " "`
26089       if test "x$has_space" != x; then
26090         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26091 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26092         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26093       fi
26094 
26095       # Use eval to expand a potential ~
26096       eval path="$path"
26097       if test ! -f "$path" && test ! -d "$path"; then
26098         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26099       fi
26100 
26101       if test -d "$path"; then
26102         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26103       else
26104         dir="`$DIRNAME "$path"`"
26105         base="`$BASENAME "$path"`"
26106         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26107       fi
26108     fi
26109   fi
26110 
26111     if test ! -d "$JAVA_HOME_PROCESSED"; then
26112       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26113 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26114     else
26115       # Aha, the user has set a JAVA_HOME
26116       # let us use that as the Boot JDK.
26117       BOOT_JDK="$JAVA_HOME_PROCESSED"
26118       BOOT_JDK_FOUND=maybe
26119       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26120 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26121     fi
26122   fi
26123 
26124 
26125     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26126     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26127       # Do we have a bin/java?
26128       if test ! -x "$BOOT_JDK/bin/java"; then
26129         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26130 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26131         BOOT_JDK_FOUND=no
26132       else
26133         # Do we have a bin/javac?
26134         if test ! -x "$BOOT_JDK/bin/javac"; then
26135           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26136 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26137           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26138 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26139           BOOT_JDK_FOUND=no
26140         else
26141           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26142           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26143 
26144           # Extra M4 quote needed to protect [] in grep expression.
26145           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26146           if test "x$FOUND_CORRECT_VERSION" = x; then
26147             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26148 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26149             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26150 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26151             BOOT_JDK_FOUND=no
26152           else
26153             # We're done! :-)
26154             BOOT_JDK_FOUND=yes
26155 
26156   # Only process if variable expands to non-empty
26157 
26158   if test "x$BOOT_JDK" != x; then
26159     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26160 
26161   # Input might be given as Windows format, start by converting to
26162   # unix format.
26163   path="$BOOT_JDK"
26164   new_path=`$CYGPATH -u "$path"`
26165 
26166   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26167   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26168   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26169   # "foo.exe" is OK but "foo" is an error.
26170   #
26171   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26172   # It is also a way to make sure we got the proper file name for the real test later on.
26173   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26174   if test "x$test_shortpath" = x; then
26175     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26176 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26177     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26178   fi
26179 
26180   # Call helper function which possibly converts this using DOS-style short mode.
26181   # If so, the updated path is stored in $new_path.
26182 
26183   input_path="$new_path"
26184   # Check if we need to convert this using DOS-style short mode. If the path
26185   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26186   # take no chances and rewrite it.
26187   # Note: m4 eats our [], so we need to use [ and ] instead.
26188   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26189   if test "x$has_forbidden_chars" != x; then
26190     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26191     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26192     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26193     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26194       # Going to short mode and back again did indeed matter. Since short mode is
26195       # case insensitive, let's make it lowercase to improve readability.
26196       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26197       # Now convert it back to Unix-style (cygpath)
26198       input_path=`$CYGPATH -u "$shortmode_path"`
26199       new_path="$input_path"
26200     fi
26201   fi
26202 
26203   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26204   if test "x$test_cygdrive_prefix" = x; then
26205     # As a simple fix, exclude /usr/bin since it's not a real path.
26206     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26207       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26208       # a path prefixed by /cygdrive for fixpath to work.
26209       new_path="$CYGWIN_ROOT_PATH$input_path"
26210     fi
26211   fi
26212 
26213 
26214   if test "x$path" != "x$new_path"; then
26215     BOOT_JDK="$new_path"
26216     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26217 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26218   fi
26219 
26220     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26221 
26222   path="$BOOT_JDK"
26223   has_colon=`$ECHO $path | $GREP ^.:`
26224   new_path="$path"
26225   if test "x$has_colon" = x; then
26226     # Not in mixed or Windows style, start by that.
26227     new_path=`cmd //c echo $path`
26228   fi
26229 
26230 
26231   input_path="$new_path"
26232   # Check if we need to convert this using DOS-style short mode. If the path
26233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26234   # take no chances and rewrite it.
26235   # Note: m4 eats our [], so we need to use [ and ] instead.
26236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26237   if test "x$has_forbidden_chars" != x; then
26238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26239     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26240   fi
26241 
26242 
26243   windows_path="$new_path"
26244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245     unix_path=`$CYGPATH -u "$windows_path"`
26246     new_path="$unix_path"
26247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26249     new_path="$unix_path"
26250   fi
26251 
26252   if test "x$path" != "x$new_path"; then
26253     BOOT_JDK="$new_path"
26254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26255 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26256   fi
26257 
26258   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26259   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26260 
26261     else
26262       # We're on a unix platform. Hooray! :)
26263       path="$BOOT_JDK"
26264       has_space=`$ECHO "$path" | $GREP " "`
26265       if test "x$has_space" != x; then
26266         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26267 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26268         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26269       fi
26270 
26271       # Use eval to expand a potential ~
26272       eval path="$path"
26273       if test ! -f "$path" && test ! -d "$path"; then
26274         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26275       fi
26276 
26277       if test -d "$path"; then
26278         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26279       else
26280         dir="`$DIRNAME "$path"`"
26281         base="`$BASENAME "$path"`"
26282         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26283       fi
26284     fi
26285   fi
26286 
26287             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26288 $as_echo_n "checking for Boot JDK... " >&6; }
26289             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26290 $as_echo "$BOOT_JDK" >&6; }
26291             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26292 $as_echo_n "checking Boot JDK version... " >&6; }
26293             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26295 $as_echo "$BOOT_JDK_VERSION" >&6; }
26296           fi # end check jdk version
26297         fi # end check javac
26298       fi # end check java
26299     fi # end check boot jdk found
26300   fi
26301 
26302 
26303   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26304 
26305   if test "x$BOOT_JDK_FOUND" = xno; then
26306     # Now execute the test
26307 
26308   # Extract the first word of "javac", so it can be a program name with args.
26309 set dummy javac; ac_word=$2
26310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26311 $as_echo_n "checking for $ac_word... " >&6; }
26312 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26313   $as_echo_n "(cached) " >&6
26314 else
26315   case $JAVAC_CHECK in
26316   [\\/]* | ?:[\\/]*)
26317   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26318   ;;
26319   *)
26320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26321 for as_dir in $PATH
26322 do
26323   IFS=$as_save_IFS
26324   test -z "$as_dir" && as_dir=.
26325     for ac_exec_ext in '' $ac_executable_extensions; do
26326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26327     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26329     break 2
26330   fi
26331 done
26332   done
26333 IFS=$as_save_IFS
26334 
26335   ;;
26336 esac
26337 fi
26338 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26339 if test -n "$JAVAC_CHECK"; then
26340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26341 $as_echo "$JAVAC_CHECK" >&6; }
26342 else
26343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26344 $as_echo "no" >&6; }
26345 fi
26346 
26347 
26348   # Extract the first word of "java", so it can be a program name with args.
26349 set dummy java; ac_word=$2
26350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26351 $as_echo_n "checking for $ac_word... " >&6; }
26352 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26353   $as_echo_n "(cached) " >&6
26354 else
26355   case $JAVA_CHECK in
26356   [\\/]* | ?:[\\/]*)
26357   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26358   ;;
26359   *)
26360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26361 for as_dir in $PATH
26362 do
26363   IFS=$as_save_IFS
26364   test -z "$as_dir" && as_dir=.
26365     for ac_exec_ext in '' $ac_executable_extensions; do
26366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26367     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26369     break 2
26370   fi
26371 done
26372   done
26373 IFS=$as_save_IFS
26374 
26375   ;;
26376 esac
26377 fi
26378 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26379 if test -n "$JAVA_CHECK"; then
26380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26381 $as_echo "$JAVA_CHECK" >&6; }
26382 else
26383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26384 $as_echo "no" >&6; }
26385 fi
26386 
26387 
26388   BINARY="$JAVAC_CHECK"
26389   if test "x$JAVAC_CHECK" = x; then
26390     BINARY="$JAVA_CHECK"
26391   fi
26392   if test "x$BINARY" != x; then
26393     # So there is a java(c) binary, it might be part of a JDK.
26394     # Lets find the JDK/JRE directory by following symbolic links.
26395     # Linux/GNU systems often have links from /usr/bin/java to
26396     # /etc/alternatives/java to the real JDK binary.
26397 
26398   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26399     # Follow a chain of symbolic links. Use readlink
26400     # where it exists, else fall back to horribly
26401     # complicated shell code.
26402     if test "x$READLINK_TESTED" != yes; then
26403       # On MacOSX there is a readlink tool with a different
26404       # purpose than the GNU readlink tool. Check the found readlink.
26405       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26406       if test "x$ISGNU" = x; then
26407         # A readlink that we do not know how to use.
26408         # Are there other non-GNU readlinks out there?
26409         READLINK_TESTED=yes
26410         READLINK=
26411       fi
26412     fi
26413 
26414     if test "x$READLINK" != x; then
26415       BINARY=`$READLINK -f $BINARY`
26416     else
26417       # Save the current directory for restoring afterwards
26418       STARTDIR=$PWD
26419       COUNTER=0
26420       sym_link_dir=`$DIRNAME $BINARY`
26421       sym_link_file=`$BASENAME $BINARY`
26422       cd $sym_link_dir
26423       # Use -P flag to resolve symlinks in directories.
26424       cd `$THEPWDCMD -P`
26425       sym_link_dir=`$THEPWDCMD -P`
26426       # Resolve file symlinks
26427       while test $COUNTER -lt 20; do
26428         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26429         if test "x$ISLINK" == x; then
26430           # This is not a symbolic link! We are done!
26431           break
26432         fi
26433         # Again resolve directory symlinks since the target of the just found
26434         # link could be in a different directory
26435         cd `$DIRNAME $ISLINK`
26436         sym_link_dir=`$THEPWDCMD -P`
26437         sym_link_file=`$BASENAME $ISLINK`
26438         let COUNTER=COUNTER+1
26439       done
26440       cd $STARTDIR
26441       BINARY=$sym_link_dir/$sym_link_file
26442     fi
26443   fi
26444 
26445     BOOT_JDK=`dirname "$BINARY"`
26446     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26447     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26448       # Looks like we found ourselves an JDK
26449       BOOT_JDK_FOUND=maybe
26450       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26451 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26452     fi
26453   fi
26454 
26455 
26456     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26457     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26458       # Do we have a bin/java?
26459       if test ! -x "$BOOT_JDK/bin/java"; then
26460         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26461 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26462         BOOT_JDK_FOUND=no
26463       else
26464         # Do we have a bin/javac?
26465         if test ! -x "$BOOT_JDK/bin/javac"; then
26466           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26467 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26468           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26469 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26470           BOOT_JDK_FOUND=no
26471         else
26472           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26473           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26474 
26475           # Extra M4 quote needed to protect [] in grep expression.
26476           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26477           if test "x$FOUND_CORRECT_VERSION" = x; then
26478             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26480             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26481 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26482             BOOT_JDK_FOUND=no
26483           else
26484             # We're done! :-)
26485             BOOT_JDK_FOUND=yes
26486 
26487   # Only process if variable expands to non-empty
26488 
26489   if test "x$BOOT_JDK" != x; then
26490     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26491 
26492   # Input might be given as Windows format, start by converting to
26493   # unix format.
26494   path="$BOOT_JDK"
26495   new_path=`$CYGPATH -u "$path"`
26496 
26497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26500   # "foo.exe" is OK but "foo" is an error.
26501   #
26502   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26503   # It is also a way to make sure we got the proper file name for the real test later on.
26504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26505   if test "x$test_shortpath" = x; then
26506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26507 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26508     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26509   fi
26510 
26511   # Call helper function which possibly converts this using DOS-style short mode.
26512   # If so, the updated path is stored in $new_path.
26513 
26514   input_path="$new_path"
26515   # Check if we need to convert this using DOS-style short mode. If the path
26516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26517   # take no chances and rewrite it.
26518   # Note: m4 eats our [], so we need to use [ and ] instead.
26519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26520   if test "x$has_forbidden_chars" != x; then
26521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26525       # Going to short mode and back again did indeed matter. Since short mode is
26526       # case insensitive, let's make it lowercase to improve readability.
26527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26528       # Now convert it back to Unix-style (cygpath)
26529       input_path=`$CYGPATH -u "$shortmode_path"`
26530       new_path="$input_path"
26531     fi
26532   fi
26533 
26534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26535   if test "x$test_cygdrive_prefix" = x; then
26536     # As a simple fix, exclude /usr/bin since it's not a real path.
26537     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26539       # a path prefixed by /cygdrive for fixpath to work.
26540       new_path="$CYGWIN_ROOT_PATH$input_path"
26541     fi
26542   fi
26543 
26544 
26545   if test "x$path" != "x$new_path"; then
26546     BOOT_JDK="$new_path"
26547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26549   fi
26550 
26551     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26552 
26553   path="$BOOT_JDK"
26554   has_colon=`$ECHO $path | $GREP ^.:`
26555   new_path="$path"
26556   if test "x$has_colon" = x; then
26557     # Not in mixed or Windows style, start by that.
26558     new_path=`cmd //c echo $path`
26559   fi
26560 
26561 
26562   input_path="$new_path"
26563   # Check if we need to convert this using DOS-style short mode. If the path
26564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26565   # take no chances and rewrite it.
26566   # Note: m4 eats our [], so we need to use [ and ] instead.
26567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26568   if test "x$has_forbidden_chars" != x; then
26569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26570     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26571   fi
26572 
26573 
26574   windows_path="$new_path"
26575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26576     unix_path=`$CYGPATH -u "$windows_path"`
26577     new_path="$unix_path"
26578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26580     new_path="$unix_path"
26581   fi
26582 
26583   if test "x$path" != "x$new_path"; then
26584     BOOT_JDK="$new_path"
26585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26587   fi
26588 
26589   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26590   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26591 
26592     else
26593       # We're on a unix platform. Hooray! :)
26594       path="$BOOT_JDK"
26595       has_space=`$ECHO "$path" | $GREP " "`
26596       if test "x$has_space" != x; then
26597         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26598 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26599         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26600       fi
26601 
26602       # Use eval to expand a potential ~
26603       eval path="$path"
26604       if test ! -f "$path" && test ! -d "$path"; then
26605         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26606       fi
26607 
26608       if test -d "$path"; then
26609         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26610       else
26611         dir="`$DIRNAME "$path"`"
26612         base="`$BASENAME "$path"`"
26613         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26614       fi
26615     fi
26616   fi
26617 
26618             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26619 $as_echo_n "checking for Boot JDK... " >&6; }
26620             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26621 $as_echo "$BOOT_JDK" >&6; }
26622             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26623 $as_echo_n "checking Boot JDK version... " >&6; }
26624             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26625             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26626 $as_echo "$BOOT_JDK_VERSION" >&6; }
26627           fi # end check jdk version
26628         fi # end check javac
26629       fi # end check java
26630     fi # end check boot jdk found
26631   fi
26632 
26633 
26634   # Test: Is there a JDK installed in default, well-known locations?
26635 
26636   if test "x$BOOT_JDK_FOUND" = xno; then
26637     # Now execute the test
26638 
26639   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26640 
26641   if test "x$BOOT_JDK_FOUND" = xno; then
26642     # Now execute the test
26643 
26644   if test "x$ProgramW6432" != x; then
26645     VIRTUAL_DIR="$ProgramW6432/Java"
26646 
26647   windows_path="$VIRTUAL_DIR"
26648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26649     unix_path=`$CYGPATH -u "$windows_path"`
26650     VIRTUAL_DIR="$unix_path"
26651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26653     VIRTUAL_DIR="$unix_path"
26654   fi
26655 
26656 
26657   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26658   BOOT_JDK_SUFFIX=""
26659   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26660   if test "x$ALL_JDKS_FOUND" != x; then
26661     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26662 
26663   if test "x$BOOT_JDK_FOUND" = xno; then
26664     # Now execute the test
26665 
26666         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26667         if test -d "$BOOT_JDK"; then
26668           BOOT_JDK_FOUND=maybe
26669           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26670 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26671         fi
26672 
26673 
26674     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26675     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26676       # Do we have a bin/java?
26677       if test ! -x "$BOOT_JDK/bin/java"; then
26678         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26680         BOOT_JDK_FOUND=no
26681       else
26682         # Do we have a bin/javac?
26683         if test ! -x "$BOOT_JDK/bin/javac"; then
26684           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26686           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26687 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26688           BOOT_JDK_FOUND=no
26689         else
26690           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26691           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26692 
26693           # Extra M4 quote needed to protect [] in grep expression.
26694           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26695           if test "x$FOUND_CORRECT_VERSION" = x; then
26696             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26697 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26698             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26699 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26700             BOOT_JDK_FOUND=no
26701           else
26702             # We're done! :-)
26703             BOOT_JDK_FOUND=yes
26704 
26705   # Only process if variable expands to non-empty
26706 
26707   if test "x$BOOT_JDK" != x; then
26708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709 
26710   # Input might be given as Windows format, start by converting to
26711   # unix format.
26712   path="$BOOT_JDK"
26713   new_path=`$CYGPATH -u "$path"`
26714 
26715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26718   # "foo.exe" is OK but "foo" is an error.
26719   #
26720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26721   # It is also a way to make sure we got the proper file name for the real test later on.
26722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26723   if test "x$test_shortpath" = x; then
26724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26725 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26726     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26727   fi
26728 
26729   # Call helper function which possibly converts this using DOS-style short mode.
26730   # If so, the updated path is stored in $new_path.
26731 
26732   input_path="$new_path"
26733   # Check if we need to convert this using DOS-style short mode. If the path
26734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26735   # take no chances and rewrite it.
26736   # Note: m4 eats our [], so we need to use [ and ] instead.
26737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26738   if test "x$has_forbidden_chars" != x; then
26739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26743       # Going to short mode and back again did indeed matter. Since short mode is
26744       # case insensitive, let's make it lowercase to improve readability.
26745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26746       # Now convert it back to Unix-style (cygpath)
26747       input_path=`$CYGPATH -u "$shortmode_path"`
26748       new_path="$input_path"
26749     fi
26750   fi
26751 
26752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26753   if test "x$test_cygdrive_prefix" = x; then
26754     # As a simple fix, exclude /usr/bin since it's not a real path.
26755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26757       # a path prefixed by /cygdrive for fixpath to work.
26758       new_path="$CYGWIN_ROOT_PATH$input_path"
26759     fi
26760   fi
26761 
26762 
26763   if test "x$path" != "x$new_path"; then
26764     BOOT_JDK="$new_path"
26765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26766 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26767   fi
26768 
26769     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770 
26771   path="$BOOT_JDK"
26772   has_colon=`$ECHO $path | $GREP ^.:`
26773   new_path="$path"
26774   if test "x$has_colon" = x; then
26775     # Not in mixed or Windows style, start by that.
26776     new_path=`cmd //c echo $path`
26777   fi
26778 
26779 
26780   input_path="$new_path"
26781   # Check if we need to convert this using DOS-style short mode. If the path
26782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26783   # take no chances and rewrite it.
26784   # Note: m4 eats our [], so we need to use [ and ] instead.
26785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26786   if test "x$has_forbidden_chars" != x; then
26787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26789   fi
26790 
26791 
26792   windows_path="$new_path"
26793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26794     unix_path=`$CYGPATH -u "$windows_path"`
26795     new_path="$unix_path"
26796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26798     new_path="$unix_path"
26799   fi
26800 
26801   if test "x$path" != "x$new_path"; then
26802     BOOT_JDK="$new_path"
26803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26804 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26805   fi
26806 
26807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26809 
26810     else
26811       # We're on a unix platform. Hooray! :)
26812       path="$BOOT_JDK"
26813       has_space=`$ECHO "$path" | $GREP " "`
26814       if test "x$has_space" != x; then
26815         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26816 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26817         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26818       fi
26819 
26820       # Use eval to expand a potential ~
26821       eval path="$path"
26822       if test ! -f "$path" && test ! -d "$path"; then
26823         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26824       fi
26825 
26826       if test -d "$path"; then
26827         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26828       else
26829         dir="`$DIRNAME "$path"`"
26830         base="`$BASENAME "$path"`"
26831         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26832       fi
26833     fi
26834   fi
26835 
26836             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26837 $as_echo_n "checking for Boot JDK... " >&6; }
26838             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26839 $as_echo "$BOOT_JDK" >&6; }
26840             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26841 $as_echo_n "checking Boot JDK version... " >&6; }
26842             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26843             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26844 $as_echo "$BOOT_JDK_VERSION" >&6; }
26845           fi # end check jdk version
26846         fi # end check javac
26847       fi # end check java
26848     fi # end check boot jdk found
26849   fi
26850 
26851     done
26852   fi
26853 
26854   fi
26855 
26856 
26857     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26858     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26859       # Do we have a bin/java?
26860       if test ! -x "$BOOT_JDK/bin/java"; then
26861         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26862 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26863         BOOT_JDK_FOUND=no
26864       else
26865         # Do we have a bin/javac?
26866         if test ! -x "$BOOT_JDK/bin/javac"; then
26867           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26869           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26870 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26871           BOOT_JDK_FOUND=no
26872         else
26873           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26874           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26875 
26876           # Extra M4 quote needed to protect [] in grep expression.
26877           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26878           if test "x$FOUND_CORRECT_VERSION" = x; then
26879             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26880 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26881             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26882 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26883             BOOT_JDK_FOUND=no
26884           else
26885             # We're done! :-)
26886             BOOT_JDK_FOUND=yes
26887 
26888   # Only process if variable expands to non-empty
26889 
26890   if test "x$BOOT_JDK" != x; then
26891     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892 
26893   # Input might be given as Windows format, start by converting to
26894   # unix format.
26895   path="$BOOT_JDK"
26896   new_path=`$CYGPATH -u "$path"`
26897 
26898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26901   # "foo.exe" is OK but "foo" is an error.
26902   #
26903   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26904   # It is also a way to make sure we got the proper file name for the real test later on.
26905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26906   if test "x$test_shortpath" = x; then
26907     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26908 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26909     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26910   fi
26911 
26912   # Call helper function which possibly converts this using DOS-style short mode.
26913   # If so, the updated path is stored in $new_path.
26914 
26915   input_path="$new_path"
26916   # Check if we need to convert this using DOS-style short mode. If the path
26917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26918   # take no chances and rewrite it.
26919   # Note: m4 eats our [], so we need to use [ and ] instead.
26920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26921   if test "x$has_forbidden_chars" != x; then
26922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26926       # Going to short mode and back again did indeed matter. Since short mode is
26927       # case insensitive, let's make it lowercase to improve readability.
26928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26929       # Now convert it back to Unix-style (cygpath)
26930       input_path=`$CYGPATH -u "$shortmode_path"`
26931       new_path="$input_path"
26932     fi
26933   fi
26934 
26935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26936   if test "x$test_cygdrive_prefix" = x; then
26937     # As a simple fix, exclude /usr/bin since it's not a real path.
26938     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26940       # a path prefixed by /cygdrive for fixpath to work.
26941       new_path="$CYGWIN_ROOT_PATH$input_path"
26942     fi
26943   fi
26944 
26945 
26946   if test "x$path" != "x$new_path"; then
26947     BOOT_JDK="$new_path"
26948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26949 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26950   fi
26951 
26952     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26953 
26954   path="$BOOT_JDK"
26955   has_colon=`$ECHO $path | $GREP ^.:`
26956   new_path="$path"
26957   if test "x$has_colon" = x; then
26958     # Not in mixed or Windows style, start by that.
26959     new_path=`cmd //c echo $path`
26960   fi
26961 
26962 
26963   input_path="$new_path"
26964   # Check if we need to convert this using DOS-style short mode. If the path
26965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26966   # take no chances and rewrite it.
26967   # Note: m4 eats our [], so we need to use [ and ] instead.
26968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26969   if test "x$has_forbidden_chars" != x; then
26970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26972   fi
26973 
26974 
26975   windows_path="$new_path"
26976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977     unix_path=`$CYGPATH -u "$windows_path"`
26978     new_path="$unix_path"
26979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981     new_path="$unix_path"
26982   fi
26983 
26984   if test "x$path" != "x$new_path"; then
26985     BOOT_JDK="$new_path"
26986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26987 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26988   fi
26989 
26990   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26991   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26992 
26993     else
26994       # We're on a unix platform. Hooray! :)
26995       path="$BOOT_JDK"
26996       has_space=`$ECHO "$path" | $GREP " "`
26997       if test "x$has_space" != x; then
26998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26999 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27000         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27001       fi
27002 
27003       # Use eval to expand a potential ~
27004       eval path="$path"
27005       if test ! -f "$path" && test ! -d "$path"; then
27006         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27007       fi
27008 
27009       if test -d "$path"; then
27010         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27011       else
27012         dir="`$DIRNAME "$path"`"
27013         base="`$BASENAME "$path"`"
27014         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27015       fi
27016     fi
27017   fi
27018 
27019             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27020 $as_echo_n "checking for Boot JDK... " >&6; }
27021             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27022 $as_echo "$BOOT_JDK" >&6; }
27023             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27024 $as_echo_n "checking Boot JDK version... " >&6; }
27025             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27027 $as_echo "$BOOT_JDK_VERSION" >&6; }
27028           fi # end check jdk version
27029         fi # end check javac
27030       fi # end check java
27031     fi # end check boot jdk found
27032   fi
27033 
27034 
27035   if test "x$BOOT_JDK_FOUND" = xno; then
27036     # Now execute the test
27037 
27038   if test "x$PROGRAMW6432" != x; then
27039     VIRTUAL_DIR="$PROGRAMW6432/Java"
27040 
27041   windows_path="$VIRTUAL_DIR"
27042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27043     unix_path=`$CYGPATH -u "$windows_path"`
27044     VIRTUAL_DIR="$unix_path"
27045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27047     VIRTUAL_DIR="$unix_path"
27048   fi
27049 
27050 
27051   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27052   BOOT_JDK_SUFFIX=""
27053   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27054   if test "x$ALL_JDKS_FOUND" != x; then
27055     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27056 
27057   if test "x$BOOT_JDK_FOUND" = xno; then
27058     # Now execute the test
27059 
27060         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27061         if test -d "$BOOT_JDK"; then
27062           BOOT_JDK_FOUND=maybe
27063           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27064 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27065         fi
27066 
27067 
27068     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27069     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27070       # Do we have a bin/java?
27071       if test ! -x "$BOOT_JDK/bin/java"; then
27072         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27074         BOOT_JDK_FOUND=no
27075       else
27076         # Do we have a bin/javac?
27077         if test ! -x "$BOOT_JDK/bin/javac"; then
27078           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27080           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27081 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27082           BOOT_JDK_FOUND=no
27083         else
27084           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27085           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27086 
27087           # Extra M4 quote needed to protect [] in grep expression.
27088           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27089           if test "x$FOUND_CORRECT_VERSION" = x; then
27090             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27092             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27093 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27094             BOOT_JDK_FOUND=no
27095           else
27096             # We're done! :-)
27097             BOOT_JDK_FOUND=yes
27098 
27099   # Only process if variable expands to non-empty
27100 
27101   if test "x$BOOT_JDK" != x; then
27102     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27103 
27104   # Input might be given as Windows format, start by converting to
27105   # unix format.
27106   path="$BOOT_JDK"
27107   new_path=`$CYGPATH -u "$path"`
27108 
27109   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27110   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27111   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27112   # "foo.exe" is OK but "foo" is an error.
27113   #
27114   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27115   # It is also a way to make sure we got the proper file name for the real test later on.
27116   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27117   if test "x$test_shortpath" = x; then
27118     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27119 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27120     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27121   fi
27122 
27123   # Call helper function which possibly converts this using DOS-style short mode.
27124   # If so, the updated path is stored in $new_path.
27125 
27126   input_path="$new_path"
27127   # Check if we need to convert this using DOS-style short mode. If the path
27128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27129   # take no chances and rewrite it.
27130   # Note: m4 eats our [], so we need to use [ and ] instead.
27131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27132   if test "x$has_forbidden_chars" != x; then
27133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27134     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27135     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27136     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27137       # Going to short mode and back again did indeed matter. Since short mode is
27138       # case insensitive, let's make it lowercase to improve readability.
27139       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27140       # Now convert it back to Unix-style (cygpath)
27141       input_path=`$CYGPATH -u "$shortmode_path"`
27142       new_path="$input_path"
27143     fi
27144   fi
27145 
27146   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27147   if test "x$test_cygdrive_prefix" = x; then
27148     # As a simple fix, exclude /usr/bin since it's not a real path.
27149     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27150       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27151       # a path prefixed by /cygdrive for fixpath to work.
27152       new_path="$CYGWIN_ROOT_PATH$input_path"
27153     fi
27154   fi
27155 
27156 
27157   if test "x$path" != "x$new_path"; then
27158     BOOT_JDK="$new_path"
27159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27160 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27161   fi
27162 
27163     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27164 
27165   path="$BOOT_JDK"
27166   has_colon=`$ECHO $path | $GREP ^.:`
27167   new_path="$path"
27168   if test "x$has_colon" = x; then
27169     # Not in mixed or Windows style, start by that.
27170     new_path=`cmd //c echo $path`
27171   fi
27172 
27173 
27174   input_path="$new_path"
27175   # Check if we need to convert this using DOS-style short mode. If the path
27176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27177   # take no chances and rewrite it.
27178   # Note: m4 eats our [], so we need to use [ and ] instead.
27179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27180   if test "x$has_forbidden_chars" != x; then
27181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27182     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27183   fi
27184 
27185 
27186   windows_path="$new_path"
27187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27188     unix_path=`$CYGPATH -u "$windows_path"`
27189     new_path="$unix_path"
27190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27192     new_path="$unix_path"
27193   fi
27194 
27195   if test "x$path" != "x$new_path"; then
27196     BOOT_JDK="$new_path"
27197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27198 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27199   fi
27200 
27201   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27202   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27203 
27204     else
27205       # We're on a unix platform. Hooray! :)
27206       path="$BOOT_JDK"
27207       has_space=`$ECHO "$path" | $GREP " "`
27208       if test "x$has_space" != x; then
27209         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27210 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27211         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27212       fi
27213 
27214       # Use eval to expand a potential ~
27215       eval path="$path"
27216       if test ! -f "$path" && test ! -d "$path"; then
27217         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27218       fi
27219 
27220       if test -d "$path"; then
27221         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27222       else
27223         dir="`$DIRNAME "$path"`"
27224         base="`$BASENAME "$path"`"
27225         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27226       fi
27227     fi
27228   fi
27229 
27230             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27231 $as_echo_n "checking for Boot JDK... " >&6; }
27232             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27233 $as_echo "$BOOT_JDK" >&6; }
27234             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27235 $as_echo_n "checking Boot JDK version... " >&6; }
27236             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27237             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27238 $as_echo "$BOOT_JDK_VERSION" >&6; }
27239           fi # end check jdk version
27240         fi # end check javac
27241       fi # end check java
27242     fi # end check boot jdk found
27243   fi
27244 
27245     done
27246   fi
27247 
27248   fi
27249 
27250 
27251     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27252     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27253       # Do we have a bin/java?
27254       if test ! -x "$BOOT_JDK/bin/java"; then
27255         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27257         BOOT_JDK_FOUND=no
27258       else
27259         # Do we have a bin/javac?
27260         if test ! -x "$BOOT_JDK/bin/javac"; then
27261           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27263           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27264 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27265           BOOT_JDK_FOUND=no
27266         else
27267           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27268           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27269 
27270           # Extra M4 quote needed to protect [] in grep expression.
27271           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27272           if test "x$FOUND_CORRECT_VERSION" = x; then
27273             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27274 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27275             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27276 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27277             BOOT_JDK_FOUND=no
27278           else
27279             # We're done! :-)
27280             BOOT_JDK_FOUND=yes
27281 
27282   # Only process if variable expands to non-empty
27283 
27284   if test "x$BOOT_JDK" != x; then
27285     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27286 
27287   # Input might be given as Windows format, start by converting to
27288   # unix format.
27289   path="$BOOT_JDK"
27290   new_path=`$CYGPATH -u "$path"`
27291 
27292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27295   # "foo.exe" is OK but "foo" is an error.
27296   #
27297   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27298   # It is also a way to make sure we got the proper file name for the real test later on.
27299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27300   if test "x$test_shortpath" = x; then
27301     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27302 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27303     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27304   fi
27305 
27306   # Call helper function which possibly converts this using DOS-style short mode.
27307   # If so, the updated path is stored in $new_path.
27308 
27309   input_path="$new_path"
27310   # Check if we need to convert this using DOS-style short mode. If the path
27311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27312   # take no chances and rewrite it.
27313   # Note: m4 eats our [], so we need to use [ and ] instead.
27314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27315   if test "x$has_forbidden_chars" != x; then
27316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27320       # Going to short mode and back again did indeed matter. Since short mode is
27321       # case insensitive, let's make it lowercase to improve readability.
27322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27323       # Now convert it back to Unix-style (cygpath)
27324       input_path=`$CYGPATH -u "$shortmode_path"`
27325       new_path="$input_path"
27326     fi
27327   fi
27328 
27329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27330   if test "x$test_cygdrive_prefix" = x; then
27331     # As a simple fix, exclude /usr/bin since it's not a real path.
27332     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27334       # a path prefixed by /cygdrive for fixpath to work.
27335       new_path="$CYGWIN_ROOT_PATH$input_path"
27336     fi
27337   fi
27338 
27339 
27340   if test "x$path" != "x$new_path"; then
27341     BOOT_JDK="$new_path"
27342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27343 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27344   fi
27345 
27346     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27347 
27348   path="$BOOT_JDK"
27349   has_colon=`$ECHO $path | $GREP ^.:`
27350   new_path="$path"
27351   if test "x$has_colon" = x; then
27352     # Not in mixed or Windows style, start by that.
27353     new_path=`cmd //c echo $path`
27354   fi
27355 
27356 
27357   input_path="$new_path"
27358   # Check if we need to convert this using DOS-style short mode. If the path
27359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27360   # take no chances and rewrite it.
27361   # Note: m4 eats our [], so we need to use [ and ] instead.
27362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27363   if test "x$has_forbidden_chars" != x; then
27364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27366   fi
27367 
27368 
27369   windows_path="$new_path"
27370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27371     unix_path=`$CYGPATH -u "$windows_path"`
27372     new_path="$unix_path"
27373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27375     new_path="$unix_path"
27376   fi
27377 
27378   if test "x$path" != "x$new_path"; then
27379     BOOT_JDK="$new_path"
27380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27381 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27382   fi
27383 
27384   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27385   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27386 
27387     else
27388       # We're on a unix platform. Hooray! :)
27389       path="$BOOT_JDK"
27390       has_space=`$ECHO "$path" | $GREP " "`
27391       if test "x$has_space" != x; then
27392         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27393 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27394         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27395       fi
27396 
27397       # Use eval to expand a potential ~
27398       eval path="$path"
27399       if test ! -f "$path" && test ! -d "$path"; then
27400         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27401       fi
27402 
27403       if test -d "$path"; then
27404         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27405       else
27406         dir="`$DIRNAME "$path"`"
27407         base="`$BASENAME "$path"`"
27408         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27409       fi
27410     fi
27411   fi
27412 
27413             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27414 $as_echo_n "checking for Boot JDK... " >&6; }
27415             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27416 $as_echo "$BOOT_JDK" >&6; }
27417             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27418 $as_echo_n "checking Boot JDK version... " >&6; }
27419             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27420             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27421 $as_echo "$BOOT_JDK_VERSION" >&6; }
27422           fi # end check jdk version
27423         fi # end check javac
27424       fi # end check java
27425     fi # end check boot jdk found
27426   fi
27427 
27428 
27429   if test "x$BOOT_JDK_FOUND" = xno; then
27430     # Now execute the test
27431 
27432   if test "x$PROGRAMFILES" != x; then
27433     VIRTUAL_DIR="$PROGRAMFILES/Java"
27434 
27435   windows_path="$VIRTUAL_DIR"
27436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27437     unix_path=`$CYGPATH -u "$windows_path"`
27438     VIRTUAL_DIR="$unix_path"
27439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27441     VIRTUAL_DIR="$unix_path"
27442   fi
27443 
27444 
27445   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27446   BOOT_JDK_SUFFIX=""
27447   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27448   if test "x$ALL_JDKS_FOUND" != x; then
27449     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27450 
27451   if test "x$BOOT_JDK_FOUND" = xno; then
27452     # Now execute the test
27453 
27454         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27455         if test -d "$BOOT_JDK"; then
27456           BOOT_JDK_FOUND=maybe
27457           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27458 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27459         fi
27460 
27461 
27462     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27463     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27464       # Do we have a bin/java?
27465       if test ! -x "$BOOT_JDK/bin/java"; then
27466         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27467 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27468         BOOT_JDK_FOUND=no
27469       else
27470         # Do we have a bin/javac?
27471         if test ! -x "$BOOT_JDK/bin/javac"; then
27472           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27473 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27474           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27475 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27476           BOOT_JDK_FOUND=no
27477         else
27478           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27479           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27480 
27481           # Extra M4 quote needed to protect [] in grep expression.
27482           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27483           if test "x$FOUND_CORRECT_VERSION" = x; then
27484             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27486             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27487 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27488             BOOT_JDK_FOUND=no
27489           else
27490             # We're done! :-)
27491             BOOT_JDK_FOUND=yes
27492 
27493   # Only process if variable expands to non-empty
27494 
27495   if test "x$BOOT_JDK" != x; then
27496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497 
27498   # Input might be given as Windows format, start by converting to
27499   # unix format.
27500   path="$BOOT_JDK"
27501   new_path=`$CYGPATH -u "$path"`
27502 
27503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27506   # "foo.exe" is OK but "foo" is an error.
27507   #
27508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27509   # It is also a way to make sure we got the proper file name for the real test later on.
27510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27511   if test "x$test_shortpath" = x; then
27512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27513 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27514     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27515   fi
27516 
27517   # Call helper function which possibly converts this using DOS-style short mode.
27518   # If so, the updated path is stored in $new_path.
27519 
27520   input_path="$new_path"
27521   # Check if we need to convert this using DOS-style short mode. If the path
27522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27523   # take no chances and rewrite it.
27524   # Note: m4 eats our [], so we need to use [ and ] instead.
27525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27526   if test "x$has_forbidden_chars" != x; then
27527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27531       # Going to short mode and back again did indeed matter. Since short mode is
27532       # case insensitive, let's make it lowercase to improve readability.
27533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27534       # Now convert it back to Unix-style (cygpath)
27535       input_path=`$CYGPATH -u "$shortmode_path"`
27536       new_path="$input_path"
27537     fi
27538   fi
27539 
27540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27541   if test "x$test_cygdrive_prefix" = x; then
27542     # As a simple fix, exclude /usr/bin since it's not a real path.
27543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27545       # a path prefixed by /cygdrive for fixpath to work.
27546       new_path="$CYGWIN_ROOT_PATH$input_path"
27547     fi
27548   fi
27549 
27550 
27551   if test "x$path" != "x$new_path"; then
27552     BOOT_JDK="$new_path"
27553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27555   fi
27556 
27557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27558 
27559   path="$BOOT_JDK"
27560   has_colon=`$ECHO $path | $GREP ^.:`
27561   new_path="$path"
27562   if test "x$has_colon" = x; then
27563     # Not in mixed or Windows style, start by that.
27564     new_path=`cmd //c echo $path`
27565   fi
27566 
27567 
27568   input_path="$new_path"
27569   # Check if we need to convert this using DOS-style short mode. If the path
27570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27571   # take no chances and rewrite it.
27572   # Note: m4 eats our [], so we need to use [ and ] instead.
27573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27574   if test "x$has_forbidden_chars" != x; then
27575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27577   fi
27578 
27579 
27580   windows_path="$new_path"
27581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27582     unix_path=`$CYGPATH -u "$windows_path"`
27583     new_path="$unix_path"
27584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27586     new_path="$unix_path"
27587   fi
27588 
27589   if test "x$path" != "x$new_path"; then
27590     BOOT_JDK="$new_path"
27591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27593   fi
27594 
27595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27597 
27598     else
27599       # We're on a unix platform. Hooray! :)
27600       path="$BOOT_JDK"
27601       has_space=`$ECHO "$path" | $GREP " "`
27602       if test "x$has_space" != x; then
27603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27605         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27606       fi
27607 
27608       # Use eval to expand a potential ~
27609       eval path="$path"
27610       if test ! -f "$path" && test ! -d "$path"; then
27611         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27612       fi
27613 
27614       if test -d "$path"; then
27615         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27616       else
27617         dir="`$DIRNAME "$path"`"
27618         base="`$BASENAME "$path"`"
27619         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27620       fi
27621     fi
27622   fi
27623 
27624             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27625 $as_echo_n "checking for Boot JDK... " >&6; }
27626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27627 $as_echo "$BOOT_JDK" >&6; }
27628             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27629 $as_echo_n "checking Boot JDK version... " >&6; }
27630             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27631             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27632 $as_echo "$BOOT_JDK_VERSION" >&6; }
27633           fi # end check jdk version
27634         fi # end check javac
27635       fi # end check java
27636     fi # end check boot jdk found
27637   fi
27638 
27639     done
27640   fi
27641 
27642   fi
27643 
27644 
27645     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27646     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27647       # Do we have a bin/java?
27648       if test ! -x "$BOOT_JDK/bin/java"; then
27649         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27651         BOOT_JDK_FOUND=no
27652       else
27653         # Do we have a bin/javac?
27654         if test ! -x "$BOOT_JDK/bin/javac"; then
27655           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27656 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27657           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27658 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27659           BOOT_JDK_FOUND=no
27660         else
27661           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27662           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27663 
27664           # Extra M4 quote needed to protect [] in grep expression.
27665           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27666           if test "x$FOUND_CORRECT_VERSION" = x; then
27667             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27669             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27670 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27671             BOOT_JDK_FOUND=no
27672           else
27673             # We're done! :-)
27674             BOOT_JDK_FOUND=yes
27675 
27676   # Only process if variable expands to non-empty
27677 
27678   if test "x$BOOT_JDK" != x; then
27679     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27680 
27681   # Input might be given as Windows format, start by converting to
27682   # unix format.
27683   path="$BOOT_JDK"
27684   new_path=`$CYGPATH -u "$path"`
27685 
27686   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27687   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27688   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27689   # "foo.exe" is OK but "foo" is an error.
27690   #
27691   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27692   # It is also a way to make sure we got the proper file name for the real test later on.
27693   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27694   if test "x$test_shortpath" = x; then
27695     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27696 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27697     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27698   fi
27699 
27700   # Call helper function which possibly converts this using DOS-style short mode.
27701   # If so, the updated path is stored in $new_path.
27702 
27703   input_path="$new_path"
27704   # Check if we need to convert this using DOS-style short mode. If the path
27705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706   # take no chances and rewrite it.
27707   # Note: m4 eats our [], so we need to use [ and ] instead.
27708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27709   if test "x$has_forbidden_chars" != x; then
27710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27712     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27713     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27714       # Going to short mode and back again did indeed matter. Since short mode is
27715       # case insensitive, let's make it lowercase to improve readability.
27716       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27717       # Now convert it back to Unix-style (cygpath)
27718       input_path=`$CYGPATH -u "$shortmode_path"`
27719       new_path="$input_path"
27720     fi
27721   fi
27722 
27723   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27724   if test "x$test_cygdrive_prefix" = x; then
27725     # As a simple fix, exclude /usr/bin since it's not a real path.
27726     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27727       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27728       # a path prefixed by /cygdrive for fixpath to work.
27729       new_path="$CYGWIN_ROOT_PATH$input_path"
27730     fi
27731   fi
27732 
27733 
27734   if test "x$path" != "x$new_path"; then
27735     BOOT_JDK="$new_path"
27736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27737 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27738   fi
27739 
27740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27741 
27742   path="$BOOT_JDK"
27743   has_colon=`$ECHO $path | $GREP ^.:`
27744   new_path="$path"
27745   if test "x$has_colon" = x; then
27746     # Not in mixed or Windows style, start by that.
27747     new_path=`cmd //c echo $path`
27748   fi
27749 
27750 
27751   input_path="$new_path"
27752   # Check if we need to convert this using DOS-style short mode. If the path
27753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27754   # take no chances and rewrite it.
27755   # Note: m4 eats our [], so we need to use [ and ] instead.
27756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27757   if test "x$has_forbidden_chars" != x; then
27758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27760   fi
27761 
27762 
27763   windows_path="$new_path"
27764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27765     unix_path=`$CYGPATH -u "$windows_path"`
27766     new_path="$unix_path"
27767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27769     new_path="$unix_path"
27770   fi
27771 
27772   if test "x$path" != "x$new_path"; then
27773     BOOT_JDK="$new_path"
27774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27775 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27776   fi
27777 
27778   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27779   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27780 
27781     else
27782       # We're on a unix platform. Hooray! :)
27783       path="$BOOT_JDK"
27784       has_space=`$ECHO "$path" | $GREP " "`
27785       if test "x$has_space" != x; then
27786         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27787 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27788         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27789       fi
27790 
27791       # Use eval to expand a potential ~
27792       eval path="$path"
27793       if test ! -f "$path" && test ! -d "$path"; then
27794         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27795       fi
27796 
27797       if test -d "$path"; then
27798         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27799       else
27800         dir="`$DIRNAME "$path"`"
27801         base="`$BASENAME "$path"`"
27802         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27803       fi
27804     fi
27805   fi
27806 
27807             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27808 $as_echo_n "checking for Boot JDK... " >&6; }
27809             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27810 $as_echo "$BOOT_JDK" >&6; }
27811             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27812 $as_echo_n "checking Boot JDK version... " >&6; }
27813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27814             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27815 $as_echo "$BOOT_JDK_VERSION" >&6; }
27816           fi # end check jdk version
27817         fi # end check javac
27818       fi # end check java
27819     fi # end check boot jdk found
27820   fi
27821 
27822 
27823   if test "x$BOOT_JDK_FOUND" = xno; then
27824     # Now execute the test
27825 
27826   if test "x$ProgramFiles" != x; then
27827     VIRTUAL_DIR="$ProgramFiles/Java"
27828 
27829   windows_path="$VIRTUAL_DIR"
27830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27831     unix_path=`$CYGPATH -u "$windows_path"`
27832     VIRTUAL_DIR="$unix_path"
27833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27835     VIRTUAL_DIR="$unix_path"
27836   fi
27837 
27838 
27839   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27840   BOOT_JDK_SUFFIX=""
27841   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27842   if test "x$ALL_JDKS_FOUND" != x; then
27843     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27844 
27845   if test "x$BOOT_JDK_FOUND" = xno; then
27846     # Now execute the test
27847 
27848         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27849         if test -d "$BOOT_JDK"; then
27850           BOOT_JDK_FOUND=maybe
27851           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27852 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27853         fi
27854 
27855 
27856     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27857     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27858       # Do we have a bin/java?
27859       if test ! -x "$BOOT_JDK/bin/java"; then
27860         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27861 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27862         BOOT_JDK_FOUND=no
27863       else
27864         # Do we have a bin/javac?
27865         if test ! -x "$BOOT_JDK/bin/javac"; then
27866           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27868           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27869 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27870           BOOT_JDK_FOUND=no
27871         else
27872           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27873           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27874 
27875           # Extra M4 quote needed to protect [] in grep expression.
27876           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27877           if test "x$FOUND_CORRECT_VERSION" = x; then
27878             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27879 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27880             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27881 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27882             BOOT_JDK_FOUND=no
27883           else
27884             # We're done! :-)
27885             BOOT_JDK_FOUND=yes
27886 
27887   # Only process if variable expands to non-empty
27888 
27889   if test "x$BOOT_JDK" != x; then
27890     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27891 
27892   # Input might be given as Windows format, start by converting to
27893   # unix format.
27894   path="$BOOT_JDK"
27895   new_path=`$CYGPATH -u "$path"`
27896 
27897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27900   # "foo.exe" is OK but "foo" is an error.
27901   #
27902   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27903   # It is also a way to make sure we got the proper file name for the real test later on.
27904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27905   if test "x$test_shortpath" = x; then
27906     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27907 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27908     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27909   fi
27910 
27911   # Call helper function which possibly converts this using DOS-style short mode.
27912   # If so, the updated path is stored in $new_path.
27913 
27914   input_path="$new_path"
27915   # Check if we need to convert this using DOS-style short mode. If the path
27916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27917   # take no chances and rewrite it.
27918   # Note: m4 eats our [], so we need to use [ and ] instead.
27919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27920   if test "x$has_forbidden_chars" != x; then
27921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27922     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27923     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27924     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27925       # Going to short mode and back again did indeed matter. Since short mode is
27926       # case insensitive, let's make it lowercase to improve readability.
27927       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27928       # Now convert it back to Unix-style (cygpath)
27929       input_path=`$CYGPATH -u "$shortmode_path"`
27930       new_path="$input_path"
27931     fi
27932   fi
27933 
27934   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27935   if test "x$test_cygdrive_prefix" = x; then
27936     # As a simple fix, exclude /usr/bin since it's not a real path.
27937     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27938       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27939       # a path prefixed by /cygdrive for fixpath to work.
27940       new_path="$CYGWIN_ROOT_PATH$input_path"
27941     fi
27942   fi
27943 
27944 
27945   if test "x$path" != "x$new_path"; then
27946     BOOT_JDK="$new_path"
27947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27948 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27949   fi
27950 
27951     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27952 
27953   path="$BOOT_JDK"
27954   has_colon=`$ECHO $path | $GREP ^.:`
27955   new_path="$path"
27956   if test "x$has_colon" = x; then
27957     # Not in mixed or Windows style, start by that.
27958     new_path=`cmd //c echo $path`
27959   fi
27960 
27961 
27962   input_path="$new_path"
27963   # Check if we need to convert this using DOS-style short mode. If the path
27964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27965   # take no chances and rewrite it.
27966   # Note: m4 eats our [], so we need to use [ and ] instead.
27967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27968   if test "x$has_forbidden_chars" != x; then
27969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27970     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27971   fi
27972 
27973 
27974   windows_path="$new_path"
27975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27976     unix_path=`$CYGPATH -u "$windows_path"`
27977     new_path="$unix_path"
27978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27980     new_path="$unix_path"
27981   fi
27982 
27983   if test "x$path" != "x$new_path"; then
27984     BOOT_JDK="$new_path"
27985     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27986 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27987   fi
27988 
27989   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27990   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27991 
27992     else
27993       # We're on a unix platform. Hooray! :)
27994       path="$BOOT_JDK"
27995       has_space=`$ECHO "$path" | $GREP " "`
27996       if test "x$has_space" != x; then
27997         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27999         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28000       fi
28001 
28002       # Use eval to expand a potential ~
28003       eval path="$path"
28004       if test ! -f "$path" && test ! -d "$path"; then
28005         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28006       fi
28007 
28008       if test -d "$path"; then
28009         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28010       else
28011         dir="`$DIRNAME "$path"`"
28012         base="`$BASENAME "$path"`"
28013         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28014       fi
28015     fi
28016   fi
28017 
28018             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28019 $as_echo_n "checking for Boot JDK... " >&6; }
28020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28021 $as_echo "$BOOT_JDK" >&6; }
28022             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28023 $as_echo_n "checking Boot JDK version... " >&6; }
28024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28026 $as_echo "$BOOT_JDK_VERSION" >&6; }
28027           fi # end check jdk version
28028         fi # end check javac
28029       fi # end check java
28030     fi # end check boot jdk found
28031   fi
28032 
28033     done
28034   fi
28035 
28036   fi
28037 
28038 
28039     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28040     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28041       # Do we have a bin/java?
28042       if test ! -x "$BOOT_JDK/bin/java"; then
28043         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28044 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28045         BOOT_JDK_FOUND=no
28046       else
28047         # Do we have a bin/javac?
28048         if test ! -x "$BOOT_JDK/bin/javac"; then
28049           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28051           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28052 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28053           BOOT_JDK_FOUND=no
28054         else
28055           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28056           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28057 
28058           # Extra M4 quote needed to protect [] in grep expression.
28059           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28060           if test "x$FOUND_CORRECT_VERSION" = x; then
28061             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28063             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28064 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28065             BOOT_JDK_FOUND=no
28066           else
28067             # We're done! :-)
28068             BOOT_JDK_FOUND=yes
28069 
28070   # Only process if variable expands to non-empty
28071 
28072   if test "x$BOOT_JDK" != x; then
28073     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28074 
28075   # Input might be given as Windows format, start by converting to
28076   # unix format.
28077   path="$BOOT_JDK"
28078   new_path=`$CYGPATH -u "$path"`
28079 
28080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28083   # "foo.exe" is OK but "foo" is an error.
28084   #
28085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28086   # It is also a way to make sure we got the proper file name for the real test later on.
28087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28088   if test "x$test_shortpath" = x; then
28089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28091     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28092   fi
28093 
28094   # Call helper function which possibly converts this using DOS-style short mode.
28095   # If so, the updated path is stored in $new_path.
28096 
28097   input_path="$new_path"
28098   # Check if we need to convert this using DOS-style short mode. If the path
28099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28100   # take no chances and rewrite it.
28101   # Note: m4 eats our [], so we need to use [ and ] instead.
28102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28103   if test "x$has_forbidden_chars" != x; then
28104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28108       # Going to short mode and back again did indeed matter. Since short mode is
28109       # case insensitive, let's make it lowercase to improve readability.
28110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28111       # Now convert it back to Unix-style (cygpath)
28112       input_path=`$CYGPATH -u "$shortmode_path"`
28113       new_path="$input_path"
28114     fi
28115   fi
28116 
28117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28118   if test "x$test_cygdrive_prefix" = x; then
28119     # As a simple fix, exclude /usr/bin since it's not a real path.
28120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28122       # a path prefixed by /cygdrive for fixpath to work.
28123       new_path="$CYGWIN_ROOT_PATH$input_path"
28124     fi
28125   fi
28126 
28127 
28128   if test "x$path" != "x$new_path"; then
28129     BOOT_JDK="$new_path"
28130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28132   fi
28133 
28134     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135 
28136   path="$BOOT_JDK"
28137   has_colon=`$ECHO $path | $GREP ^.:`
28138   new_path="$path"
28139   if test "x$has_colon" = x; then
28140     # Not in mixed or Windows style, start by that.
28141     new_path=`cmd //c echo $path`
28142   fi
28143 
28144 
28145   input_path="$new_path"
28146   # Check if we need to convert this using DOS-style short mode. If the path
28147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148   # take no chances and rewrite it.
28149   # Note: m4 eats our [], so we need to use [ and ] instead.
28150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28151   if test "x$has_forbidden_chars" != x; then
28152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28154   fi
28155 
28156 
28157   windows_path="$new_path"
28158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28159     unix_path=`$CYGPATH -u "$windows_path"`
28160     new_path="$unix_path"
28161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28163     new_path="$unix_path"
28164   fi
28165 
28166   if test "x$path" != "x$new_path"; then
28167     BOOT_JDK="$new_path"
28168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28170   fi
28171 
28172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28174 
28175     else
28176       # We're on a unix platform. Hooray! :)
28177       path="$BOOT_JDK"
28178       has_space=`$ECHO "$path" | $GREP " "`
28179       if test "x$has_space" != x; then
28180         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28181 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28182         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28183       fi
28184 
28185       # Use eval to expand a potential ~
28186       eval path="$path"
28187       if test ! -f "$path" && test ! -d "$path"; then
28188         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28189       fi
28190 
28191       if test -d "$path"; then
28192         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28193       else
28194         dir="`$DIRNAME "$path"`"
28195         base="`$BASENAME "$path"`"
28196         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28197       fi
28198     fi
28199   fi
28200 
28201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28202 $as_echo_n "checking for Boot JDK... " >&6; }
28203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28204 $as_echo "$BOOT_JDK" >&6; }
28205             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28206 $as_echo_n "checking Boot JDK version... " >&6; }
28207             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28208             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28209 $as_echo "$BOOT_JDK_VERSION" >&6; }
28210           fi # end check jdk version
28211         fi # end check javac
28212       fi # end check java
28213     fi # end check boot jdk found
28214   fi
28215 
28216 
28217   if test "x$BOOT_JDK_FOUND" = xno; then
28218     # Now execute the test
28219 
28220   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28221   BOOT_JDK_SUFFIX=""
28222   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28223   if test "x$ALL_JDKS_FOUND" != x; then
28224     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28225 
28226   if test "x$BOOT_JDK_FOUND" = xno; then
28227     # Now execute the test
28228 
28229         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28230         if test -d "$BOOT_JDK"; then
28231           BOOT_JDK_FOUND=maybe
28232           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28233 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28234         fi
28235 
28236 
28237     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28238     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28239       # Do we have a bin/java?
28240       if test ! -x "$BOOT_JDK/bin/java"; then
28241         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28243         BOOT_JDK_FOUND=no
28244       else
28245         # Do we have a bin/javac?
28246         if test ! -x "$BOOT_JDK/bin/javac"; then
28247           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28249           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28250 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28251           BOOT_JDK_FOUND=no
28252         else
28253           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28254           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28255 
28256           # Extra M4 quote needed to protect [] in grep expression.
28257           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28258           if test "x$FOUND_CORRECT_VERSION" = x; then
28259             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28260 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28261             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28262 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28263             BOOT_JDK_FOUND=no
28264           else
28265             # We're done! :-)
28266             BOOT_JDK_FOUND=yes
28267 
28268   # Only process if variable expands to non-empty
28269 
28270   if test "x$BOOT_JDK" != x; then
28271     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28272 
28273   # Input might be given as Windows format, start by converting to
28274   # unix format.
28275   path="$BOOT_JDK"
28276   new_path=`$CYGPATH -u "$path"`
28277 
28278   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28279   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28280   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28281   # "foo.exe" is OK but "foo" is an error.
28282   #
28283   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28284   # It is also a way to make sure we got the proper file name for the real test later on.
28285   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28286   if test "x$test_shortpath" = x; then
28287     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28288 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28289     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28290   fi
28291 
28292   # Call helper function which possibly converts this using DOS-style short mode.
28293   # If so, the updated path is stored in $new_path.
28294 
28295   input_path="$new_path"
28296   # Check if we need to convert this using DOS-style short mode. If the path
28297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28298   # take no chances and rewrite it.
28299   # Note: m4 eats our [], so we need to use [ and ] instead.
28300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28301   if test "x$has_forbidden_chars" != x; then
28302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28303     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28304     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28305     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28306       # Going to short mode and back again did indeed matter. Since short mode is
28307       # case insensitive, let's make it lowercase to improve readability.
28308       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28309       # Now convert it back to Unix-style (cygpath)
28310       input_path=`$CYGPATH -u "$shortmode_path"`
28311       new_path="$input_path"
28312     fi
28313   fi
28314 
28315   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28316   if test "x$test_cygdrive_prefix" = x; then
28317     # As a simple fix, exclude /usr/bin since it's not a real path.
28318     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28319       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28320       # a path prefixed by /cygdrive for fixpath to work.
28321       new_path="$CYGWIN_ROOT_PATH$input_path"
28322     fi
28323   fi
28324 
28325 
28326   if test "x$path" != "x$new_path"; then
28327     BOOT_JDK="$new_path"
28328     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28329 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28330   fi
28331 
28332     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28333 
28334   path="$BOOT_JDK"
28335   has_colon=`$ECHO $path | $GREP ^.:`
28336   new_path="$path"
28337   if test "x$has_colon" = x; then
28338     # Not in mixed or Windows style, start by that.
28339     new_path=`cmd //c echo $path`
28340   fi
28341 
28342 
28343   input_path="$new_path"
28344   # Check if we need to convert this using DOS-style short mode. If the path
28345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28346   # take no chances and rewrite it.
28347   # Note: m4 eats our [], so we need to use [ and ] instead.
28348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28349   if test "x$has_forbidden_chars" != x; then
28350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28351     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28352   fi
28353 
28354 
28355   windows_path="$new_path"
28356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28357     unix_path=`$CYGPATH -u "$windows_path"`
28358     new_path="$unix_path"
28359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28361     new_path="$unix_path"
28362   fi
28363 
28364   if test "x$path" != "x$new_path"; then
28365     BOOT_JDK="$new_path"
28366     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28367 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28368   fi
28369 
28370   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28371   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28372 
28373     else
28374       # We're on a unix platform. Hooray! :)
28375       path="$BOOT_JDK"
28376       has_space=`$ECHO "$path" | $GREP " "`
28377       if test "x$has_space" != x; then
28378         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28379 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28380         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28381       fi
28382 
28383       # Use eval to expand a potential ~
28384       eval path="$path"
28385       if test ! -f "$path" && test ! -d "$path"; then
28386         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28387       fi
28388 
28389       if test -d "$path"; then
28390         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28391       else
28392         dir="`$DIRNAME "$path"`"
28393         base="`$BASENAME "$path"`"
28394         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28395       fi
28396     fi
28397   fi
28398 
28399             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28400 $as_echo_n "checking for Boot JDK... " >&6; }
28401             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28402 $as_echo "$BOOT_JDK" >&6; }
28403             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28404 $as_echo_n "checking Boot JDK version... " >&6; }
28405             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28406             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28407 $as_echo "$BOOT_JDK_VERSION" >&6; }
28408           fi # end check jdk version
28409         fi # end check javac
28410       fi # end check java
28411     fi # end check boot jdk found
28412   fi
28413 
28414     done
28415   fi
28416 
28417 
28418     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28419     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28420       # Do we have a bin/java?
28421       if test ! -x "$BOOT_JDK/bin/java"; then
28422         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28423 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28424         BOOT_JDK_FOUND=no
28425       else
28426         # Do we have a bin/javac?
28427         if test ! -x "$BOOT_JDK/bin/javac"; then
28428           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28430           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28431 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28432           BOOT_JDK_FOUND=no
28433         else
28434           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28435           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28436 
28437           # Extra M4 quote needed to protect [] in grep expression.
28438           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28439           if test "x$FOUND_CORRECT_VERSION" = x; then
28440             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28441 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28442             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28443 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28444             BOOT_JDK_FOUND=no
28445           else
28446             # We're done! :-)
28447             BOOT_JDK_FOUND=yes
28448 
28449   # Only process if variable expands to non-empty
28450 
28451   if test "x$BOOT_JDK" != x; then
28452     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28453 
28454   # Input might be given as Windows format, start by converting to
28455   # unix format.
28456   path="$BOOT_JDK"
28457   new_path=`$CYGPATH -u "$path"`
28458 
28459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28462   # "foo.exe" is OK but "foo" is an error.
28463   #
28464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28465   # It is also a way to make sure we got the proper file name for the real test later on.
28466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28467   if test "x$test_shortpath" = x; then
28468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28471   fi
28472 
28473   # Call helper function which possibly converts this using DOS-style short mode.
28474   # If so, the updated path is stored in $new_path.
28475 
28476   input_path="$new_path"
28477   # Check if we need to convert this using DOS-style short mode. If the path
28478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28479   # take no chances and rewrite it.
28480   # Note: m4 eats our [], so we need to use [ and ] instead.
28481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28482   if test "x$has_forbidden_chars" != x; then
28483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28487       # Going to short mode and back again did indeed matter. Since short mode is
28488       # case insensitive, let's make it lowercase to improve readability.
28489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28490       # Now convert it back to Unix-style (cygpath)
28491       input_path=`$CYGPATH -u "$shortmode_path"`
28492       new_path="$input_path"
28493     fi
28494   fi
28495 
28496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28497   if test "x$test_cygdrive_prefix" = x; then
28498     # As a simple fix, exclude /usr/bin since it's not a real path.
28499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28501       # a path prefixed by /cygdrive for fixpath to work.
28502       new_path="$CYGWIN_ROOT_PATH$input_path"
28503     fi
28504   fi
28505 
28506 
28507   if test "x$path" != "x$new_path"; then
28508     BOOT_JDK="$new_path"
28509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28511   fi
28512 
28513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28514 
28515   path="$BOOT_JDK"
28516   has_colon=`$ECHO $path | $GREP ^.:`
28517   new_path="$path"
28518   if test "x$has_colon" = x; then
28519     # Not in mixed or Windows style, start by that.
28520     new_path=`cmd //c echo $path`
28521   fi
28522 
28523 
28524   input_path="$new_path"
28525   # Check if we need to convert this using DOS-style short mode. If the path
28526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28527   # take no chances and rewrite it.
28528   # Note: m4 eats our [], so we need to use [ and ] instead.
28529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28530   if test "x$has_forbidden_chars" != x; then
28531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28533   fi
28534 
28535 
28536   windows_path="$new_path"
28537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28538     unix_path=`$CYGPATH -u "$windows_path"`
28539     new_path="$unix_path"
28540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28542     new_path="$unix_path"
28543   fi
28544 
28545   if test "x$path" != "x$new_path"; then
28546     BOOT_JDK="$new_path"
28547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28549   fi
28550 
28551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28553 
28554     else
28555       # We're on a unix platform. Hooray! :)
28556       path="$BOOT_JDK"
28557       has_space=`$ECHO "$path" | $GREP " "`
28558       if test "x$has_space" != x; then
28559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28561         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28562       fi
28563 
28564       # Use eval to expand a potential ~
28565       eval path="$path"
28566       if test ! -f "$path" && test ! -d "$path"; then
28567         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28568       fi
28569 
28570       if test -d "$path"; then
28571         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28572       else
28573         dir="`$DIRNAME "$path"`"
28574         base="`$BASENAME "$path"`"
28575         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28576       fi
28577     fi
28578   fi
28579 
28580             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28581 $as_echo_n "checking for Boot JDK... " >&6; }
28582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28583 $as_echo "$BOOT_JDK" >&6; }
28584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28585 $as_echo_n "checking Boot JDK version... " >&6; }
28586             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28588 $as_echo "$BOOT_JDK_VERSION" >&6; }
28589           fi # end check jdk version
28590         fi # end check javac
28591       fi # end check java
28592     fi # end check boot jdk found
28593   fi
28594 
28595   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28596 
28597   if test "x$BOOT_JDK_FOUND" = xno; then
28598     # Now execute the test
28599 
28600   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28601   BOOT_JDK_SUFFIX="/Contents/Home"
28602   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28603   if test "x$ALL_JDKS_FOUND" != x; then
28604     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28605 
28606   if test "x$BOOT_JDK_FOUND" = xno; then
28607     # Now execute the test
28608 
28609         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28610         if test -d "$BOOT_JDK"; then
28611           BOOT_JDK_FOUND=maybe
28612           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28613 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28614         fi
28615 
28616 
28617     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28618     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28619       # Do we have a bin/java?
28620       if test ! -x "$BOOT_JDK/bin/java"; then
28621         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28623         BOOT_JDK_FOUND=no
28624       else
28625         # Do we have a bin/javac?
28626         if test ! -x "$BOOT_JDK/bin/javac"; then
28627           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28629           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28630 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28631           BOOT_JDK_FOUND=no
28632         else
28633           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28634           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28635 
28636           # Extra M4 quote needed to protect [] in grep expression.
28637           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28638           if test "x$FOUND_CORRECT_VERSION" = x; then
28639             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28641             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28642 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28643             BOOT_JDK_FOUND=no
28644           else
28645             # We're done! :-)
28646             BOOT_JDK_FOUND=yes
28647 
28648   # Only process if variable expands to non-empty
28649 
28650   if test "x$BOOT_JDK" != x; then
28651     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28652 
28653   # Input might be given as Windows format, start by converting to
28654   # unix format.
28655   path="$BOOT_JDK"
28656   new_path=`$CYGPATH -u "$path"`
28657 
28658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28661   # "foo.exe" is OK but "foo" is an error.
28662   #
28663   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28664   # It is also a way to make sure we got the proper file name for the real test later on.
28665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28666   if test "x$test_shortpath" = x; then
28667     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28668 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28669     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28670   fi
28671 
28672   # Call helper function which possibly converts this using DOS-style short mode.
28673   # If so, the updated path is stored in $new_path.
28674 
28675   input_path="$new_path"
28676   # Check if we need to convert this using DOS-style short mode. If the path
28677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28678   # take no chances and rewrite it.
28679   # Note: m4 eats our [], so we need to use [ and ] instead.
28680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28681   if test "x$has_forbidden_chars" != x; then
28682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28686       # Going to short mode and back again did indeed matter. Since short mode is
28687       # case insensitive, let's make it lowercase to improve readability.
28688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28689       # Now convert it back to Unix-style (cygpath)
28690       input_path=`$CYGPATH -u "$shortmode_path"`
28691       new_path="$input_path"
28692     fi
28693   fi
28694 
28695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28696   if test "x$test_cygdrive_prefix" = x; then
28697     # As a simple fix, exclude /usr/bin since it's not a real path.
28698     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28700       # a path prefixed by /cygdrive for fixpath to work.
28701       new_path="$CYGWIN_ROOT_PATH$input_path"
28702     fi
28703   fi
28704 
28705 
28706   if test "x$path" != "x$new_path"; then
28707     BOOT_JDK="$new_path"
28708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28709 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28710   fi
28711 
28712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28713 
28714   path="$BOOT_JDK"
28715   has_colon=`$ECHO $path | $GREP ^.:`
28716   new_path="$path"
28717   if test "x$has_colon" = x; then
28718     # Not in mixed or Windows style, start by that.
28719     new_path=`cmd //c echo $path`
28720   fi
28721 
28722 
28723   input_path="$new_path"
28724   # Check if we need to convert this using DOS-style short mode. If the path
28725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28726   # take no chances and rewrite it.
28727   # Note: m4 eats our [], so we need to use [ and ] instead.
28728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28729   if test "x$has_forbidden_chars" != x; then
28730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28731     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28732   fi
28733 
28734 
28735   windows_path="$new_path"
28736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28737     unix_path=`$CYGPATH -u "$windows_path"`
28738     new_path="$unix_path"
28739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28741     new_path="$unix_path"
28742   fi
28743 
28744   if test "x$path" != "x$new_path"; then
28745     BOOT_JDK="$new_path"
28746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28747 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28748   fi
28749 
28750   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28751   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28752 
28753     else
28754       # We're on a unix platform. Hooray! :)
28755       path="$BOOT_JDK"
28756       has_space=`$ECHO "$path" | $GREP " "`
28757       if test "x$has_space" != x; then
28758         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28759 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28760         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28761       fi
28762 
28763       # Use eval to expand a potential ~
28764       eval path="$path"
28765       if test ! -f "$path" && test ! -d "$path"; then
28766         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28767       fi
28768 
28769       if test -d "$path"; then
28770         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28771       else
28772         dir="`$DIRNAME "$path"`"
28773         base="`$BASENAME "$path"`"
28774         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28775       fi
28776     fi
28777   fi
28778 
28779             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28780 $as_echo_n "checking for Boot JDK... " >&6; }
28781             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28782 $as_echo "$BOOT_JDK" >&6; }
28783             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28784 $as_echo_n "checking Boot JDK version... " >&6; }
28785             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28786             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28787 $as_echo "$BOOT_JDK_VERSION" >&6; }
28788           fi # end check jdk version
28789         fi # end check javac
28790       fi # end check java
28791     fi # end check boot jdk found
28792   fi
28793 
28794     done
28795   fi
28796 
28797 
28798     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28799     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28800       # Do we have a bin/java?
28801       if test ! -x "$BOOT_JDK/bin/java"; then
28802         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28804         BOOT_JDK_FOUND=no
28805       else
28806         # Do we have a bin/javac?
28807         if test ! -x "$BOOT_JDK/bin/javac"; then
28808           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28810           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28811 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28812           BOOT_JDK_FOUND=no
28813         else
28814           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28815           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28816 
28817           # Extra M4 quote needed to protect [] in grep expression.
28818           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28819           if test "x$FOUND_CORRECT_VERSION" = x; then
28820             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28822             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28823 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28824             BOOT_JDK_FOUND=no
28825           else
28826             # We're done! :-)
28827             BOOT_JDK_FOUND=yes
28828 
28829   # Only process if variable expands to non-empty
28830 
28831   if test "x$BOOT_JDK" != x; then
28832     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28833 
28834   # Input might be given as Windows format, start by converting to
28835   # unix format.
28836   path="$BOOT_JDK"
28837   new_path=`$CYGPATH -u "$path"`
28838 
28839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28842   # "foo.exe" is OK but "foo" is an error.
28843   #
28844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28845   # It is also a way to make sure we got the proper file name for the real test later on.
28846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28847   if test "x$test_shortpath" = x; then
28848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28849 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28850     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28851   fi
28852 
28853   # Call helper function which possibly converts this using DOS-style short mode.
28854   # If so, the updated path is stored in $new_path.
28855 
28856   input_path="$new_path"
28857   # Check if we need to convert this using DOS-style short mode. If the path
28858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28859   # take no chances and rewrite it.
28860   # Note: m4 eats our [], so we need to use [ and ] instead.
28861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28862   if test "x$has_forbidden_chars" != x; then
28863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28867       # Going to short mode and back again did indeed matter. Since short mode is
28868       # case insensitive, let's make it lowercase to improve readability.
28869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28870       # Now convert it back to Unix-style (cygpath)
28871       input_path=`$CYGPATH -u "$shortmode_path"`
28872       new_path="$input_path"
28873     fi
28874   fi
28875 
28876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28877   if test "x$test_cygdrive_prefix" = x; then
28878     # As a simple fix, exclude /usr/bin since it's not a real path.
28879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28881       # a path prefixed by /cygdrive for fixpath to work.
28882       new_path="$CYGWIN_ROOT_PATH$input_path"
28883     fi
28884   fi
28885 
28886 
28887   if test "x$path" != "x$new_path"; then
28888     BOOT_JDK="$new_path"
28889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28890 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28891   fi
28892 
28893     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28894 
28895   path="$BOOT_JDK"
28896   has_colon=`$ECHO $path | $GREP ^.:`
28897   new_path="$path"
28898   if test "x$has_colon" = x; then
28899     # Not in mixed or Windows style, start by that.
28900     new_path=`cmd //c echo $path`
28901   fi
28902 
28903 
28904   input_path="$new_path"
28905   # Check if we need to convert this using DOS-style short mode. If the path
28906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28907   # take no chances and rewrite it.
28908   # Note: m4 eats our [], so we need to use [ and ] instead.
28909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28910   if test "x$has_forbidden_chars" != x; then
28911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28913   fi
28914 
28915 
28916   windows_path="$new_path"
28917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28918     unix_path=`$CYGPATH -u "$windows_path"`
28919     new_path="$unix_path"
28920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28922     new_path="$unix_path"
28923   fi
28924 
28925   if test "x$path" != "x$new_path"; then
28926     BOOT_JDK="$new_path"
28927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28928 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28929   fi
28930 
28931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28933 
28934     else
28935       # We're on a unix platform. Hooray! :)
28936       path="$BOOT_JDK"
28937       has_space=`$ECHO "$path" | $GREP " "`
28938       if test "x$has_space" != x; then
28939         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28940 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28941         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28942       fi
28943 
28944       # Use eval to expand a potential ~
28945       eval path="$path"
28946       if test ! -f "$path" && test ! -d "$path"; then
28947         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28948       fi
28949 
28950       if test -d "$path"; then
28951         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28952       else
28953         dir="`$DIRNAME "$path"`"
28954         base="`$BASENAME "$path"`"
28955         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28956       fi
28957     fi
28958   fi
28959 
28960             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28961 $as_echo_n "checking for Boot JDK... " >&6; }
28962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28963 $as_echo "$BOOT_JDK" >&6; }
28964             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28965 $as_echo_n "checking Boot JDK version... " >&6; }
28966             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28967             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28968 $as_echo "$BOOT_JDK_VERSION" >&6; }
28969           fi # end check jdk version
28970         fi # end check javac
28971       fi # end check java
28972     fi # end check boot jdk found
28973   fi
28974 
28975 
28976   if test "x$BOOT_JDK_FOUND" = xno; then
28977     # Now execute the test
28978 
28979   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28980   BOOT_JDK_SUFFIX="/Contents/Home"
28981   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28982   if test "x$ALL_JDKS_FOUND" != x; then
28983     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28984 
28985   if test "x$BOOT_JDK_FOUND" = xno; then
28986     # Now execute the test
28987 
28988         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28989         if test -d "$BOOT_JDK"; then
28990           BOOT_JDK_FOUND=maybe
28991           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28992 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28993         fi
28994 
28995 
28996     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28997     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28998       # Do we have a bin/java?
28999       if test ! -x "$BOOT_JDK/bin/java"; then
29000         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29002         BOOT_JDK_FOUND=no
29003       else
29004         # Do we have a bin/javac?
29005         if test ! -x "$BOOT_JDK/bin/javac"; then
29006           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29007 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29008           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29009 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29010           BOOT_JDK_FOUND=no
29011         else
29012           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29013           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29014 
29015           # Extra M4 quote needed to protect [] in grep expression.
29016           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29017           if test "x$FOUND_CORRECT_VERSION" = x; then
29018             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29019 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29020             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29021 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29022             BOOT_JDK_FOUND=no
29023           else
29024             # We're done! :-)
29025             BOOT_JDK_FOUND=yes
29026 
29027   # Only process if variable expands to non-empty
29028 
29029   if test "x$BOOT_JDK" != x; then
29030     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29031 
29032   # Input might be given as Windows format, start by converting to
29033   # unix format.
29034   path="$BOOT_JDK"
29035   new_path=`$CYGPATH -u "$path"`
29036 
29037   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29038   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29039   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29040   # "foo.exe" is OK but "foo" is an error.
29041   #
29042   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29043   # It is also a way to make sure we got the proper file name for the real test later on.
29044   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29045   if test "x$test_shortpath" = x; then
29046     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29048     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29049   fi
29050 
29051   # Call helper function which possibly converts this using DOS-style short mode.
29052   # If so, the updated path is stored in $new_path.
29053 
29054   input_path="$new_path"
29055   # Check if we need to convert this using DOS-style short mode. If the path
29056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29057   # take no chances and rewrite it.
29058   # Note: m4 eats our [], so we need to use [ and ] instead.
29059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29060   if test "x$has_forbidden_chars" != x; then
29061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29062     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29063     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29064     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29065       # Going to short mode and back again did indeed matter. Since short mode is
29066       # case insensitive, let's make it lowercase to improve readability.
29067       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29068       # Now convert it back to Unix-style (cygpath)
29069       input_path=`$CYGPATH -u "$shortmode_path"`
29070       new_path="$input_path"
29071     fi
29072   fi
29073 
29074   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29075   if test "x$test_cygdrive_prefix" = x; then
29076     # As a simple fix, exclude /usr/bin since it's not a real path.
29077     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29078       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29079       # a path prefixed by /cygdrive for fixpath to work.
29080       new_path="$CYGWIN_ROOT_PATH$input_path"
29081     fi
29082   fi
29083 
29084 
29085   if test "x$path" != "x$new_path"; then
29086     BOOT_JDK="$new_path"
29087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29088 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29089   fi
29090 
29091     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29092 
29093   path="$BOOT_JDK"
29094   has_colon=`$ECHO $path | $GREP ^.:`
29095   new_path="$path"
29096   if test "x$has_colon" = x; then
29097     # Not in mixed or Windows style, start by that.
29098     new_path=`cmd //c echo $path`
29099   fi
29100 
29101 
29102   input_path="$new_path"
29103   # Check if we need to convert this using DOS-style short mode. If the path
29104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29105   # take no chances and rewrite it.
29106   # Note: m4 eats our [], so we need to use [ and ] instead.
29107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29108   if test "x$has_forbidden_chars" != x; then
29109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29111   fi
29112 
29113 
29114   windows_path="$new_path"
29115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29116     unix_path=`$CYGPATH -u "$windows_path"`
29117     new_path="$unix_path"
29118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29120     new_path="$unix_path"
29121   fi
29122 
29123   if test "x$path" != "x$new_path"; then
29124     BOOT_JDK="$new_path"
29125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29127   fi
29128 
29129   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29130   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29131 
29132     else
29133       # We're on a unix platform. Hooray! :)
29134       path="$BOOT_JDK"
29135       has_space=`$ECHO "$path" | $GREP " "`
29136       if test "x$has_space" != x; then
29137         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29139         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29140       fi
29141 
29142       # Use eval to expand a potential ~
29143       eval path="$path"
29144       if test ! -f "$path" && test ! -d "$path"; then
29145         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29146       fi
29147 
29148       if test -d "$path"; then
29149         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29150       else
29151         dir="`$DIRNAME "$path"`"
29152         base="`$BASENAME "$path"`"
29153         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29154       fi
29155     fi
29156   fi
29157 
29158             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29159 $as_echo_n "checking for Boot JDK... " >&6; }
29160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29161 $as_echo "$BOOT_JDK" >&6; }
29162             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29163 $as_echo_n "checking Boot JDK version... " >&6; }
29164             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29165             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29166 $as_echo "$BOOT_JDK_VERSION" >&6; }
29167           fi # end check jdk version
29168         fi # end check javac
29169       fi # end check java
29170     fi # end check boot jdk found
29171   fi
29172 
29173     done
29174   fi
29175 
29176 
29177     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29178     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29179       # Do we have a bin/java?
29180       if test ! -x "$BOOT_JDK/bin/java"; then
29181         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29183         BOOT_JDK_FOUND=no
29184       else
29185         # Do we have a bin/javac?
29186         if test ! -x "$BOOT_JDK/bin/javac"; then
29187           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29188 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29189           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29190 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29191           BOOT_JDK_FOUND=no
29192         else
29193           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29194           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29195 
29196           # Extra M4 quote needed to protect [] in grep expression.
29197           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29198           if test "x$FOUND_CORRECT_VERSION" = x; then
29199             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29201             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29202 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29203             BOOT_JDK_FOUND=no
29204           else
29205             # We're done! :-)
29206             BOOT_JDK_FOUND=yes
29207 
29208   # Only process if variable expands to non-empty
29209 
29210   if test "x$BOOT_JDK" != x; then
29211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29212 
29213   # Input might be given as Windows format, start by converting to
29214   # unix format.
29215   path="$BOOT_JDK"
29216   new_path=`$CYGPATH -u "$path"`
29217 
29218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29221   # "foo.exe" is OK but "foo" is an error.
29222   #
29223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29224   # It is also a way to make sure we got the proper file name for the real test later on.
29225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29226   if test "x$test_shortpath" = x; then
29227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29228 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29229     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29230   fi
29231 
29232   # Call helper function which possibly converts this using DOS-style short mode.
29233   # If so, the updated path is stored in $new_path.
29234 
29235   input_path="$new_path"
29236   # Check if we need to convert this using DOS-style short mode. If the path
29237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29238   # take no chances and rewrite it.
29239   # Note: m4 eats our [], so we need to use [ and ] instead.
29240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29241   if test "x$has_forbidden_chars" != x; then
29242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29246       # Going to short mode and back again did indeed matter. Since short mode is
29247       # case insensitive, let's make it lowercase to improve readability.
29248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29249       # Now convert it back to Unix-style (cygpath)
29250       input_path=`$CYGPATH -u "$shortmode_path"`
29251       new_path="$input_path"
29252     fi
29253   fi
29254 
29255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29256   if test "x$test_cygdrive_prefix" = x; then
29257     # As a simple fix, exclude /usr/bin since it's not a real path.
29258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29260       # a path prefixed by /cygdrive for fixpath to work.
29261       new_path="$CYGWIN_ROOT_PATH$input_path"
29262     fi
29263   fi
29264 
29265 
29266   if test "x$path" != "x$new_path"; then
29267     BOOT_JDK="$new_path"
29268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29269 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29270   fi
29271 
29272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29273 
29274   path="$BOOT_JDK"
29275   has_colon=`$ECHO $path | $GREP ^.:`
29276   new_path="$path"
29277   if test "x$has_colon" = x; then
29278     # Not in mixed or Windows style, start by that.
29279     new_path=`cmd //c echo $path`
29280   fi
29281 
29282 
29283   input_path="$new_path"
29284   # Check if we need to convert this using DOS-style short mode. If the path
29285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29286   # take no chances and rewrite it.
29287   # Note: m4 eats our [], so we need to use [ and ] instead.
29288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29289   if test "x$has_forbidden_chars" != x; then
29290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29292   fi
29293 
29294 
29295   windows_path="$new_path"
29296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29297     unix_path=`$CYGPATH -u "$windows_path"`
29298     new_path="$unix_path"
29299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29301     new_path="$unix_path"
29302   fi
29303 
29304   if test "x$path" != "x$new_path"; then
29305     BOOT_JDK="$new_path"
29306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29308   fi
29309 
29310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29312 
29313     else
29314       # We're on a unix platform. Hooray! :)
29315       path="$BOOT_JDK"
29316       has_space=`$ECHO "$path" | $GREP " "`
29317       if test "x$has_space" != x; then
29318         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29319 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29320         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29321       fi
29322 
29323       # Use eval to expand a potential ~
29324       eval path="$path"
29325       if test ! -f "$path" && test ! -d "$path"; then
29326         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29327       fi
29328 
29329       if test -d "$path"; then
29330         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29331       else
29332         dir="`$DIRNAME "$path"`"
29333         base="`$BASENAME "$path"`"
29334         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29335       fi
29336     fi
29337   fi
29338 
29339             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29340 $as_echo_n "checking for Boot JDK... " >&6; }
29341             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29342 $as_echo "$BOOT_JDK" >&6; }
29343             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29344 $as_echo_n "checking Boot JDK version... " >&6; }
29345             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29346             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29347 $as_echo "$BOOT_JDK_VERSION" >&6; }
29348           fi # end check jdk version
29349         fi # end check javac
29350       fi # end check java
29351     fi # end check boot jdk found
29352   fi
29353 
29354   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29355 
29356   if test "x$BOOT_JDK_FOUND" = xno; then
29357     # Now execute the test
29358 
29359   BOOT_JDK_PREFIX="/usr/lib/jvm"
29360   BOOT_JDK_SUFFIX=""
29361   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29362   if test "x$ALL_JDKS_FOUND" != x; then
29363     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29364 
29365   if test "x$BOOT_JDK_FOUND" = xno; then
29366     # Now execute the test
29367 
29368         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29369         if test -d "$BOOT_JDK"; then
29370           BOOT_JDK_FOUND=maybe
29371           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29372 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29373         fi
29374 
29375 
29376     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29377     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29378       # Do we have a bin/java?
29379       if test ! -x "$BOOT_JDK/bin/java"; then
29380         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29382         BOOT_JDK_FOUND=no
29383       else
29384         # Do we have a bin/javac?
29385         if test ! -x "$BOOT_JDK/bin/javac"; then
29386           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29388           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29389 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29390           BOOT_JDK_FOUND=no
29391         else
29392           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29393           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29394 
29395           # Extra M4 quote needed to protect [] in grep expression.
29396           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29397           if test "x$FOUND_CORRECT_VERSION" = x; then
29398             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29399 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29400             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29401 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29402             BOOT_JDK_FOUND=no
29403           else
29404             # We're done! :-)
29405             BOOT_JDK_FOUND=yes
29406 
29407   # Only process if variable expands to non-empty
29408 
29409   if test "x$BOOT_JDK" != x; then
29410     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29411 
29412   # Input might be given as Windows format, start by converting to
29413   # unix format.
29414   path="$BOOT_JDK"
29415   new_path=`$CYGPATH -u "$path"`
29416 
29417   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29418   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29419   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29420   # "foo.exe" is OK but "foo" is an error.
29421   #
29422   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29423   # It is also a way to make sure we got the proper file name for the real test later on.
29424   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29425   if test "x$test_shortpath" = x; then
29426     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29427 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29428     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29429   fi
29430 
29431   # Call helper function which possibly converts this using DOS-style short mode.
29432   # If so, the updated path is stored in $new_path.
29433 
29434   input_path="$new_path"
29435   # Check if we need to convert this using DOS-style short mode. If the path
29436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29437   # take no chances and rewrite it.
29438   # Note: m4 eats our [], so we need to use [ and ] instead.
29439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29440   if test "x$has_forbidden_chars" != x; then
29441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29442     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29443     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29444     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29445       # Going to short mode and back again did indeed matter. Since short mode is
29446       # case insensitive, let's make it lowercase to improve readability.
29447       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29448       # Now convert it back to Unix-style (cygpath)
29449       input_path=`$CYGPATH -u "$shortmode_path"`
29450       new_path="$input_path"
29451     fi
29452   fi
29453 
29454   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29455   if test "x$test_cygdrive_prefix" = x; then
29456     # As a simple fix, exclude /usr/bin since it's not a real path.
29457     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29458       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29459       # a path prefixed by /cygdrive for fixpath to work.
29460       new_path="$CYGWIN_ROOT_PATH$input_path"
29461     fi
29462   fi
29463 
29464 
29465   if test "x$path" != "x$new_path"; then
29466     BOOT_JDK="$new_path"
29467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29468 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29469   fi
29470 
29471     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29472 
29473   path="$BOOT_JDK"
29474   has_colon=`$ECHO $path | $GREP ^.:`
29475   new_path="$path"
29476   if test "x$has_colon" = x; then
29477     # Not in mixed or Windows style, start by that.
29478     new_path=`cmd //c echo $path`
29479   fi
29480 
29481 
29482   input_path="$new_path"
29483   # Check if we need to convert this using DOS-style short mode. If the path
29484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29485   # take no chances and rewrite it.
29486   # Note: m4 eats our [], so we need to use [ and ] instead.
29487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29488   if test "x$has_forbidden_chars" != x; then
29489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29490     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29491   fi
29492 
29493 
29494   windows_path="$new_path"
29495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29496     unix_path=`$CYGPATH -u "$windows_path"`
29497     new_path="$unix_path"
29498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29500     new_path="$unix_path"
29501   fi
29502 
29503   if test "x$path" != "x$new_path"; then
29504     BOOT_JDK="$new_path"
29505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29506 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29507   fi
29508 
29509   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29510   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29511 
29512     else
29513       # We're on a unix platform. Hooray! :)
29514       path="$BOOT_JDK"
29515       has_space=`$ECHO "$path" | $GREP " "`
29516       if test "x$has_space" != x; then
29517         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29518 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29519         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29520       fi
29521 
29522       # Use eval to expand a potential ~
29523       eval path="$path"
29524       if test ! -f "$path" && test ! -d "$path"; then
29525         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29526       fi
29527 
29528       if test -d "$path"; then
29529         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29530       else
29531         dir="`$DIRNAME "$path"`"
29532         base="`$BASENAME "$path"`"
29533         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29534       fi
29535     fi
29536   fi
29537 
29538             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29539 $as_echo_n "checking for Boot JDK... " >&6; }
29540             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29541 $as_echo "$BOOT_JDK" >&6; }
29542             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29543 $as_echo_n "checking Boot JDK version... " >&6; }
29544             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29545             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29546 $as_echo "$BOOT_JDK_VERSION" >&6; }
29547           fi # end check jdk version
29548         fi # end check javac
29549       fi # end check java
29550     fi # end check boot jdk found
29551   fi
29552 
29553     done
29554   fi
29555 
29556 
29557     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29558     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29559       # Do we have a bin/java?
29560       if test ! -x "$BOOT_JDK/bin/java"; then
29561         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29562 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29563         BOOT_JDK_FOUND=no
29564       else
29565         # Do we have a bin/javac?
29566         if test ! -x "$BOOT_JDK/bin/javac"; then
29567           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29568 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29569           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29570 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29571           BOOT_JDK_FOUND=no
29572         else
29573           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29574           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29575 
29576           # Extra M4 quote needed to protect [] in grep expression.
29577           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29578           if test "x$FOUND_CORRECT_VERSION" = x; then
29579             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29580 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29581             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29582 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29583             BOOT_JDK_FOUND=no
29584           else
29585             # We're done! :-)
29586             BOOT_JDK_FOUND=yes
29587 
29588   # Only process if variable expands to non-empty
29589 
29590   if test "x$BOOT_JDK" != x; then
29591     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29592 
29593   # Input might be given as Windows format, start by converting to
29594   # unix format.
29595   path="$BOOT_JDK"
29596   new_path=`$CYGPATH -u "$path"`
29597 
29598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29601   # "foo.exe" is OK but "foo" is an error.
29602   #
29603   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29604   # It is also a way to make sure we got the proper file name for the real test later on.
29605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29606   if test "x$test_shortpath" = x; then
29607     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29608 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29609     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29610   fi
29611 
29612   # Call helper function which possibly converts this using DOS-style short mode.
29613   # If so, the updated path is stored in $new_path.
29614 
29615   input_path="$new_path"
29616   # Check if we need to convert this using DOS-style short mode. If the path
29617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29618   # take no chances and rewrite it.
29619   # Note: m4 eats our [], so we need to use [ and ] instead.
29620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29621   if test "x$has_forbidden_chars" != x; then
29622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29623     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29624     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29625     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29626       # Going to short mode and back again did indeed matter. Since short mode is
29627       # case insensitive, let's make it lowercase to improve readability.
29628       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29629       # Now convert it back to Unix-style (cygpath)
29630       input_path=`$CYGPATH -u "$shortmode_path"`
29631       new_path="$input_path"
29632     fi
29633   fi
29634 
29635   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29636   if test "x$test_cygdrive_prefix" = x; then
29637     # As a simple fix, exclude /usr/bin since it's not a real path.
29638     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29639       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29640       # a path prefixed by /cygdrive for fixpath to work.
29641       new_path="$CYGWIN_ROOT_PATH$input_path"
29642     fi
29643   fi
29644 
29645 
29646   if test "x$path" != "x$new_path"; then
29647     BOOT_JDK="$new_path"
29648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29649 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29650   fi
29651 
29652     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29653 
29654   path="$BOOT_JDK"
29655   has_colon=`$ECHO $path | $GREP ^.:`
29656   new_path="$path"
29657   if test "x$has_colon" = x; then
29658     # Not in mixed or Windows style, start by that.
29659     new_path=`cmd //c echo $path`
29660   fi
29661 
29662 
29663   input_path="$new_path"
29664   # Check if we need to convert this using DOS-style short mode. If the path
29665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29666   # take no chances and rewrite it.
29667   # Note: m4 eats our [], so we need to use [ and ] instead.
29668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29669   if test "x$has_forbidden_chars" != x; then
29670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29671     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29672   fi
29673 
29674 
29675   windows_path="$new_path"
29676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29677     unix_path=`$CYGPATH -u "$windows_path"`
29678     new_path="$unix_path"
29679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29681     new_path="$unix_path"
29682   fi
29683 
29684   if test "x$path" != "x$new_path"; then
29685     BOOT_JDK="$new_path"
29686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29687 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29688   fi
29689 
29690   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29691   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29692 
29693     else
29694       # We're on a unix platform. Hooray! :)
29695       path="$BOOT_JDK"
29696       has_space=`$ECHO "$path" | $GREP " "`
29697       if test "x$has_space" != x; then
29698         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29699 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29700         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29701       fi
29702 
29703       # Use eval to expand a potential ~
29704       eval path="$path"
29705       if test ! -f "$path" && test ! -d "$path"; then
29706         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29707       fi
29708 
29709       if test -d "$path"; then
29710         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29711       else
29712         dir="`$DIRNAME "$path"`"
29713         base="`$BASENAME "$path"`"
29714         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29715       fi
29716     fi
29717   fi
29718 
29719             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29720 $as_echo_n "checking for Boot JDK... " >&6; }
29721             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29722 $as_echo "$BOOT_JDK" >&6; }
29723             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29724 $as_echo_n "checking Boot JDK version... " >&6; }
29725             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29727 $as_echo "$BOOT_JDK_VERSION" >&6; }
29728           fi # end check jdk version
29729         fi # end check javac
29730       fi # end check java
29731     fi # end check boot jdk found
29732   fi
29733 
29734   fi
29735 
29736 
29737     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29738     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29739       # Do we have a bin/java?
29740       if test ! -x "$BOOT_JDK/bin/java"; then
29741         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29743         BOOT_JDK_FOUND=no
29744       else
29745         # Do we have a bin/javac?
29746         if test ! -x "$BOOT_JDK/bin/javac"; then
29747           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29749           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29750 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29751           BOOT_JDK_FOUND=no
29752         else
29753           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29754           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29755 
29756           # Extra M4 quote needed to protect [] in grep expression.
29757           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29758           if test "x$FOUND_CORRECT_VERSION" = x; then
29759             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29761             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29762 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29763             BOOT_JDK_FOUND=no
29764           else
29765             # We're done! :-)
29766             BOOT_JDK_FOUND=yes
29767 
29768   # Only process if variable expands to non-empty
29769 
29770   if test "x$BOOT_JDK" != x; then
29771     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29772 
29773   # Input might be given as Windows format, start by converting to
29774   # unix format.
29775   path="$BOOT_JDK"
29776   new_path=`$CYGPATH -u "$path"`
29777 
29778   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29779   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29780   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29781   # "foo.exe" is OK but "foo" is an error.
29782   #
29783   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29784   # It is also a way to make sure we got the proper file name for the real test later on.
29785   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29786   if test "x$test_shortpath" = x; then
29787     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29788 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29789     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29790   fi
29791 
29792   # Call helper function which possibly converts this using DOS-style short mode.
29793   # If so, the updated path is stored in $new_path.
29794 
29795   input_path="$new_path"
29796   # Check if we need to convert this using DOS-style short mode. If the path
29797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29798   # take no chances and rewrite it.
29799   # Note: m4 eats our [], so we need to use [ and ] instead.
29800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29801   if test "x$has_forbidden_chars" != x; then
29802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29803     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29804     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29805     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29806       # Going to short mode and back again did indeed matter. Since short mode is
29807       # case insensitive, let's make it lowercase to improve readability.
29808       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29809       # Now convert it back to Unix-style (cygpath)
29810       input_path=`$CYGPATH -u "$shortmode_path"`
29811       new_path="$input_path"
29812     fi
29813   fi
29814 
29815   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29816   if test "x$test_cygdrive_prefix" = x; then
29817     # As a simple fix, exclude /usr/bin since it's not a real path.
29818     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29819       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29820       # a path prefixed by /cygdrive for fixpath to work.
29821       new_path="$CYGWIN_ROOT_PATH$input_path"
29822     fi
29823   fi
29824 
29825 
29826   if test "x$path" != "x$new_path"; then
29827     BOOT_JDK="$new_path"
29828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29829 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29830   fi
29831 
29832     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29833 
29834   path="$BOOT_JDK"
29835   has_colon=`$ECHO $path | $GREP ^.:`
29836   new_path="$path"
29837   if test "x$has_colon" = x; then
29838     # Not in mixed or Windows style, start by that.
29839     new_path=`cmd //c echo $path`
29840   fi
29841 
29842 
29843   input_path="$new_path"
29844   # Check if we need to convert this using DOS-style short mode. If the path
29845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29846   # take no chances and rewrite it.
29847   # Note: m4 eats our [], so we need to use [ and ] instead.
29848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29849   if test "x$has_forbidden_chars" != x; then
29850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29851     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29852   fi
29853 
29854 
29855   windows_path="$new_path"
29856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29857     unix_path=`$CYGPATH -u "$windows_path"`
29858     new_path="$unix_path"
29859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29861     new_path="$unix_path"
29862   fi
29863 
29864   if test "x$path" != "x$new_path"; then
29865     BOOT_JDK="$new_path"
29866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29867 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29868   fi
29869 
29870   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29871   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29872 
29873     else
29874       # We're on a unix platform. Hooray! :)
29875       path="$BOOT_JDK"
29876       has_space=`$ECHO "$path" | $GREP " "`
29877       if test "x$has_space" != x; then
29878         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29879 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29880         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29881       fi
29882 
29883       # Use eval to expand a potential ~
29884       eval path="$path"
29885       if test ! -f "$path" && test ! -d "$path"; then
29886         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29887       fi
29888 
29889       if test -d "$path"; then
29890         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29891       else
29892         dir="`$DIRNAME "$path"`"
29893         base="`$BASENAME "$path"`"
29894         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29895       fi
29896     fi
29897   fi
29898 
29899             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29900 $as_echo_n "checking for Boot JDK... " >&6; }
29901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29902 $as_echo "$BOOT_JDK" >&6; }
29903             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29904 $as_echo_n "checking Boot JDK version... " >&6; }
29905             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29906             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29907 $as_echo "$BOOT_JDK_VERSION" >&6; }
29908           fi # end check jdk version
29909         fi # end check javac
29910       fi # end check java
29911     fi # end check boot jdk found
29912   fi
29913 
29914 
29915   # If we haven't found anything yet, we've truly lost. Give up.
29916   if test "x$BOOT_JDK_FOUND" = xno; then
29917 
29918   # Print a helpful message on how to acquire the necessary build dependency.
29919   # openjdk is the help tag: freetype, cups, alsa etc
29920   MISSING_DEPENDENCY=openjdk
29921 
29922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29923     cygwin_help $MISSING_DEPENDENCY
29924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29925     msys_help $MISSING_DEPENDENCY
29926   else
29927     PKGHANDLER_COMMAND=
29928 
29929     case $PKGHANDLER in
29930       apt-get)
29931         apt_help     $MISSING_DEPENDENCY ;;
29932       yum)
29933         yum_help     $MISSING_DEPENDENCY ;;
29934       port)
29935         port_help    $MISSING_DEPENDENCY ;;
29936       pkgutil)
29937         pkgutil_help $MISSING_DEPENDENCY ;;
29938       pkgadd)
29939         pkgadd_help  $MISSING_DEPENDENCY ;;
29940     esac
29941 
29942     if test "x$PKGHANDLER_COMMAND" != x; then
29943       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29944     fi
29945   fi
29946 
29947     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29948 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29949     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29950 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29951     as_fn_error $? "Cannot continue" "$LINENO" 5
29952   fi
29953 
29954 
29955 
29956   # Setup tools from the Boot JDK.
29957 
29958   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29959 
29960   # Publish this variable in the help.
29961 
29962 
29963   if [ -z "${JAVA+x}" ]; then
29964     # The variable is not set by user, try to locate tool using the code snippet
29965 
29966       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29967 $as_echo_n "checking for java in Boot JDK... " >&6; }
29968       JAVA=$BOOT_JDK/bin/java
29969       if test ! -x $JAVA; then
29970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29971 $as_echo "not found" >&6; }
29972         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29973 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29974         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29975       fi
29976       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29977 $as_echo "ok" >&6; }
29978 
29979 
29980   else
29981     # The variable is set, but is it from the command line or the environment?
29982 
29983     # Try to remove the string !JAVA! from our list.
29984     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29985     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29986       # If it failed, the variable was not from the command line. Ignore it,
29987       # but warn the user (except for BASH, which is always set by the calling BASH).
29988       if test "xJAVA" != xBASH; then
29989         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29990 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29991       fi
29992       # Try to locate tool using the code snippet
29993 
29994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29995 $as_echo_n "checking for java in Boot JDK... " >&6; }
29996       JAVA=$BOOT_JDK/bin/java
29997       if test ! -x $JAVA; then
29998         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29999 $as_echo "not found" >&6; }
30000         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30001 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30002         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30003       fi
30004       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30005 $as_echo "ok" >&6; }
30006 
30007 
30008     else
30009       # If it succeeded, then it was overridden by the user. We will use it
30010       # for the tool.
30011 
30012       # First remove it from the list of overridden variables, so we can test
30013       # for unknown variables in the end.
30014       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30015 
30016       # Check if we try to supply an empty value
30017       if test "x$JAVA" = x; then
30018         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30019 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30021 $as_echo_n "checking for JAVA... " >&6; }
30022         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30023 $as_echo "disabled" >&6; }
30024       else
30025         # Check if the provided tool contains a complete path.
30026         tool_specified="$JAVA"
30027         tool_basename="${tool_specified##*/}"
30028         if test "x$tool_basename" = "x$tool_specified"; then
30029           # A command without a complete path is provided, search $PATH.
30030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30031 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30032           # Extract the first word of "$tool_basename", so it can be a program name with args.
30033 set dummy $tool_basename; ac_word=$2
30034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30035 $as_echo_n "checking for $ac_word... " >&6; }
30036 if ${ac_cv_path_JAVA+:} false; then :
30037   $as_echo_n "(cached) " >&6
30038 else
30039   case $JAVA in
30040   [\\/]* | ?:[\\/]*)
30041   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30042   ;;
30043   *)
30044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30045 for as_dir in $PATH
30046 do
30047   IFS=$as_save_IFS
30048   test -z "$as_dir" && as_dir=.
30049     for ac_exec_ext in '' $ac_executable_extensions; do
30050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30051     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30053     break 2
30054   fi
30055 done
30056   done
30057 IFS=$as_save_IFS
30058 
30059   ;;
30060 esac
30061 fi
30062 JAVA=$ac_cv_path_JAVA
30063 if test -n "$JAVA"; then
30064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30065 $as_echo "$JAVA" >&6; }
30066 else
30067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30068 $as_echo "no" >&6; }
30069 fi
30070 
30071 
30072           if test "x$JAVA" = x; then
30073             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30074           fi
30075         else
30076           # Otherwise we believe it is a complete path. Use it as it is.
30077           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30078 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30079           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30080 $as_echo_n "checking for JAVA... " >&6; }
30081           if test ! -x "$tool_specified"; then
30082             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30083 $as_echo "not found" >&6; }
30084             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30085           fi
30086           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30087 $as_echo "$tool_specified" >&6; }
30088         fi
30089       fi
30090     fi
30091 
30092   fi
30093 
30094 
30095 
30096   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30097 
30098   # Publish this variable in the help.
30099 
30100 
30101   if [ -z "${JAVAC+x}" ]; then
30102     # The variable is not set by user, try to locate tool using the code snippet
30103 
30104       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30105 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30106       JAVAC=$BOOT_JDK/bin/javac
30107       if test ! -x $JAVAC; then
30108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30109 $as_echo "not found" >&6; }
30110         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30111 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30112         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30113       fi
30114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30115 $as_echo "ok" >&6; }
30116 
30117 
30118   else
30119     # The variable is set, but is it from the command line or the environment?
30120 
30121     # Try to remove the string !JAVAC! from our list.
30122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30124       # If it failed, the variable was not from the command line. Ignore it,
30125       # but warn the user (except for BASH, which is always set by the calling BASH).
30126       if test "xJAVAC" != xBASH; then
30127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30128 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30129       fi
30130       # Try to locate tool using the code snippet
30131 
30132       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30133 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30134       JAVAC=$BOOT_JDK/bin/javac
30135       if test ! -x $JAVAC; then
30136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30137 $as_echo "not found" >&6; }
30138         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30139 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30140         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30141       fi
30142       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30143 $as_echo "ok" >&6; }
30144 
30145 
30146     else
30147       # If it succeeded, then it was overridden by the user. We will use it
30148       # for the tool.
30149 
30150       # First remove it from the list of overridden variables, so we can test
30151       # for unknown variables in the end.
30152       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30153 
30154       # Check if we try to supply an empty value
30155       if test "x$JAVAC" = x; then
30156         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30157 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30159 $as_echo_n "checking for JAVAC... " >&6; }
30160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30161 $as_echo "disabled" >&6; }
30162       else
30163         # Check if the provided tool contains a complete path.
30164         tool_specified="$JAVAC"
30165         tool_basename="${tool_specified##*/}"
30166         if test "x$tool_basename" = "x$tool_specified"; then
30167           # A command without a complete path is provided, search $PATH.
30168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30169 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30170           # Extract the first word of "$tool_basename", so it can be a program name with args.
30171 set dummy $tool_basename; ac_word=$2
30172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30173 $as_echo_n "checking for $ac_word... " >&6; }
30174 if ${ac_cv_path_JAVAC+:} false; then :
30175   $as_echo_n "(cached) " >&6
30176 else
30177   case $JAVAC in
30178   [\\/]* | ?:[\\/]*)
30179   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30180   ;;
30181   *)
30182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30183 for as_dir in $PATH
30184 do
30185   IFS=$as_save_IFS
30186   test -z "$as_dir" && as_dir=.
30187     for ac_exec_ext in '' $ac_executable_extensions; do
30188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30189     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30191     break 2
30192   fi
30193 done
30194   done
30195 IFS=$as_save_IFS
30196 
30197   ;;
30198 esac
30199 fi
30200 JAVAC=$ac_cv_path_JAVAC
30201 if test -n "$JAVAC"; then
30202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30203 $as_echo "$JAVAC" >&6; }
30204 else
30205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30206 $as_echo "no" >&6; }
30207 fi
30208 
30209 
30210           if test "x$JAVAC" = x; then
30211             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30212           fi
30213         else
30214           # Otherwise we believe it is a complete path. Use it as it is.
30215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30216 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30217           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30218 $as_echo_n "checking for JAVAC... " >&6; }
30219           if test ! -x "$tool_specified"; then
30220             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30221 $as_echo "not found" >&6; }
30222             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30223           fi
30224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30225 $as_echo "$tool_specified" >&6; }
30226         fi
30227       fi
30228     fi
30229 
30230   fi
30231 
30232 
30233 
30234   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30235 
30236   # Publish this variable in the help.
30237 
30238 
30239   if [ -z "${JAVAH+x}" ]; then
30240     # The variable is not set by user, try to locate tool using the code snippet
30241 
30242       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30243 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30244       JAVAH=$BOOT_JDK/bin/javah
30245       if test ! -x $JAVAH; then
30246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30247 $as_echo "not found" >&6; }
30248         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30249 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30250         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30251       fi
30252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30253 $as_echo "ok" >&6; }
30254 
30255 
30256   else
30257     # The variable is set, but is it from the command line or the environment?
30258 
30259     # Try to remove the string !JAVAH! from our list.
30260     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30261     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30262       # If it failed, the variable was not from the command line. Ignore it,
30263       # but warn the user (except for BASH, which is always set by the calling BASH).
30264       if test "xJAVAH" != xBASH; then
30265         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30266 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30267       fi
30268       # Try to locate tool using the code snippet
30269 
30270       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30271 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30272       JAVAH=$BOOT_JDK/bin/javah
30273       if test ! -x $JAVAH; then
30274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30275 $as_echo "not found" >&6; }
30276         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30277 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30278         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30279       fi
30280       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30281 $as_echo "ok" >&6; }
30282 
30283 
30284     else
30285       # If it succeeded, then it was overridden by the user. We will use it
30286       # for the tool.
30287 
30288       # First remove it from the list of overridden variables, so we can test
30289       # for unknown variables in the end.
30290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30291 
30292       # Check if we try to supply an empty value
30293       if test "x$JAVAH" = x; then
30294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30295 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30297 $as_echo_n "checking for JAVAH... " >&6; }
30298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30299 $as_echo "disabled" >&6; }
30300       else
30301         # Check if the provided tool contains a complete path.
30302         tool_specified="$JAVAH"
30303         tool_basename="${tool_specified##*/}"
30304         if test "x$tool_basename" = "x$tool_specified"; then
30305           # A command without a complete path is provided, search $PATH.
30306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30307 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30308           # Extract the first word of "$tool_basename", so it can be a program name with args.
30309 set dummy $tool_basename; ac_word=$2
30310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30311 $as_echo_n "checking for $ac_word... " >&6; }
30312 if ${ac_cv_path_JAVAH+:} false; then :
30313   $as_echo_n "(cached) " >&6
30314 else
30315   case $JAVAH in
30316   [\\/]* | ?:[\\/]*)
30317   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30318   ;;
30319   *)
30320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30321 for as_dir in $PATH
30322 do
30323   IFS=$as_save_IFS
30324   test -z "$as_dir" && as_dir=.
30325     for ac_exec_ext in '' $ac_executable_extensions; do
30326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30327     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30329     break 2
30330   fi
30331 done
30332   done
30333 IFS=$as_save_IFS
30334 
30335   ;;
30336 esac
30337 fi
30338 JAVAH=$ac_cv_path_JAVAH
30339 if test -n "$JAVAH"; then
30340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30341 $as_echo "$JAVAH" >&6; }
30342 else
30343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30344 $as_echo "no" >&6; }
30345 fi
30346 
30347 
30348           if test "x$JAVAH" = x; then
30349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30350           fi
30351         else
30352           # Otherwise we believe it is a complete path. Use it as it is.
30353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30354 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30356 $as_echo_n "checking for JAVAH... " >&6; }
30357           if test ! -x "$tool_specified"; then
30358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30359 $as_echo "not found" >&6; }
30360             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30361           fi
30362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30363 $as_echo "$tool_specified" >&6; }
30364         fi
30365       fi
30366     fi
30367 
30368   fi
30369 
30370 
30371 
30372   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30373 
30374   # Publish this variable in the help.
30375 
30376 
30377   if [ -z "${JAR+x}" ]; then
30378     # The variable is not set by user, try to locate tool using the code snippet
30379 
30380       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30381 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30382       JAR=$BOOT_JDK/bin/jar
30383       if test ! -x $JAR; then
30384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30385 $as_echo "not found" >&6; }
30386         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30387 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30388         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30389       fi
30390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30391 $as_echo "ok" >&6; }
30392 
30393 
30394   else
30395     # The variable is set, but is it from the command line or the environment?
30396 
30397     # Try to remove the string !JAR! from our list.
30398     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30399     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30400       # If it failed, the variable was not from the command line. Ignore it,
30401       # but warn the user (except for BASH, which is always set by the calling BASH).
30402       if test "xJAR" != xBASH; then
30403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30404 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30405       fi
30406       # Try to locate tool using the code snippet
30407 
30408       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30409 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30410       JAR=$BOOT_JDK/bin/jar
30411       if test ! -x $JAR; then
30412         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30413 $as_echo "not found" >&6; }
30414         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30415 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30416         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30417       fi
30418       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30419 $as_echo "ok" >&6; }
30420 
30421 
30422     else
30423       # If it succeeded, then it was overridden by the user. We will use it
30424       # for the tool.
30425 
30426       # First remove it from the list of overridden variables, so we can test
30427       # for unknown variables in the end.
30428       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30429 
30430       # Check if we try to supply an empty value
30431       if test "x$JAR" = x; then
30432         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30433 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30435 $as_echo_n "checking for JAR... " >&6; }
30436         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30437 $as_echo "disabled" >&6; }
30438       else
30439         # Check if the provided tool contains a complete path.
30440         tool_specified="$JAR"
30441         tool_basename="${tool_specified##*/}"
30442         if test "x$tool_basename" = "x$tool_specified"; then
30443           # A command without a complete path is provided, search $PATH.
30444           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30445 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30446           # Extract the first word of "$tool_basename", so it can be a program name with args.
30447 set dummy $tool_basename; ac_word=$2
30448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30449 $as_echo_n "checking for $ac_word... " >&6; }
30450 if ${ac_cv_path_JAR+:} false; then :
30451   $as_echo_n "(cached) " >&6
30452 else
30453   case $JAR in
30454   [\\/]* | ?:[\\/]*)
30455   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30456   ;;
30457   *)
30458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30459 for as_dir in $PATH
30460 do
30461   IFS=$as_save_IFS
30462   test -z "$as_dir" && as_dir=.
30463     for ac_exec_ext in '' $ac_executable_extensions; do
30464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30465     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30467     break 2
30468   fi
30469 done
30470   done
30471 IFS=$as_save_IFS
30472 
30473   ;;
30474 esac
30475 fi
30476 JAR=$ac_cv_path_JAR
30477 if test -n "$JAR"; then
30478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30479 $as_echo "$JAR" >&6; }
30480 else
30481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30482 $as_echo "no" >&6; }
30483 fi
30484 
30485 
30486           if test "x$JAR" = x; then
30487             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30488           fi
30489         else
30490           # Otherwise we believe it is a complete path. Use it as it is.
30491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30492 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30493           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30494 $as_echo_n "checking for JAR... " >&6; }
30495           if test ! -x "$tool_specified"; then
30496             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30497 $as_echo "not found" >&6; }
30498             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30499           fi
30500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30501 $as_echo "$tool_specified" >&6; }
30502         fi
30503       fi
30504     fi
30505 
30506   fi
30507 
30508 
30509 
30510   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30511 
30512   # Publish this variable in the help.
30513 
30514 
30515   if [ -z "${JARSIGNER+x}" ]; then
30516     # The variable is not set by user, try to locate tool using the code snippet
30517 
30518       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30519 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30520       JARSIGNER=$BOOT_JDK/bin/jarsigner
30521       if test ! -x $JARSIGNER; then
30522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30523 $as_echo "not found" >&6; }
30524         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30525 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30526         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30527       fi
30528       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30529 $as_echo "ok" >&6; }
30530 
30531 
30532   else
30533     # The variable is set, but is it from the command line or the environment?
30534 
30535     # Try to remove the string !JARSIGNER! from our list.
30536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30538       # If it failed, the variable was not from the command line. Ignore it,
30539       # but warn the user (except for BASH, which is always set by the calling BASH).
30540       if test "xJARSIGNER" != xBASH; then
30541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30542 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30543       fi
30544       # Try to locate tool using the code snippet
30545 
30546       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30547 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30548       JARSIGNER=$BOOT_JDK/bin/jarsigner
30549       if test ! -x $JARSIGNER; then
30550         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30551 $as_echo "not found" >&6; }
30552         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30553 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30554         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30555       fi
30556       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30557 $as_echo "ok" >&6; }
30558 
30559 
30560     else
30561       # If it succeeded, then it was overridden by the user. We will use it
30562       # for the tool.
30563 
30564       # First remove it from the list of overridden variables, so we can test
30565       # for unknown variables in the end.
30566       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30567 
30568       # Check if we try to supply an empty value
30569       if test "x$JARSIGNER" = x; then
30570         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30571 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30572         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30573 $as_echo_n "checking for JARSIGNER... " >&6; }
30574         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30575 $as_echo "disabled" >&6; }
30576       else
30577         # Check if the provided tool contains a complete path.
30578         tool_specified="$JARSIGNER"
30579         tool_basename="${tool_specified##*/}"
30580         if test "x$tool_basename" = "x$tool_specified"; then
30581           # A command without a complete path is provided, search $PATH.
30582           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30583 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30584           # Extract the first word of "$tool_basename", so it can be a program name with args.
30585 set dummy $tool_basename; ac_word=$2
30586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30587 $as_echo_n "checking for $ac_word... " >&6; }
30588 if ${ac_cv_path_JARSIGNER+:} false; then :
30589   $as_echo_n "(cached) " >&6
30590 else
30591   case $JARSIGNER in
30592   [\\/]* | ?:[\\/]*)
30593   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30594   ;;
30595   *)
30596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30597 for as_dir in $PATH
30598 do
30599   IFS=$as_save_IFS
30600   test -z "$as_dir" && as_dir=.
30601     for ac_exec_ext in '' $ac_executable_extensions; do
30602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30603     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30605     break 2
30606   fi
30607 done
30608   done
30609 IFS=$as_save_IFS
30610 
30611   ;;
30612 esac
30613 fi
30614 JARSIGNER=$ac_cv_path_JARSIGNER
30615 if test -n "$JARSIGNER"; then
30616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30617 $as_echo "$JARSIGNER" >&6; }
30618 else
30619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30620 $as_echo "no" >&6; }
30621 fi
30622 
30623 
30624           if test "x$JARSIGNER" = x; then
30625             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30626           fi
30627         else
30628           # Otherwise we believe it is a complete path. Use it as it is.
30629           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30630 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30631           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30632 $as_echo_n "checking for JARSIGNER... " >&6; }
30633           if test ! -x "$tool_specified"; then
30634             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30635 $as_echo "not found" >&6; }
30636             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30637           fi
30638           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30639 $as_echo "$tool_specified" >&6; }
30640         fi
30641       fi
30642     fi
30643 
30644   fi
30645 
30646 
30647 
30648   # Finally, set some other options...
30649 
30650   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30651   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30652 
30653 
30654 
30655   $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30656   $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30657   OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30658   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30659   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30660   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30661     dummy="$dummy --patch-module foo=bar"
30662     JVM_ARG_OK=true
30663   else
30664     $ECHO "Arg failed:" >&5
30665     $ECHO "$OUTPUT" >&5
30666     JVM_ARG_OK=false
30667   fi
30668 
30669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30670 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30671   if test "x$JVM_ARG_OK" = "xtrue"; then
30672     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30673 $as_echo "yes" >&6; }
30674     BOOT_JDK_MODULAR="true"
30675   else
30676     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30677 $as_echo "no" >&6; }
30678     BOOT_JDK_MODULAR="false"
30679   fi
30680 
30681 
30682 
30683 
30684   # Check if the boot jdk is 32 or 64 bit
30685   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30686     BOOT_JDK_BITS="64"
30687   else
30688     BOOT_JDK_BITS="32"
30689   fi
30690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30691 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30693 $as_echo "$BOOT_JDK_BITS" >&6; }
30694 
30695 
30696 
30697 
30698 # Check whether --with-build-jdk was given.
30699 if test "${with_build_jdk+set}" = set; then :
30700   withval=$with_build_jdk;
30701 fi
30702 
30703 
30704   CREATE_BUILDJDK=false
30705   EXTERNAL_BUILDJDK=false
30706   BUILD_JDK_FOUND="no"
30707   if test "x$with_build_jdk" != "x"; then
30708 
30709   if test "x$BUILD_JDK_FOUND" = xno; then
30710     # Execute the test
30711 
30712        if test "x$with_build_jdk" != x; then
30713          BUILD_JDK=$with_build_jdk
30714          BUILD_JDK_FOUND=maybe
30715          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30716 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30717        fi
30718 
30719     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30720     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30721       # Do we have a bin/java?
30722       if test ! -x "$BUILD_JDK/bin/java"; then
30723         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30724 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30725         BUILD_JDK_FOUND=no
30726       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30727         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30728 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30729         BUILD_JDK_FOUND=no
30730       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30731         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30732 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30733         BUILD_JDK_FOUND=no
30734       elif test ! -x "$BUILD_JDK/bin/javac"; then
30735         # Do we have a bin/javac?
30736         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30737 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30738         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30739 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30740         BUILD_JDK_FOUND=no
30741       else
30742         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30743         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30744 
30745         # Extra M4 quote needed to protect [] in grep expression.
30746         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30747         if test "x$FOUND_CORRECT_VERSION" = x; then
30748           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30749 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30750           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30751 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30752           BUILD_JDK_FOUND=no
30753         else
30754           # We're done!
30755           BUILD_JDK_FOUND=yes
30756 
30757   # Only process if variable expands to non-empty
30758 
30759   if test "x$BUILD_JDK" != x; then
30760     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30761 
30762   # Input might be given as Windows format, start by converting to
30763   # unix format.
30764   path="$BUILD_JDK"
30765   new_path=`$CYGPATH -u "$path"`
30766 
30767   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30768   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30769   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30770   # "foo.exe" is OK but "foo" is an error.
30771   #
30772   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30773   # It is also a way to make sure we got the proper file name for the real test later on.
30774   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30775   if test "x$test_shortpath" = x; then
30776     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30777 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30778     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30779   fi
30780 
30781   # Call helper function which possibly converts this using DOS-style short mode.
30782   # If so, the updated path is stored in $new_path.
30783 
30784   input_path="$new_path"
30785   # Check if we need to convert this using DOS-style short mode. If the path
30786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30787   # take no chances and rewrite it.
30788   # Note: m4 eats our [], so we need to use [ and ] instead.
30789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30790   if test "x$has_forbidden_chars" != x; then
30791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30792     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30793     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30794     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30795       # Going to short mode and back again did indeed matter. Since short mode is
30796       # case insensitive, let's make it lowercase to improve readability.
30797       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30798       # Now convert it back to Unix-style (cygpath)
30799       input_path=`$CYGPATH -u "$shortmode_path"`
30800       new_path="$input_path"
30801     fi
30802   fi
30803 
30804   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30805   if test "x$test_cygdrive_prefix" = x; then
30806     # As a simple fix, exclude /usr/bin since it's not a real path.
30807     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30808       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30809       # a path prefixed by /cygdrive for fixpath to work.
30810       new_path="$CYGWIN_ROOT_PATH$input_path"
30811     fi
30812   fi
30813 
30814 
30815   if test "x$path" != "x$new_path"; then
30816     BUILD_JDK="$new_path"
30817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30818 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30819   fi
30820 
30821     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30822 
30823   path="$BUILD_JDK"
30824   has_colon=`$ECHO $path | $GREP ^.:`
30825   new_path="$path"
30826   if test "x$has_colon" = x; then
30827     # Not in mixed or Windows style, start by that.
30828     new_path=`cmd //c echo $path`
30829   fi
30830 
30831 
30832   input_path="$new_path"
30833   # Check if we need to convert this using DOS-style short mode. If the path
30834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30835   # take no chances and rewrite it.
30836   # Note: m4 eats our [], so we need to use [ and ] instead.
30837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30838   if test "x$has_forbidden_chars" != x; then
30839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30840     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30841   fi
30842 
30843 
30844   windows_path="$new_path"
30845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30846     unix_path=`$CYGPATH -u "$windows_path"`
30847     new_path="$unix_path"
30848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30850     new_path="$unix_path"
30851   fi
30852 
30853   if test "x$path" != "x$new_path"; then
30854     BUILD_JDK="$new_path"
30855     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30856 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30857   fi
30858 
30859   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30860   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30861 
30862     else
30863       # We're on a unix platform. Hooray! :)
30864       path="$BUILD_JDK"
30865       has_space=`$ECHO "$path" | $GREP " "`
30866       if test "x$has_space" != x; then
30867         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30868 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30869         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30870       fi
30871 
30872       # Use eval to expand a potential ~
30873       eval path="$path"
30874       if test ! -f "$path" && test ! -d "$path"; then
30875         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30876       fi
30877 
30878       if test -d "$path"; then
30879         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30880       else
30881         dir="`$DIRNAME "$path"`"
30882         base="`$BASENAME "$path"`"
30883         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30884       fi
30885     fi
30886   fi
30887 
30888           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30889 $as_echo_n "checking for Build JDK... " >&6; }
30890           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30891 $as_echo "$BUILD_JDK" >&6; }
30892           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30893 $as_echo_n "checking Build JDK version... " >&6; }
30894           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30896 $as_echo "$BUILD_JDK_VERSION" >&6; }
30897         fi # end check jdk version
30898       fi # end check java
30899     fi # end check build jdk found
30900   fi
30901 
30902     EXTERNAL_BUILDJDK=true
30903   else
30904     if test "x$COMPILE_TYPE" = "xcross"; then
30905       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30906       BUILD_JDK_FOUND=yes
30907       CREATE_BUILDJDK=true
30908       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30909 $as_echo_n "checking for Build JDK... " >&6; }
30910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30911 $as_echo "yes, will build it for the host platform" >&6; }
30912     else
30913       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30914       BUILD_JDK_FOUND=yes
30915       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30916 $as_echo_n "checking for Build JDK... " >&6; }
30917       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30918 $as_echo "yes, will use output dir" >&6; }
30919     fi
30920   fi
30921 
30922   JMOD="$BUILD_JDK/bin/jmod"
30923   JLINK="$BUILD_JDK/bin/jlink"
30924 
30925 
30926 
30927   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30929 $as_echo_n "checking for Build JDK... " >&6; }
30930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30931 $as_echo "no" >&6; }
30932     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30933   fi
30934 
30935 
30936 
30937 
30938 
30939 
30940 ###############################################################################
30941 #
30942 # Configure the sources to use. We can add or override individual directories.
30943 #
30944 ###############################################################################
30945 
30946 
30947   # Where are the sources.
30948   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30949   CORBA_TOPDIR="$SRC_ROOT/corba"
30950   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30951   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30952   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30953   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30954   JDK_TOPDIR="$SRC_ROOT/jdk"
30955 
30956 
30957 
30958 
30959 
30960 
30961 
30962 
30963 
30964   # This feature is no longer supported.
30965 
30966 
30967 
30968 # Check whether --with-add-source-root was given.
30969 if test "${with_add_source_root+set}" = set; then :
30970   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
30971 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30972 fi
30973 
30974 
30975 
30976 
30977 # Check whether --with-override-source-root was given.
30978 if test "${with_override_source_root+set}" = set; then :
30979   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
30980 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30981 fi
30982 
30983 
30984 
30985 
30986 # Check whether --with-adds-and-overrides was given.
30987 if test "${with_adds_and_overrides+set}" = set; then :
30988   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
30989 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30990 fi
30991 
30992 
30993 
30994 
30995 # Check whether --with-override-langtools was given.
30996 if test "${with_override_langtools+set}" = set; then :
30997   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30998 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30999 fi
31000 
31001 
31002 
31003 
31004 # Check whether --with-override-corba was given.
31005 if test "${with_override_corba+set}" = set; then :
31006   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31007 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31008 fi
31009 
31010 
31011 
31012 
31013 # Check whether --with-override-jaxp was given.
31014 if test "${with_override_jaxp+set}" = set; then :
31015   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31016 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31017 fi
31018 
31019 
31020 
31021 
31022 # Check whether --with-override-jaxws was given.
31023 if test "${with_override_jaxws+set}" = set; then :
31024   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31025 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31026 fi
31027 
31028 
31029 
31030 
31031 # Check whether --with-override-hotspot was given.
31032 if test "${with_override_hotspot+set}" = set; then :
31033   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31034 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31035 fi
31036 
31037 
31038 
31039 
31040 # Check whether --with-override-nashorn was given.
31041 if test "${with_override_nashorn+set}" = set; then :
31042   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31043 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31044 fi
31045 
31046 
31047 
31048 
31049 # Check whether --with-override-jdk was given.
31050 if test "${with_override_jdk+set}" = set; then :
31051   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31052 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31053 fi
31054 
31055 
31056 
31057 
31058   BUILD_OUTPUT="$OUTPUT_ROOT"
31059 
31060   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31061 
31062 
31063 
31064 # Check whether --with-import_hotspot was given.
31065 if test "${with_import_hotspot+set}" = set; then :
31066   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31067 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31068 fi
31069 
31070 
31071 
31072 
31073 
31074 
31075 # Check whether --with-import-modules was given.
31076 if test "${with_import_modules+set}" = set; then :
31077   withval=$with_import_modules;
31078 fi
31079 
31080 
31081   if test "x$with_import_modules" != x \
31082       && test "x$with_import_modules" != "xno"; then
31083     if test -d "$with_import_modules"; then
31084       IMPORT_MODULES_TOPDIR="$with_import_modules"
31085 
31086   # Only process if variable expands to non-empty
31087 
31088   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31089     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31090 
31091   # Input might be given as Windows format, start by converting to
31092   # unix format.
31093   path="$IMPORT_MODULES_TOPDIR"
31094   new_path=`$CYGPATH -u "$path"`
31095 
31096   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31097   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31098   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31099   # "foo.exe" is OK but "foo" is an error.
31100   #
31101   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31102   # It is also a way to make sure we got the proper file name for the real test later on.
31103   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31104   if test "x$test_shortpath" = x; then
31105     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31106 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31107     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31108   fi
31109 
31110   # Call helper function which possibly converts this using DOS-style short mode.
31111   # If so, the updated path is stored in $new_path.
31112 
31113   input_path="$new_path"
31114   # Check if we need to convert this using DOS-style short mode. If the path
31115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31116   # take no chances and rewrite it.
31117   # Note: m4 eats our [], so we need to use [ and ] instead.
31118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31119   if test "x$has_forbidden_chars" != x; then
31120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31121     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31122     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31123     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31124       # Going to short mode and back again did indeed matter. Since short mode is
31125       # case insensitive, let's make it lowercase to improve readability.
31126       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31127       # Now convert it back to Unix-style (cygpath)
31128       input_path=`$CYGPATH -u "$shortmode_path"`
31129       new_path="$input_path"
31130     fi
31131   fi
31132 
31133   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31134   if test "x$test_cygdrive_prefix" = x; then
31135     # As a simple fix, exclude /usr/bin since it's not a real path.
31136     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31137       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31138       # a path prefixed by /cygdrive for fixpath to work.
31139       new_path="$CYGWIN_ROOT_PATH$input_path"
31140     fi
31141   fi
31142 
31143 
31144   if test "x$path" != "x$new_path"; then
31145     IMPORT_MODULES_TOPDIR="$new_path"
31146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31147 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31148   fi
31149 
31150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151 
31152   path="$IMPORT_MODULES_TOPDIR"
31153   has_colon=`$ECHO $path | $GREP ^.:`
31154   new_path="$path"
31155   if test "x$has_colon" = x; then
31156     # Not in mixed or Windows style, start by that.
31157     new_path=`cmd //c echo $path`
31158   fi
31159 
31160 
31161   input_path="$new_path"
31162   # Check if we need to convert this using DOS-style short mode. If the path
31163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31164   # take no chances and rewrite it.
31165   # Note: m4 eats our [], so we need to use [ and ] instead.
31166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31167   if test "x$has_forbidden_chars" != x; then
31168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31170   fi
31171 
31172 
31173   windows_path="$new_path"
31174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31175     unix_path=`$CYGPATH -u "$windows_path"`
31176     new_path="$unix_path"
31177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31179     new_path="$unix_path"
31180   fi
31181 
31182   if test "x$path" != "x$new_path"; then
31183     IMPORT_MODULES_TOPDIR="$new_path"
31184     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31185 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31186   fi
31187 
31188   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31189   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31190 
31191     else
31192       # We're on a unix platform. Hooray! :)
31193       path="$IMPORT_MODULES_TOPDIR"
31194       has_space=`$ECHO "$path" | $GREP " "`
31195       if test "x$has_space" != x; then
31196         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31197 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31198         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31199       fi
31200 
31201       # Use eval to expand a potential ~
31202       eval path="$path"
31203       if test ! -f "$path" && test ! -d "$path"; then
31204         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31205       fi
31206 
31207       if test -d "$path"; then
31208         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31209       else
31210         dir="`$DIRNAME "$path"`"
31211         base="`$BASENAME "$path"`"
31212         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31213       fi
31214     fi
31215   fi
31216 
31217     elif test -e "$with_import_modules"; then
31218       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31219       $RM -rf "$IMPORT_MODULES_TOPDIR"
31220       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31221       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31222         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31223       fi
31224     else
31225       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31226     fi
31227   fi
31228 
31229   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31230     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31231   fi
31232   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31233     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31234   fi
31235   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31236     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31237   fi
31238   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31239     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31240   fi
31241   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31242     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31243   fi
31244   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31245     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31246   fi
31247 
31248 
31249 
31250 
31251 
31252 
31253 
31254 
31255 
31256 ###############################################################################
31257 #
31258 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31259 # native code.
31260 #
31261 ###############################################################################
31262 
31263 # See if we are doing a complete static build or not
31264 
31265   # Check whether --enable-static-build was given.
31266 if test "${enable_static_build+set}" = set; then :
31267   enableval=$enable_static_build;
31268 fi
31269 
31270   STATIC_BUILD=false
31271   if test "x$enable_static_build" = "xyes"; then
31272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31273 $as_echo_n "checking if static build is enabled... " >&6; }
31274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31275 $as_echo "yes" >&6; }
31276     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31277       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31278     fi
31279     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31280     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31281     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31282     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31283     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31284     STATIC_BUILD=true
31285   elif test "x$enable_static_build" = "xno"; then
31286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31287 $as_echo_n "checking if static build is enabled... " >&6; }
31288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31289 $as_echo "no" >&6; }
31290   elif test "x$enable_static_build" != "x"; then
31291     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31292   fi
31293 
31294 
31295 
31296 
31297 # First determine the toolchain type (compiler family)
31298 
31299 
31300 # Check whether --with-toolchain-type was given.
31301 if test "${with_toolchain_type+set}" = set; then :
31302   withval=$with_toolchain_type;
31303 fi
31304 
31305 
31306   # Use indirect variable referencing
31307   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31308   VALID_TOOLCHAINS=${!toolchain_var_name}
31309 
31310   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31311     if test -n "$XCODEBUILD"; then
31312       # On Mac OS X, default toolchain to clang after Xcode 5
31313       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31314       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31315       if test $? -ne 0; then
31316         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31317       fi
31318       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31319           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31320           $CUT -f 1 -d .`
31321       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31322 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31323       if test $XCODE_MAJOR_VERSION -ge 5; then
31324           DEFAULT_TOOLCHAIN="clang"
31325       else
31326           DEFAULT_TOOLCHAIN="gcc"
31327       fi
31328     else
31329       # If Xcode is not installed, but the command line tools are
31330       # then we can't run xcodebuild. On these systems we should
31331       # default to clang
31332       DEFAULT_TOOLCHAIN="clang"
31333     fi
31334   else
31335     # First toolchain type in the list is the default
31336     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31337   fi
31338 
31339   if test "x$with_toolchain_type" = xlist; then
31340     # List all toolchains
31341     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31342 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31343     for toolchain in $VALID_TOOLCHAINS; do
31344       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31345       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31346       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31347     done
31348 
31349     exit 0
31350   elif test "x$with_toolchain_type" != x; then
31351     # User override; check that it is valid
31352     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31353       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31354 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31355       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31356 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31357       as_fn_error $? "Cannot continue." "$LINENO" 5
31358     fi
31359     TOOLCHAIN_TYPE=$with_toolchain_type
31360   else
31361     # No flag given, use default
31362     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31363   fi
31364 
31365 
31366   TOOLCHAIN_CC_BINARY_clang="clang"
31367   TOOLCHAIN_CC_BINARY_gcc="gcc"
31368   TOOLCHAIN_CC_BINARY_microsoft="cl"
31369   TOOLCHAIN_CC_BINARY_solstudio="cc"
31370   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31371 
31372   TOOLCHAIN_CXX_BINARY_clang="clang++"
31373   TOOLCHAIN_CXX_BINARY_gcc="g++"
31374   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31375   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31376   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31377 
31378   # Use indirect variable referencing
31379   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31380   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31381   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31382   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31383   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31384   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31385   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31386   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31387 
31388 
31389   # Define filename patterns
31390   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31391     LIBRARY_PREFIX=
31392     SHARED_LIBRARY_SUFFIX='.dll'
31393     STATIC_LIBRARY_SUFFIX='.lib'
31394     SHARED_LIBRARY='$1.dll'
31395     STATIC_LIBRARY='$1.lib'
31396     OBJ_SUFFIX='.obj'
31397     EXE_SUFFIX='.exe'
31398   else
31399     LIBRARY_PREFIX=lib
31400     SHARED_LIBRARY_SUFFIX='.so'
31401     STATIC_LIBRARY_SUFFIX='.a'
31402     SHARED_LIBRARY='lib$1.so'
31403     STATIC_LIBRARY='lib$1.a'
31404     OBJ_SUFFIX='.o'
31405     EXE_SUFFIX=''
31406     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31407       # For full static builds, we're overloading the SHARED_LIBRARY
31408       # variables in order to limit the amount of changes required.
31409       # It would be better to remove SHARED and just use LIBRARY and
31410       # LIBRARY_SUFFIX for libraries that can be built either
31411       # shared or static and use STATIC_* for libraries that are
31412       # always built statically.
31413       if test "x$STATIC_BUILD" = xtrue; then
31414         SHARED_LIBRARY='lib$1.a'
31415         SHARED_LIBRARY_SUFFIX='.a'
31416       else
31417         SHARED_LIBRARY='lib$1.dylib'
31418         SHARED_LIBRARY_SUFFIX='.dylib'
31419       fi
31420     fi
31421   fi
31422 
31423 
31424 
31425 
31426 
31427 
31428 
31429 
31430 
31431 
31432   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31433     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31434 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31435   else
31436     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31437 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31438   fi
31439 
31440 
31441 # User supplied flags should be used when configure detects compilers
31442 
31443   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31444     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31445 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31446   fi
31447 
31448   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31449     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31450 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31451   fi
31452 
31453   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31454     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31455 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31456   fi
31457 
31458 
31459 # Check whether --with-extra-cflags was given.
31460 if test "${with_extra_cflags+set}" = set; then :
31461   withval=$with_extra_cflags;
31462 fi
31463 
31464 
31465 
31466 # Check whether --with-extra-cxxflags was given.
31467 if test "${with_extra_cxxflags+set}" = set; then :
31468   withval=$with_extra_cxxflags;
31469 fi
31470 
31471 
31472 
31473 # Check whether --with-extra-ldflags was given.
31474 if test "${with_extra_ldflags+set}" = set; then :
31475   withval=$with_extra_ldflags;
31476 fi
31477 
31478 
31479   EXTRA_CFLAGS="$with_extra_cflags"
31480   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31481   EXTRA_LDFLAGS="$with_extra_ldflags"
31482 
31483   # Hotspot needs these set in their legacy form
31484   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31485   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31486   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31487 
31488 
31489 
31490 
31491 
31492 
31493 
31494 
31495 
31496   # The global CFLAGS and LDLAGS variables are used by configure tests and
31497   # should include the extra parameters
31498   CFLAGS="$EXTRA_CFLAGS"
31499   CXXFLAGS="$EXTRA_CXXFLAGS"
31500   LDFLAGS="$EXTRA_LDFLAGS"
31501   CPPFLAGS=""
31502 
31503 # The sysroot cflags are needed for configure to be able to run the compilers
31504 
31505   if test "x$SYSROOT" != "x"; then
31506     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31507       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31508         # Solaris Studio does not have a concept of sysroot. Instead we must
31509         # make sure the default include and lib dirs are appended to each
31510         # compile and link command line. Must also add -I-xbuiltin to enable
31511         # inlining of system functions and intrinsics.
31512         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31513         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31514             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31515       fi
31516     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31517       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31518       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31519     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31520       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31521       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31522     fi
31523     # Propagate the sysroot args to hotspot
31524     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31525     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31526     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31527     # The global CFLAGS and LDFLAGS variables need these for configure to function
31528     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31529     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31530     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31531     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31532   fi
31533 
31534   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31535     # We also need -iframework<path>/System/Library/Frameworks
31536     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31537     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31538     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31539     # set this here so it doesn't have to be peppered throughout the forest
31540     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31541     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31542   fi
31543 
31544 
31545 
31546 
31547 
31548 # Then detect the actual binaries needed
31549 
31550   # FIXME: Is this needed?
31551   ac_ext=cpp
31552 ac_cpp='$CXXCPP $CPPFLAGS'
31553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31556 
31557 
31558   # Store the CFLAGS etc passed to the configure script.
31559   ORG_CFLAGS="$CFLAGS"
31560   ORG_CXXFLAGS="$CXXFLAGS"
31561 
31562   # autoconf magic only relies on PATH, so update it if tools dir is specified
31563   OLD_PATH="$PATH"
31564 
31565   # On Windows, we need to detect the visual studio installation first.
31566   # This will change the PATH, but we need to keep that new PATH even
31567   # after toolchain detection is done, since the compiler (on x86) uses
31568   # it for DLL resolution in runtime.
31569   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31570       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31571 
31572   # Store path to cygwin link.exe to help excluding it when searching for
31573   # VS linker. This must be done before changing the PATH when looking for VS.
31574   # Extract the first word of "link", so it can be a program name with args.
31575 set dummy link; ac_word=$2
31576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31577 $as_echo_n "checking for $ac_word... " >&6; }
31578 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31579   $as_echo_n "(cached) " >&6
31580 else
31581   case $CYGWIN_LINK in
31582   [\\/]* | ?:[\\/]*)
31583   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31584   ;;
31585   *)
31586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31587 for as_dir in $PATH
31588 do
31589   IFS=$as_save_IFS
31590   test -z "$as_dir" && as_dir=.
31591     for ac_exec_ext in '' $ac_executable_extensions; do
31592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31593     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31595     break 2
31596   fi
31597 done
31598   done
31599 IFS=$as_save_IFS
31600 
31601   ;;
31602 esac
31603 fi
31604 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31605 if test -n "$CYGWIN_LINK"; then
31606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31607 $as_echo "$CYGWIN_LINK" >&6; }
31608 else
31609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31610 $as_echo "no" >&6; }
31611 fi
31612 
31613 
31614   if test "x$CYGWIN_LINK" != x; then
31615     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31616 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31617     "$CYGWIN_LINK" --version > /dev/null
31618     if test $? -eq 0 ; then
31619       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31620 $as_echo "yes" >&6; }
31621     else
31622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31623 $as_echo "no" >&6; }
31624       # This might be the VS linker. Don't exclude it later on.
31625       CYGWIN_LINK=""
31626     fi
31627   fi
31628 
31629   # First-hand choice is to locate and run the vsvars bat file.
31630 
31631 
31632 # Check whether --with-toolchain-version was given.
31633 if test "${with_toolchain_version+set}" = set; then :
31634   withval=$with_toolchain_version;
31635 fi
31636 
31637 
31638   if test "x$with_toolchain_version" = xlist; then
31639     # List all toolchains
31640     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31641 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31642     for version in $VALID_VS_VERSIONS; do
31643       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31644       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31645     done
31646 
31647     exit 0
31648   elif test "x$DEVKIT_VS_VERSION" != x; then
31649     VS_VERSION=$DEVKIT_VS_VERSION
31650     TOOLCHAIN_VERSION=$VS_VERSION
31651     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31652     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31653     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31654     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31655     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31656     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31657 
31658     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31659     # can still be exported as INCLUDE for compiler invocations without
31660     # SYSROOT_CFLAGS
31661     OLDIFS="$IFS"
31662     IFS=";"
31663     for i in $DEVKIT_VS_INCLUDE; do
31664       ipath=$i
31665 
31666   unix_path="$ipath"
31667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31668     windows_path=`$CYGPATH -m "$unix_path"`
31669     ipath="$windows_path"
31670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31671     windows_path=`cmd //c echo $unix_path`
31672     ipath="$windows_path"
31673   fi
31674 
31675       VS_INCLUDE="$VS_INCLUDE;$ipath"
31676     done
31677     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31678     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31679     for i in $DEVKIT_VS_LIB; do
31680       libpath=$i
31681 
31682   unix_path="$libpath"
31683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31684     windows_path=`$CYGPATH -m "$unix_path"`
31685     libpath="$windows_path"
31686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687     windows_path=`cmd //c echo $unix_path`
31688     libpath="$windows_path"
31689   fi
31690 
31691       VS_LIB="$VS_LIB;$libpath"
31692     done
31693     IFS="$OLDIFS"
31694 
31695     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31696 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31697 
31698   elif test "x$with_toolchain_version" != x; then
31699     # User override; check that it is valid
31700     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31701       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31702 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31703       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31704 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31705       as_fn_error $? "Cannot continue." "$LINENO" 5
31706     fi
31707     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31708   else
31709     # No flag given, use default
31710     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31711   fi
31712 
31713   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31714 
31715   VS_VERSION="$VS_VERSION"
31716   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31717   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31718   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31719   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31720 
31721   # When using --with-tools-dir, assume it points to the correct and default
31722   # version of Visual Studio or that --with-toolchain-version was also set.
31723   if test "x$with_tools_dir" != x; then
31724 
31725   if test "x$VS_ENV_CMD" = x; then
31726     VS_VERSION="${VS_VERSION}"
31727     VS_BASE="$with_tools_dir/../.."
31728     METHOD="--with-tools-dir"
31729 
31730     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31731       VCVARSFILE="vc/bin/vcvars32.bat"
31732     else
31733       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31734     fi
31735 
31736 
31737   windows_path="$VS_BASE"
31738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739     unix_path=`$CYGPATH -u "$windows_path"`
31740     VS_BASE="$unix_path"
31741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743     VS_BASE="$unix_path"
31744   fi
31745 
31746     if test -d "$VS_BASE"; then
31747       if test -f "$VS_BASE/$VCVARSFILE"; then
31748         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31751         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31752         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31753         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31754       else
31755         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31758 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31759       fi
31760     fi
31761   fi
31762 
31763 
31764   if test "x$VS_ENV_CMD" = x; then
31765     VS_VERSION="${VS_VERSION}"
31766     VS_BASE="$with_tools_dir/../../.."
31767     METHOD="--with-tools-dir"
31768 
31769     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31770       VCVARSFILE="vc/bin/vcvars32.bat"
31771     else
31772       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31773     fi
31774 
31775 
31776   windows_path="$VS_BASE"
31777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31778     unix_path=`$CYGPATH -u "$windows_path"`
31779     VS_BASE="$unix_path"
31780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31782     VS_BASE="$unix_path"
31783   fi
31784 
31785     if test -d "$VS_BASE"; then
31786       if test -f "$VS_BASE/$VCVARSFILE"; then
31787         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31788 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31789         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31790         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31791         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31792         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31793       else
31794         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31795 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31796         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31797 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31798       fi
31799     fi
31800   fi
31801 
31802     if test "x$VS_ENV_CMD" = x; then
31803       # Having specified an argument which is incorrect will produce an instant failure;
31804       # we should not go on looking
31805       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31806 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31807       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31808 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31809       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31810 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31811       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31812     fi
31813   fi
31814 
31815   VS_ENV_CMD=""
31816   VS_ENV_ARGS=""
31817 
31818   if test "x$VS_COMNTOOLS" != x; then
31819 
31820   if test "x$VS_ENV_CMD" = x; then
31821     VS_VERSION="${VS_VERSION}"
31822     VS_BASE="$VS_COMNTOOLS/../.."
31823     METHOD="$VS_COMNTOOLS_VAR variable"
31824 
31825     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31826       VCVARSFILE="vc/bin/vcvars32.bat"
31827     else
31828       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31829     fi
31830 
31831 
31832   windows_path="$VS_BASE"
31833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31834     unix_path=`$CYGPATH -u "$windows_path"`
31835     VS_BASE="$unix_path"
31836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31838     VS_BASE="$unix_path"
31839   fi
31840 
31841     if test -d "$VS_BASE"; then
31842       if test -f "$VS_BASE/$VCVARSFILE"; then
31843         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31844 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31845         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31846         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31847         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31848         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31849       else
31850         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31851 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31852         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31853 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31854       fi
31855     fi
31856   fi
31857 
31858   fi
31859   if test "x$PROGRAMFILES" != x; then
31860 
31861   if test "x$VS_ENV_CMD" = x; then
31862     VS_VERSION="${VS_VERSION}"
31863     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31864     METHOD="well-known name"
31865 
31866     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31867       VCVARSFILE="vc/bin/vcvars32.bat"
31868     else
31869       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31870     fi
31871 
31872 
31873   windows_path="$VS_BASE"
31874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31875     unix_path=`$CYGPATH -u "$windows_path"`
31876     VS_BASE="$unix_path"
31877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31879     VS_BASE="$unix_path"
31880   fi
31881 
31882     if test -d "$VS_BASE"; then
31883       if test -f "$VS_BASE/$VCVARSFILE"; then
31884         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31885 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31886         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31887         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31888         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31889         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31890       else
31891         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31892 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31893         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31894 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31895       fi
31896     fi
31897   fi
31898 
31899   fi
31900   # Work around the insanely named ProgramFiles(x86) env variable
31901   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31902   if test "x$PROGRAMFILES_X86" != x; then
31903 
31904   if test "x$VS_ENV_CMD" = x; then
31905     VS_VERSION="${VS_VERSION}"
31906     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31907     METHOD="well-known name"
31908 
31909     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31910       VCVARSFILE="vc/bin/vcvars32.bat"
31911     else
31912       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31913     fi
31914 
31915 
31916   windows_path="$VS_BASE"
31917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31918     unix_path=`$CYGPATH -u "$windows_path"`
31919     VS_BASE="$unix_path"
31920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31922     VS_BASE="$unix_path"
31923   fi
31924 
31925     if test -d "$VS_BASE"; then
31926       if test -f "$VS_BASE/$VCVARSFILE"; then
31927         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31928 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31929         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31930         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31931         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31932         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31933       else
31934         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31935 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31936         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31937 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31938       fi
31939     fi
31940   fi
31941 
31942   fi
31943 
31944   if test "x$VS_ENV_CMD" = x; then
31945     VS_VERSION="${VS_VERSION}"
31946     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31947     METHOD="well-known name"
31948 
31949     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31950       VCVARSFILE="vc/bin/vcvars32.bat"
31951     else
31952       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31953     fi
31954 
31955 
31956   windows_path="$VS_BASE"
31957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958     unix_path=`$CYGPATH -u "$windows_path"`
31959     VS_BASE="$unix_path"
31960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962     VS_BASE="$unix_path"
31963   fi
31964 
31965     if test -d "$VS_BASE"; then
31966       if test -f "$VS_BASE/$VCVARSFILE"; then
31967         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31970         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31971         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31972         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31973       else
31974         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31975 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31976         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31977 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31978       fi
31979     fi
31980   fi
31981 
31982 
31983   if test "x$VS_ENV_CMD" = x; then
31984     VS_VERSION="${VS_VERSION}"
31985     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31986     METHOD="well-known name"
31987 
31988     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31989       VCVARSFILE="vc/bin/vcvars32.bat"
31990     else
31991       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31992     fi
31993 
31994 
31995   windows_path="$VS_BASE"
31996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31997     unix_path=`$CYGPATH -u "$windows_path"`
31998     VS_BASE="$unix_path"
31999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32001     VS_BASE="$unix_path"
32002   fi
32003 
32004     if test -d "$VS_BASE"; then
32005       if test -f "$VS_BASE/$VCVARSFILE"; then
32006         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32007 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32008         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32009         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32010         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32011         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32012       else
32013         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32014 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32015         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32016 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32017       fi
32018     fi
32019   fi
32020 
32021 
32022   if test "x$SDK_INSTALL_DIR" != x; then
32023     if test "x$ProgramW6432" != x; then
32024 
32025   if test "x$VS_ENV_CMD" = x; then
32026     VS_VERSION="${VS_VERSION}"
32027     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32028     METHOD="well-known name"
32029 
32030   windows_path="$WIN_SDK_BASE"
32031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32032     unix_path=`$CYGPATH -u "$windows_path"`
32033     WIN_SDK_BASE="$unix_path"
32034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32036     WIN_SDK_BASE="$unix_path"
32037   fi
32038 
32039     if test -d "$WIN_SDK_BASE"; then
32040       # There have been cases of partial or broken SDK installations. A missing
32041       # lib dir is not going to work.
32042       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32046 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32047       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32048         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32049 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32050         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32051         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32052           VS_ENV_ARGS="/x86"
32053         else
32054           VS_ENV_ARGS="/x64"
32055         fi
32056         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32057         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32058         # TODO: improve detection for other versions of SDK
32059         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32060       else
32061         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32062 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32063         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32064 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32065       fi
32066     fi
32067   fi
32068 
32069     fi
32070     if test "x$PROGRAMW6432" != x; then
32071 
32072   if test "x$VS_ENV_CMD" = x; then
32073     VS_VERSION="${VS_VERSION}"
32074     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32075     METHOD="well-known name"
32076 
32077   windows_path="$WIN_SDK_BASE"
32078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32079     unix_path=`$CYGPATH -u "$windows_path"`
32080     WIN_SDK_BASE="$unix_path"
32081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32083     WIN_SDK_BASE="$unix_path"
32084   fi
32085 
32086     if test -d "$WIN_SDK_BASE"; then
32087       # There have been cases of partial or broken SDK installations. A missing
32088       # lib dir is not going to work.
32089       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32093 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32094       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32095         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32096 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32097         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32098         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32099           VS_ENV_ARGS="/x86"
32100         else
32101           VS_ENV_ARGS="/x64"
32102         fi
32103         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32104         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32105         # TODO: improve detection for other versions of SDK
32106         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32107       else
32108         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32109 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32110         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32111 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32112       fi
32113     fi
32114   fi
32115 
32116     fi
32117     if test "x$PROGRAMFILES" != x; then
32118 
32119   if test "x$VS_ENV_CMD" = x; then
32120     VS_VERSION="${VS_VERSION}"
32121     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32122     METHOD="well-known name"
32123 
32124   windows_path="$WIN_SDK_BASE"
32125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126     unix_path=`$CYGPATH -u "$windows_path"`
32127     WIN_SDK_BASE="$unix_path"
32128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32130     WIN_SDK_BASE="$unix_path"
32131   fi
32132 
32133     if test -d "$WIN_SDK_BASE"; then
32134       # There have been cases of partial or broken SDK installations. A missing
32135       # lib dir is not going to work.
32136       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32140 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32141       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32142         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32143 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32144         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32145         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32146           VS_ENV_ARGS="/x86"
32147         else
32148           VS_ENV_ARGS="/x64"
32149         fi
32150         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32151         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32152         # TODO: improve detection for other versions of SDK
32153         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32154       else
32155         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32158 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32159       fi
32160     fi
32161   fi
32162 
32163     fi
32164 
32165   if test "x$VS_ENV_CMD" = x; then
32166     VS_VERSION="${VS_VERSION}"
32167     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32168     METHOD="well-known name"
32169 
32170   windows_path="$WIN_SDK_BASE"
32171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32172     unix_path=`$CYGPATH -u "$windows_path"`
32173     WIN_SDK_BASE="$unix_path"
32174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32176     WIN_SDK_BASE="$unix_path"
32177   fi
32178 
32179     if test -d "$WIN_SDK_BASE"; then
32180       # There have been cases of partial or broken SDK installations. A missing
32181       # lib dir is not going to work.
32182       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32186 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32187       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32188         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32191         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32192           VS_ENV_ARGS="/x86"
32193         else
32194           VS_ENV_ARGS="/x64"
32195         fi
32196         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32197         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32198         # TODO: improve detection for other versions of SDK
32199         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32200       else
32201         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32203         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32204 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32205       fi
32206     fi
32207   fi
32208 
32209 
32210   if test "x$VS_ENV_CMD" = x; then
32211     VS_VERSION="${VS_VERSION}"
32212     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32213     METHOD="well-known name"
32214 
32215   windows_path="$WIN_SDK_BASE"
32216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32217     unix_path=`$CYGPATH -u "$windows_path"`
32218     WIN_SDK_BASE="$unix_path"
32219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32221     WIN_SDK_BASE="$unix_path"
32222   fi
32223 
32224     if test -d "$WIN_SDK_BASE"; then
32225       # There have been cases of partial or broken SDK installations. A missing
32226       # lib dir is not going to work.
32227       if test ! -d "$WIN_SDK_BASE/lib"; 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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32231 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32232       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32233         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32234 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32235         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32236         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32237           VS_ENV_ARGS="/x86"
32238         else
32239           VS_ENV_ARGS="/x64"
32240         fi
32241         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32242         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32243         # TODO: improve detection for other versions of SDK
32244         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32245       else
32246         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32247 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32248         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32249 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32250       fi
32251     fi
32252   fi
32253 
32254   fi
32255 
32256     if test "x$VS_ENV_CMD" != x; then
32257       TOOLCHAIN_VERSION=$VS_VERSION
32258       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32259       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32260       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32261       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32262       # The rest of the variables are already evaled while probing
32263       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32264 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32265       break
32266     fi
32267   done
32268 
32269 
32270   # If we have a devkit, skip all of the below.
32271   if test "x$DEVKIT_VS_VERSION" = x; then
32272     if test "x$VS_ENV_CMD" != x; then
32273       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32274 
32275   # Only process if variable expands to non-empty
32276 
32277   if test "x$VS_ENV_CMD" != x; then
32278     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32279 
32280   # First separate the path from the arguments. This will split at the first
32281   # space.
32282   complete="$VS_ENV_CMD"
32283   path="${complete%% *}"
32284   tmp="$complete EOL"
32285   arguments="${tmp#* }"
32286 
32287   # Input might be given as Windows format, start by converting to
32288   # unix format.
32289   new_path=`$CYGPATH -u "$path"`
32290 
32291   # Now try to locate executable using which
32292   new_path=`$WHICH "$new_path" 2> /dev/null`
32293   # bat and cmd files are not always considered executable in cygwin causing which
32294   # to not find them
32295   if test "x$new_path" = x \
32296       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32297       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32298     new_path=`$CYGPATH -u "$path"`
32299   fi
32300   if test "x$new_path" = x; then
32301     # Oops. Which didn't find the executable.
32302     # The splitting of arguments from the executable at a space might have been incorrect,
32303     # since paths with space are more likely in Windows. Give it another try with the whole
32304     # argument.
32305     path="$complete"
32306     arguments="EOL"
32307     new_path=`$CYGPATH -u "$path"`
32308     new_path=`$WHICH "$new_path" 2> /dev/null`
32309     # bat and cmd files are not always considered executable in cygwin causing which
32310     # to not find them
32311     if test "x$new_path" = x \
32312         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32313         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32314       new_path=`$CYGPATH -u "$path"`
32315     fi
32316     if test "x$new_path" = x; then
32317       # It's still not found. Now this is an unrecoverable error.
32318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32319 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32320       has_space=`$ECHO "$complete" | $GREP " "`
32321       if test "x$has_space" != x; then
32322         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32323 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32324       fi
32325       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32326     fi
32327   fi
32328 
32329   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32330   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32331   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32332   # "foo.exe" is OK but "foo" is an error.
32333   #
32334   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32335   # It is also a way to make sure we got the proper file name for the real test later on.
32336   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32337   if test "x$test_shortpath" = x; then
32338     # Short path failed, file does not exist as specified.
32339     # Try adding .exe or .cmd
32340     if test -f "${new_path}.exe"; then
32341       input_to_shortpath="${new_path}.exe"
32342     elif test -f "${new_path}.cmd"; then
32343       input_to_shortpath="${new_path}.cmd"
32344     else
32345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32346 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32347       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32348 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32349       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32350     fi
32351   else
32352     input_to_shortpath="$new_path"
32353   fi
32354 
32355   # Call helper function which possibly converts this using DOS-style short mode.
32356   # If so, the updated path is stored in $new_path.
32357   new_path="$input_to_shortpath"
32358 
32359   input_path="$input_to_shortpath"
32360   # Check if we need to convert this using DOS-style short mode. If the path
32361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32362   # take no chances and rewrite it.
32363   # Note: m4 eats our [], so we need to use [ and ] instead.
32364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32365   if test "x$has_forbidden_chars" != x; then
32366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32370       # Going to short mode and back again did indeed matter. Since short mode is
32371       # case insensitive, let's make it lowercase to improve readability.
32372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32373       # Now convert it back to Unix-style (cygpath)
32374       input_path=`$CYGPATH -u "$shortmode_path"`
32375       new_path="$input_path"
32376     fi
32377   fi
32378 
32379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32380   if test "x$test_cygdrive_prefix" = x; then
32381     # As a simple fix, exclude /usr/bin since it's not a real path.
32382     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32384       # a path prefixed by /cygdrive for fixpath to work.
32385       new_path="$CYGWIN_ROOT_PATH$input_path"
32386     fi
32387   fi
32388 
32389   # remove trailing .exe if any
32390   new_path="${new_path/%.exe/}"
32391 
32392     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393 
32394   # First separate the path from the arguments. This will split at the first
32395   # space.
32396   complete="$VS_ENV_CMD"
32397   path="${complete%% *}"
32398   tmp="$complete EOL"
32399   arguments="${tmp#* }"
32400 
32401   # Input might be given as Windows format, start by converting to
32402   # unix format.
32403   new_path="$path"
32404 
32405   windows_path="$new_path"
32406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407     unix_path=`$CYGPATH -u "$windows_path"`
32408     new_path="$unix_path"
32409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411     new_path="$unix_path"
32412   fi
32413 
32414 
32415   # Now try to locate executable using which
32416   new_path=`$WHICH "$new_path" 2> /dev/null`
32417 
32418   if test "x$new_path" = x; then
32419     # Oops. Which didn't find the executable.
32420     # The splitting of arguments from the executable at a space might have been incorrect,
32421     # since paths with space are more likely in Windows. Give it another try with the whole
32422     # argument.
32423     path="$complete"
32424     arguments="EOL"
32425     new_path="$path"
32426 
32427   windows_path="$new_path"
32428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32429     unix_path=`$CYGPATH -u "$windows_path"`
32430     new_path="$unix_path"
32431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32433     new_path="$unix_path"
32434   fi
32435 
32436 
32437     new_path=`$WHICH "$new_path" 2> /dev/null`
32438     # bat and cmd files are not always considered executable in MSYS causing which
32439     # to not find them
32440     if test "x$new_path" = x \
32441         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32442         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32443       new_path="$path"
32444 
32445   windows_path="$new_path"
32446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32447     unix_path=`$CYGPATH -u "$windows_path"`
32448     new_path="$unix_path"
32449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32451     new_path="$unix_path"
32452   fi
32453 
32454     fi
32455 
32456     if test "x$new_path" = x; then
32457       # It's still not found. Now this is an unrecoverable error.
32458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32459 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32460       has_space=`$ECHO "$complete" | $GREP " "`
32461       if test "x$has_space" != x; then
32462         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32463 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32464       fi
32465       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32466     fi
32467   fi
32468 
32469   # Now new_path has a complete unix path to the binary
32470   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32471     # Keep paths in /bin as-is, but remove trailing .exe if any
32472     new_path="${new_path/%.exe/}"
32473     # Do not save /bin paths to all_fixpath_prefixes!
32474   else
32475     # Not in mixed or Windows style, start by that.
32476     new_path=`cmd //c echo $new_path`
32477 
32478   input_path="$new_path"
32479   # Check if we need to convert this using DOS-style short mode. If the path
32480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32481   # take no chances and rewrite it.
32482   # Note: m4 eats our [], so we need to use [ and ] instead.
32483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32484   if test "x$has_forbidden_chars" != x; then
32485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32487   fi
32488 
32489     # Output is in $new_path
32490 
32491   windows_path="$new_path"
32492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32493     unix_path=`$CYGPATH -u "$windows_path"`
32494     new_path="$unix_path"
32495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32497     new_path="$unix_path"
32498   fi
32499 
32500     # remove trailing .exe if any
32501     new_path="${new_path/%.exe/}"
32502 
32503     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32504     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32505   fi
32506 
32507     else
32508       # We're on a unix platform. Hooray! :)
32509       # First separate the path from the arguments. This will split at the first
32510       # space.
32511       complete="$VS_ENV_CMD"
32512       path="${complete%% *}"
32513       tmp="$complete EOL"
32514       arguments="${tmp#* }"
32515 
32516       # Cannot rely on the command "which" here since it doesn't always work.
32517       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32518       if test -z "$is_absolute_path"; then
32519         # Path to executable is not absolute. Find it.
32520         IFS_save="$IFS"
32521         IFS=:
32522         for p in $PATH; do
32523           if test -f "$p/$path" && test -x "$p/$path"; then
32524             new_path="$p/$path"
32525             break
32526           fi
32527         done
32528         IFS="$IFS_save"
32529       else
32530         # This is an absolute path, we can use it without further modifications.
32531         new_path="$path"
32532       fi
32533 
32534       if test "x$new_path" = x; then
32535         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32536 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32537         has_space=`$ECHO "$complete" | $GREP " "`
32538         if test "x$has_space" != x; then
32539           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32540 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32541         fi
32542         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32543       fi
32544     fi
32545 
32546     # Now join together the path and the arguments once again
32547     if test "x$arguments" != xEOL; then
32548       new_complete="$new_path ${arguments% *}"
32549     else
32550       new_complete="$new_path"
32551     fi
32552 
32553     if test "x$complete" != "x$new_complete"; then
32554       VS_ENV_CMD="$new_complete"
32555       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32556 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32557     fi
32558   fi
32559 
32560 
32561       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32562       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32563 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32564 
32565       # We need to create a couple of temporary files.
32566       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32567       $MKDIR -p $VS_ENV_TMP_DIR
32568 
32569       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32570       # Instead create a shell script which will set the relevant variables when run.
32571       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32572 
32573   unix_path="$WINPATH_VS_ENV_CMD"
32574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32575     windows_path=`$CYGPATH -m "$unix_path"`
32576     WINPATH_VS_ENV_CMD="$windows_path"
32577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32578     windows_path=`cmd //c echo $unix_path`
32579     WINPATH_VS_ENV_CMD="$windows_path"
32580   fi
32581 
32582       WINPATH_BASH="$BASH"
32583 
32584   unix_path="$WINPATH_BASH"
32585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32586     windows_path=`$CYGPATH -m "$unix_path"`
32587     WINPATH_BASH="$windows_path"
32588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32589     windows_path=`cmd //c echo $unix_path`
32590     WINPATH_BASH="$windows_path"
32591   fi
32592 
32593 
32594       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32595       # script (executable by bash) that will setup the important variables.
32596       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32597       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32598       # This will end up something like:
32599       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32600       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32601       # These will end up something like:
32602       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32603       # The trailing space for everyone except PATH is no typo, but is needed due
32604       # to trailing \ in the Windows paths. These will be stripped later.
32605       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32606           >> $EXTRACT_VC_ENV_BAT_FILE
32607       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32608           >> $EXTRACT_VC_ENV_BAT_FILE
32609       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32610           >> $EXTRACT_VC_ENV_BAT_FILE
32611       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32612           >> $EXTRACT_VC_ENV_BAT_FILE
32613       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32614           >> $EXTRACT_VC_ENV_BAT_FILE
32615       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32616           >> $EXTRACT_VC_ENV_BAT_FILE
32617 
32618       # Now execute the newly created bat file.
32619       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32620       # Change directory so we don't need to mess with Windows paths in redirects.
32621       cd $VS_ENV_TMP_DIR
32622       cmd /c extract-vs-env.bat | $CAT
32623       cd $CURDIR
32624 
32625       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32626         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32627 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32628         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32629 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32630         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32631 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32632         as_fn_error $? "Cannot continue" "$LINENO" 5
32633       fi
32634 
32635       # Now set all paths and other env variables. This will allow the rest of
32636       # the configure script to find and run the compiler in the proper way.
32637       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32638 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32639       . $VS_ENV_TMP_DIR/set-vs-env.sh
32640       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32641       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32642     else
32643       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32644       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32645 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32646     fi
32647   fi
32648 
32649   # At this point, we should have correct variables in the environment, or we can't continue.
32650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32651 $as_echo_n "checking for Visual Studio variables... " >&6; }
32652 
32653   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32654       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32655     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32657 $as_echo "present but broken" >&6; }
32658       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32659     else
32660       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32661 $as_echo "ok" >&6; }
32662       # Remove any trailing "\" ";" and " " from the variables.
32663       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32664       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32665       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32666       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32667       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32668       # Remove any paths containing # (typically F#) as that messes up make. This
32669       # is needed if visual studio was installed with F# support.
32670       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32671 
32672 
32673 
32674 
32675 
32676       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32677       OLDIFS="$IFS"
32678       IFS=";"
32679       for i in $VS_INCLUDE; do
32680         ipath=$i
32681         # Only process non-empty elements
32682         if test "x$ipath" != x; then
32683           IFS="$OLDIFS"
32684           # Check that directory exists before calling fixup_path
32685           testpath=$ipath
32686 
32687   windows_path="$testpath"
32688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32689     unix_path=`$CYGPATH -u "$windows_path"`
32690     testpath="$unix_path"
32691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32693     testpath="$unix_path"
32694   fi
32695 
32696           if test -d "$testpath"; then
32697 
32698   # Only process if variable expands to non-empty
32699 
32700   if test "x$ipath" != x; then
32701     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32702 
32703   # Input might be given as Windows format, start by converting to
32704   # unix format.
32705   path="$ipath"
32706   new_path=`$CYGPATH -u "$path"`
32707 
32708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32711   # "foo.exe" is OK but "foo" is an error.
32712   #
32713   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32714   # It is also a way to make sure we got the proper file name for the real test later on.
32715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32716   if test "x$test_shortpath" = x; then
32717     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32718 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32719     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32720   fi
32721 
32722   # Call helper function which possibly converts this using DOS-style short mode.
32723   # If so, the updated path is stored in $new_path.
32724 
32725   input_path="$new_path"
32726   # Check if we need to convert this using DOS-style short mode. If the path
32727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32728   # take no chances and rewrite it.
32729   # Note: m4 eats our [], so we need to use [ and ] instead.
32730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32731   if test "x$has_forbidden_chars" != x; then
32732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32733     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32734     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32735     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32736       # Going to short mode and back again did indeed matter. Since short mode is
32737       # case insensitive, let's make it lowercase to improve readability.
32738       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32739       # Now convert it back to Unix-style (cygpath)
32740       input_path=`$CYGPATH -u "$shortmode_path"`
32741       new_path="$input_path"
32742     fi
32743   fi
32744 
32745   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32746   if test "x$test_cygdrive_prefix" = x; then
32747     # As a simple fix, exclude /usr/bin since it's not a real path.
32748     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32749       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32750       # a path prefixed by /cygdrive for fixpath to work.
32751       new_path="$CYGWIN_ROOT_PATH$input_path"
32752     fi
32753   fi
32754 
32755 
32756   if test "x$path" != "x$new_path"; then
32757     ipath="$new_path"
32758     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32759 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32760   fi
32761 
32762     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32763 
32764   path="$ipath"
32765   has_colon=`$ECHO $path | $GREP ^.:`
32766   new_path="$path"
32767   if test "x$has_colon" = x; then
32768     # Not in mixed or Windows style, start by that.
32769     new_path=`cmd //c echo $path`
32770   fi
32771 
32772 
32773   input_path="$new_path"
32774   # Check if we need to convert this using DOS-style short mode. If the path
32775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32776   # take no chances and rewrite it.
32777   # Note: m4 eats our [], so we need to use [ and ] instead.
32778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32779   if test "x$has_forbidden_chars" != x; then
32780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32781     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32782   fi
32783 
32784 
32785   windows_path="$new_path"
32786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32787     unix_path=`$CYGPATH -u "$windows_path"`
32788     new_path="$unix_path"
32789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32791     new_path="$unix_path"
32792   fi
32793 
32794   if test "x$path" != "x$new_path"; then
32795     ipath="$new_path"
32796     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32797 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32798   fi
32799 
32800   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32801   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32802 
32803     else
32804       # We're on a unix platform. Hooray! :)
32805       path="$ipath"
32806       has_space=`$ECHO "$path" | $GREP " "`
32807       if test "x$has_space" != x; then
32808         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32809 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32810         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32811       fi
32812 
32813       # Use eval to expand a potential ~
32814       eval path="$path"
32815       if test ! -f "$path" && test ! -d "$path"; then
32816         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32817       fi
32818 
32819       if test -d "$path"; then
32820         ipath="`cd "$path"; $THEPWDCMD -L`"
32821       else
32822         dir="`$DIRNAME "$path"`"
32823         base="`$BASENAME "$path"`"
32824         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32825       fi
32826     fi
32827   fi
32828 
32829             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32830           fi
32831           IFS=";"
32832         fi
32833       done
32834       # Convert VS_LIB into SYSROOT_LDFLAGS
32835       for i in $VS_LIB; do
32836         libpath=$i
32837         # Only process non-empty elements
32838         if test "x$libpath" != x; then
32839           IFS="$OLDIFS"
32840           # Check that directory exists before calling fixup_path
32841           testpath=$libpath
32842 
32843   windows_path="$testpath"
32844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32845     unix_path=`$CYGPATH -u "$windows_path"`
32846     testpath="$unix_path"
32847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32849     testpath="$unix_path"
32850   fi
32851 
32852           if test -d "$testpath"; then
32853 
32854   # Only process if variable expands to non-empty
32855 
32856   if test "x$libpath" != x; then
32857     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32858 
32859   # Input might be given as Windows format, start by converting to
32860   # unix format.
32861   path="$libpath"
32862   new_path=`$CYGPATH -u "$path"`
32863 
32864   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32865   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32866   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32867   # "foo.exe" is OK but "foo" is an error.
32868   #
32869   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32870   # It is also a way to make sure we got the proper file name for the real test later on.
32871   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32872   if test "x$test_shortpath" = x; then
32873     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32874 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32875     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32876   fi
32877 
32878   # Call helper function which possibly converts this using DOS-style short mode.
32879   # If so, the updated path is stored in $new_path.
32880 
32881   input_path="$new_path"
32882   # Check if we need to convert this using DOS-style short mode. If the path
32883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32884   # take no chances and rewrite it.
32885   # Note: m4 eats our [], so we need to use [ and ] instead.
32886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32887   if test "x$has_forbidden_chars" != x; then
32888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32889     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32890     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32891     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32892       # Going to short mode and back again did indeed matter. Since short mode is
32893       # case insensitive, let's make it lowercase to improve readability.
32894       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32895       # Now convert it back to Unix-style (cygpath)
32896       input_path=`$CYGPATH -u "$shortmode_path"`
32897       new_path="$input_path"
32898     fi
32899   fi
32900 
32901   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32902   if test "x$test_cygdrive_prefix" = x; then
32903     # As a simple fix, exclude /usr/bin since it's not a real path.
32904     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32905       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32906       # a path prefixed by /cygdrive for fixpath to work.
32907       new_path="$CYGWIN_ROOT_PATH$input_path"
32908     fi
32909   fi
32910 
32911 
32912   if test "x$path" != "x$new_path"; then
32913     libpath="$new_path"
32914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32915 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32916   fi
32917 
32918     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32919 
32920   path="$libpath"
32921   has_colon=`$ECHO $path | $GREP ^.:`
32922   new_path="$path"
32923   if test "x$has_colon" = x; then
32924     # Not in mixed or Windows style, start by that.
32925     new_path=`cmd //c echo $path`
32926   fi
32927 
32928 
32929   input_path="$new_path"
32930   # Check if we need to convert this using DOS-style short mode. If the path
32931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32932   # take no chances and rewrite it.
32933   # Note: m4 eats our [], so we need to use [ and ] instead.
32934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32935   if test "x$has_forbidden_chars" != x; then
32936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32937     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32938   fi
32939 
32940 
32941   windows_path="$new_path"
32942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32943     unix_path=`$CYGPATH -u "$windows_path"`
32944     new_path="$unix_path"
32945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32947     new_path="$unix_path"
32948   fi
32949 
32950   if test "x$path" != "x$new_path"; then
32951     libpath="$new_path"
32952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32953 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32954   fi
32955 
32956   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32957   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32958 
32959     else
32960       # We're on a unix platform. Hooray! :)
32961       path="$libpath"
32962       has_space=`$ECHO "$path" | $GREP " "`
32963       if test "x$has_space" != x; then
32964         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32965 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32966         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32967       fi
32968 
32969       # Use eval to expand a potential ~
32970       eval path="$path"
32971       if test ! -f "$path" && test ! -d "$path"; then
32972         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32973       fi
32974 
32975       if test -d "$path"; then
32976         libpath="`cd "$path"; $THEPWDCMD -L`"
32977       else
32978         dir="`$DIRNAME "$path"`"
32979         base="`$BASENAME "$path"`"
32980         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32981       fi
32982     fi
32983   fi
32984 
32985             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32986           fi
32987           IFS=";"
32988         fi
32989       done
32990       IFS="$OLDIFS"
32991     fi
32992   else
32993     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32994 $as_echo "not found" >&6; }
32995 
32996     if test "x$VS_ENV_CMD" = x; then
32997       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32998 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32999       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33000 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33001     else
33002       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33003 $as_echo "$as_me: Running the extraction script failed." >&6;}
33004     fi
33005     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33006 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33007     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33008 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33009     as_fn_error $? "Cannot continue" "$LINENO" 5
33010   fi
33011 
33012     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33013     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33014     PATH="$VS_PATH"
33015     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33016     export INCLUDE="$VS_INCLUDE"
33017     export LIB="$VS_LIB"
33018   else
33019     if test "x$XCODE_VERSION_OUTPUT" != x; then
33020       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33021       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33022       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33023     else
33024       # Currently we do not define this for other toolchains. This might change as the need arise.
33025       TOOLCHAIN_VERSION=
33026     fi
33027   fi
33028 
33029 
33030   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33031   # override all other locations.
33032   if test "x$TOOLCHAIN_PATH" != x; then
33033     PATH=$TOOLCHAIN_PATH:$PATH
33034   fi
33035 
33036 
33037   #
33038   # Setup the compilers (CC and CXX)
33039   #
33040 
33041   COMPILER_NAME=C
33042   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33043 
33044   if test "x$CC" != x; then
33045     # User has supplied compiler name already, always let that override.
33046     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33047 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33048     if test "x`basename $CC`" = "x$CC"; then
33049       # A command without a complete path is provided, search $PATH.
33050 
33051       for ac_prog in $CC
33052 do
33053   # Extract the first word of "$ac_prog", so it can be a program name with args.
33054 set dummy $ac_prog; ac_word=$2
33055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33056 $as_echo_n "checking for $ac_word... " >&6; }
33057 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33058   $as_echo_n "(cached) " >&6
33059 else
33060   case $POTENTIAL_CC in
33061   [\\/]* | ?:[\\/]*)
33062   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33063   ;;
33064   *)
33065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33066 for as_dir in $PATH
33067 do
33068   IFS=$as_save_IFS
33069   test -z "$as_dir" && as_dir=.
33070     for ac_exec_ext in '' $ac_executable_extensions; do
33071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33072     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33074     break 2
33075   fi
33076 done
33077   done
33078 IFS=$as_save_IFS
33079 
33080   ;;
33081 esac
33082 fi
33083 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33084 if test -n "$POTENTIAL_CC"; then
33085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33086 $as_echo "$POTENTIAL_CC" >&6; }
33087 else
33088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33089 $as_echo "no" >&6; }
33090 fi
33091 
33092 
33093   test -n "$POTENTIAL_CC" && break
33094 done
33095 
33096       if test "x$POTENTIAL_CC" != x; then
33097         CC=$POTENTIAL_CC
33098       else
33099         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33100       fi
33101     else
33102       # Otherwise it might already be a complete path
33103       if test ! -x "$CC"; then
33104         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33105       fi
33106     fi
33107   else
33108     # No user supplied value. Locate compiler ourselves.
33109 
33110     # If we are cross compiling, assume cross compilation tools follows the
33111     # cross compilation standard where they are prefixed with the autoconf
33112     # standard name for the target. For example the binary
33113     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33114     # If we are not cross compiling, then the default compiler name will be
33115     # used.
33116 
33117     CC=
33118     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33119     # before checking the rest of the PATH.
33120     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33121     # step, this should not be necessary.
33122     if test -n "$TOOLCHAIN_PATH"; then
33123       PATH_save="$PATH"
33124       PATH="$TOOLCHAIN_PATH"
33125       for ac_prog in $SEARCH_LIST
33126 do
33127   # Extract the first word of "$ac_prog", so it can be a program name with args.
33128 set dummy $ac_prog; ac_word=$2
33129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33130 $as_echo_n "checking for $ac_word... " >&6; }
33131 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33132   $as_echo_n "(cached) " >&6
33133 else
33134   case $TOOLCHAIN_PATH_CC in
33135   [\\/]* | ?:[\\/]*)
33136   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33137   ;;
33138   *)
33139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33140 for as_dir in $PATH
33141 do
33142   IFS=$as_save_IFS
33143   test -z "$as_dir" && as_dir=.
33144     for ac_exec_ext in '' $ac_executable_extensions; do
33145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33146     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33148     break 2
33149   fi
33150 done
33151   done
33152 IFS=$as_save_IFS
33153 
33154   ;;
33155 esac
33156 fi
33157 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33158 if test -n "$TOOLCHAIN_PATH_CC"; then
33159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33160 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33161 else
33162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33163 $as_echo "no" >&6; }
33164 fi
33165 
33166 
33167   test -n "$TOOLCHAIN_PATH_CC" && break
33168 done
33169 
33170       CC=$TOOLCHAIN_PATH_CC
33171       PATH="$PATH_save"
33172     fi
33173 
33174     # AC_PATH_PROGS can't be run multiple times with the same variable,
33175     # so create a new name for this run.
33176     if test "x$CC" = x; then
33177       for ac_prog in $SEARCH_LIST
33178 do
33179   # Extract the first word of "$ac_prog", so it can be a program name with args.
33180 set dummy $ac_prog; ac_word=$2
33181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33182 $as_echo_n "checking for $ac_word... " >&6; }
33183 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33184   $as_echo_n "(cached) " >&6
33185 else
33186   case $POTENTIAL_CC in
33187   [\\/]* | ?:[\\/]*)
33188   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33189   ;;
33190   *)
33191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33192 for as_dir in $PATH
33193 do
33194   IFS=$as_save_IFS
33195   test -z "$as_dir" && as_dir=.
33196     for ac_exec_ext in '' $ac_executable_extensions; do
33197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33198     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33200     break 2
33201   fi
33202 done
33203   done
33204 IFS=$as_save_IFS
33205 
33206   ;;
33207 esac
33208 fi
33209 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33210 if test -n "$POTENTIAL_CC"; then
33211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33212 $as_echo "$POTENTIAL_CC" >&6; }
33213 else
33214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33215 $as_echo "no" >&6; }
33216 fi
33217 
33218 
33219   test -n "$POTENTIAL_CC" && break
33220 done
33221 
33222       CC=$POTENTIAL_CC
33223     fi
33224 
33225     if test "x$CC" = x; then
33226 
33227   # Print a helpful message on how to acquire the necessary build dependency.
33228   # devkit is the help tag: freetype, cups, alsa etc
33229   MISSING_DEPENDENCY=devkit
33230 
33231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33232     cygwin_help $MISSING_DEPENDENCY
33233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33234     msys_help $MISSING_DEPENDENCY
33235   else
33236     PKGHANDLER_COMMAND=
33237 
33238     case $PKGHANDLER in
33239       apt-get)
33240         apt_help     $MISSING_DEPENDENCY ;;
33241       yum)
33242         yum_help     $MISSING_DEPENDENCY ;;
33243       port)
33244         port_help    $MISSING_DEPENDENCY ;;
33245       pkgutil)
33246         pkgutil_help $MISSING_DEPENDENCY ;;
33247       pkgadd)
33248         pkgadd_help  $MISSING_DEPENDENCY ;;
33249     esac
33250 
33251     if test "x$PKGHANDLER_COMMAND" != x; then
33252       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33253     fi
33254   fi
33255 
33256       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33257     fi
33258   fi
33259 
33260   # Now we have a compiler binary in CC. Make sure it's okay.
33261 
33262   # Only process if variable expands to non-empty
33263 
33264   if test "x$CC" != x; then
33265     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33266 
33267   # First separate the path from the arguments. This will split at the first
33268   # space.
33269   complete="$CC"
33270   path="${complete%% *}"
33271   tmp="$complete EOL"
33272   arguments="${tmp#* }"
33273 
33274   # Input might be given as Windows format, start by converting to
33275   # unix format.
33276   new_path=`$CYGPATH -u "$path"`
33277 
33278   # Now try to locate executable using which
33279   new_path=`$WHICH "$new_path" 2> /dev/null`
33280   # bat and cmd files are not always considered executable in cygwin causing which
33281   # to not find them
33282   if test "x$new_path" = x \
33283       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33284       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33285     new_path=`$CYGPATH -u "$path"`
33286   fi
33287   if test "x$new_path" = x; then
33288     # Oops. Which didn't find the executable.
33289     # The splitting of arguments from the executable at a space might have been incorrect,
33290     # since paths with space are more likely in Windows. Give it another try with the whole
33291     # argument.
33292     path="$complete"
33293     arguments="EOL"
33294     new_path=`$CYGPATH -u "$path"`
33295     new_path=`$WHICH "$new_path" 2> /dev/null`
33296     # bat and cmd files are not always considered executable in cygwin causing which
33297     # to not find them
33298     if test "x$new_path" = x \
33299         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33300         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33301       new_path=`$CYGPATH -u "$path"`
33302     fi
33303     if test "x$new_path" = x; then
33304       # It's still not found. Now this is an unrecoverable error.
33305       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33306 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33307       has_space=`$ECHO "$complete" | $GREP " "`
33308       if test "x$has_space" != x; then
33309         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33310 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33311       fi
33312       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33313     fi
33314   fi
33315 
33316   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33317   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33318   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33319   # "foo.exe" is OK but "foo" is an error.
33320   #
33321   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33322   # It is also a way to make sure we got the proper file name for the real test later on.
33323   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33324   if test "x$test_shortpath" = x; then
33325     # Short path failed, file does not exist as specified.
33326     # Try adding .exe or .cmd
33327     if test -f "${new_path}.exe"; then
33328       input_to_shortpath="${new_path}.exe"
33329     elif test -f "${new_path}.cmd"; then
33330       input_to_shortpath="${new_path}.cmd"
33331     else
33332       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33333 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33334       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33335 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33336       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33337     fi
33338   else
33339     input_to_shortpath="$new_path"
33340   fi
33341 
33342   # Call helper function which possibly converts this using DOS-style short mode.
33343   # If so, the updated path is stored in $new_path.
33344   new_path="$input_to_shortpath"
33345 
33346   input_path="$input_to_shortpath"
33347   # Check if we need to convert this using DOS-style short mode. If the path
33348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33349   # take no chances and rewrite it.
33350   # Note: m4 eats our [], so we need to use [ and ] instead.
33351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33352   if test "x$has_forbidden_chars" != x; then
33353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33354     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33355     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33356     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33357       # Going to short mode and back again did indeed matter. Since short mode is
33358       # case insensitive, let's make it lowercase to improve readability.
33359       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33360       # Now convert it back to Unix-style (cygpath)
33361       input_path=`$CYGPATH -u "$shortmode_path"`
33362       new_path="$input_path"
33363     fi
33364   fi
33365 
33366   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33367   if test "x$test_cygdrive_prefix" = x; then
33368     # As a simple fix, exclude /usr/bin since it's not a real path.
33369     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33370       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33371       # a path prefixed by /cygdrive for fixpath to work.
33372       new_path="$CYGWIN_ROOT_PATH$input_path"
33373     fi
33374   fi
33375 
33376   # remove trailing .exe if any
33377   new_path="${new_path/%.exe/}"
33378 
33379     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380 
33381   # First separate the path from the arguments. This will split at the first
33382   # space.
33383   complete="$CC"
33384   path="${complete%% *}"
33385   tmp="$complete EOL"
33386   arguments="${tmp#* }"
33387 
33388   # Input might be given as Windows format, start by converting to
33389   # unix format.
33390   new_path="$path"
33391 
33392   windows_path="$new_path"
33393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33394     unix_path=`$CYGPATH -u "$windows_path"`
33395     new_path="$unix_path"
33396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33398     new_path="$unix_path"
33399   fi
33400 
33401 
33402   # Now try to locate executable using which
33403   new_path=`$WHICH "$new_path" 2> /dev/null`
33404 
33405   if test "x$new_path" = x; then
33406     # Oops. Which didn't find the executable.
33407     # The splitting of arguments from the executable at a space might have been incorrect,
33408     # since paths with space are more likely in Windows. Give it another try with the whole
33409     # argument.
33410     path="$complete"
33411     arguments="EOL"
33412     new_path="$path"
33413 
33414   windows_path="$new_path"
33415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33416     unix_path=`$CYGPATH -u "$windows_path"`
33417     new_path="$unix_path"
33418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33420     new_path="$unix_path"
33421   fi
33422 
33423 
33424     new_path=`$WHICH "$new_path" 2> /dev/null`
33425     # bat and cmd files are not always considered executable in MSYS causing which
33426     # to not find them
33427     if test "x$new_path" = x \
33428         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33429         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33430       new_path="$path"
33431 
33432   windows_path="$new_path"
33433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434     unix_path=`$CYGPATH -u "$windows_path"`
33435     new_path="$unix_path"
33436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33438     new_path="$unix_path"
33439   fi
33440 
33441     fi
33442 
33443     if test "x$new_path" = x; then
33444       # It's still not found. Now this is an unrecoverable error.
33445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33446 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33447       has_space=`$ECHO "$complete" | $GREP " "`
33448       if test "x$has_space" != x; then
33449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33451       fi
33452       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33453     fi
33454   fi
33455 
33456   # Now new_path has a complete unix path to the binary
33457   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33458     # Keep paths in /bin as-is, but remove trailing .exe if any
33459     new_path="${new_path/%.exe/}"
33460     # Do not save /bin paths to all_fixpath_prefixes!
33461   else
33462     # Not in mixed or Windows style, start by that.
33463     new_path=`cmd //c echo $new_path`
33464 
33465   input_path="$new_path"
33466   # Check if we need to convert this using DOS-style short mode. If the path
33467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33468   # take no chances and rewrite it.
33469   # Note: m4 eats our [], so we need to use [ and ] instead.
33470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33471   if test "x$has_forbidden_chars" != x; then
33472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33473     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33474   fi
33475 
33476     # Output is in $new_path
33477 
33478   windows_path="$new_path"
33479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33480     unix_path=`$CYGPATH -u "$windows_path"`
33481     new_path="$unix_path"
33482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33484     new_path="$unix_path"
33485   fi
33486 
33487     # remove trailing .exe if any
33488     new_path="${new_path/%.exe/}"
33489 
33490     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33491     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33492   fi
33493 
33494     else
33495       # We're on a unix platform. Hooray! :)
33496       # First separate the path from the arguments. This will split at the first
33497       # space.
33498       complete="$CC"
33499       path="${complete%% *}"
33500       tmp="$complete EOL"
33501       arguments="${tmp#* }"
33502 
33503       # Cannot rely on the command "which" here since it doesn't always work.
33504       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33505       if test -z "$is_absolute_path"; then
33506         # Path to executable is not absolute. Find it.
33507         IFS_save="$IFS"
33508         IFS=:
33509         for p in $PATH; do
33510           if test -f "$p/$path" && test -x "$p/$path"; then
33511             new_path="$p/$path"
33512             break
33513           fi
33514         done
33515         IFS="$IFS_save"
33516       else
33517         # This is an absolute path, we can use it without further modifications.
33518         new_path="$path"
33519       fi
33520 
33521       if test "x$new_path" = x; then
33522         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33523 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33524         has_space=`$ECHO "$complete" | $GREP " "`
33525         if test "x$has_space" != x; then
33526           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33527 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33528         fi
33529         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33530       fi
33531     fi
33532 
33533     # Now join together the path and the arguments once again
33534     if test "x$arguments" != xEOL; then
33535       new_complete="$new_path ${arguments% *}"
33536     else
33537       new_complete="$new_path"
33538     fi
33539 
33540     if test "x$complete" != "x$new_complete"; then
33541       CC="$new_complete"
33542       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33543 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33544     fi
33545   fi
33546 
33547   TEST_COMPILER="$CC"
33548 
33549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33550 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33551   SYMLINK_ORIGINAL="$TEST_COMPILER"
33552 
33553   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33554     # Follow a chain of symbolic links. Use readlink
33555     # where it exists, else fall back to horribly
33556     # complicated shell code.
33557     if test "x$READLINK_TESTED" != yes; then
33558       # On MacOSX there is a readlink tool with a different
33559       # purpose than the GNU readlink tool. Check the found readlink.
33560       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33561       if test "x$ISGNU" = x; then
33562         # A readlink that we do not know how to use.
33563         # Are there other non-GNU readlinks out there?
33564         READLINK_TESTED=yes
33565         READLINK=
33566       fi
33567     fi
33568 
33569     if test "x$READLINK" != x; then
33570       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33571     else
33572       # Save the current directory for restoring afterwards
33573       STARTDIR=$PWD
33574       COUNTER=0
33575       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33576       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33577       cd $sym_link_dir
33578       # Use -P flag to resolve symlinks in directories.
33579       cd `$THEPWDCMD -P`
33580       sym_link_dir=`$THEPWDCMD -P`
33581       # Resolve file symlinks
33582       while test $COUNTER -lt 20; do
33583         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33584         if test "x$ISLINK" == x; then
33585           # This is not a symbolic link! We are done!
33586           break
33587         fi
33588         # Again resolve directory symlinks since the target of the just found
33589         # link could be in a different directory
33590         cd `$DIRNAME $ISLINK`
33591         sym_link_dir=`$THEPWDCMD -P`
33592         sym_link_file=`$BASENAME $ISLINK`
33593         let COUNTER=COUNTER+1
33594       done
33595       cd $STARTDIR
33596       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33597     fi
33598   fi
33599 
33600   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33602 $as_echo "no symlink" >&6; }
33603   else
33604     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33605 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33606 
33607     # We can't handle ccache by gcc wrappers, since we need to know if we're
33608     # using ccache. Instead ccache usage must be controlled by a configure option.
33609     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33610     if test "x$COMPILER_BASENAME" = "xccache"; then
33611       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33612 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33613       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33614     fi
33615   fi
33616 
33617 
33618   COMPILER=$CC
33619   COMPILER_NAME=$COMPILER_NAME
33620 
33621   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33622     # cc -V output typically looks like
33623     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33624     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33625     # Check that this is likely to be the Solaris Studio cc.
33626     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33627     if test $? -ne 0; then
33628       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33629       { $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
33630 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33631       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33632 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33633       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33634 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33635       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33636     fi
33637     # Remove usage instructions (if present), and
33638     # collapse compiler output into a single line
33639     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33640         $SED -e 's/ *[Uu]sage:.*//'`
33641     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33642         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33643   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33644     # xlc -qversion output typically looks like
33645     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33646     #     Version: 11.01.0000.0015
33647     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33648     # Check that this is likely to be the IBM XL C compiler.
33649     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33650     if test $? -ne 0; then
33651       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33652       { $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
33653 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33654       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33655 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33656       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33657 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33658       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33659     fi
33660     # Collapse compiler output into a single line
33661     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33662     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33663         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33664   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33665     # There is no specific version flag, but all output starts with a version string.
33666     # First line typically looks something like:
33667     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33668     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33669     # Check that this is likely to be Microsoft CL.EXE.
33670     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33671     if test $? -ne 0; then
33672       { $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
33673 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33674       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33675 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33676       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33677     fi
33678     # Collapse compiler output into a single line
33679     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33680     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33682   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33683     # gcc --version output typically looks like
33684     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33685     #     Copyright (C) 2013 Free Software Foundation, Inc.
33686     #     This is free software; see the source for copying conditions.  There is NO
33687     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33688     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33689     # Check that this is likely to be GCC.
33690     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33691     if test $? -ne 0; then
33692       { $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
33693 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33694       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33695 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33696       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33697     fi
33698     # Remove Copyright and legalese from version string, and
33699     # collapse into a single line
33700     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33701         $SED -e 's/ *Copyright .*//'`
33702     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33703         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33704   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33705     # clang --version output typically looks like
33706     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33707     #    clang version 3.3 (tags/RELEASE_33/final)
33708     # or
33709     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33710     #    Target: x86_64-pc-linux-gnu
33711     #    Thread model: posix
33712     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33713     # Check that this is likely to be clang
33714     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33715     if test $? -ne 0; then
33716       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33717 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33718       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33719 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33720       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33721     fi
33722     # Collapse compiler output into a single line
33723     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33724     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33725         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33726   else
33727       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33728   fi
33729   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33730   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33731   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33732   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33733 
33734   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33735 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33736 
33737 
33738   # Now that we have resolved CC ourself, let autoconf have its go at it
33739   ac_ext=c
33740 ac_cpp='$CPP $CPPFLAGS'
33741 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33742 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33743 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33744 if test -n "$ac_tool_prefix"; then
33745   for ac_prog in $CC
33746   do
33747     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33748 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33750 $as_echo_n "checking for $ac_word... " >&6; }
33751 if ${ac_cv_prog_CC+:} false; then :
33752   $as_echo_n "(cached) " >&6
33753 else
33754   if test -n "$CC"; then
33755   ac_cv_prog_CC="$CC" # Let the user override the test.
33756 else
33757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33758 for as_dir in $PATH
33759 do
33760   IFS=$as_save_IFS
33761   test -z "$as_dir" && as_dir=.
33762     for ac_exec_ext in '' $ac_executable_extensions; do
33763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33764     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33766     break 2
33767   fi
33768 done
33769   done
33770 IFS=$as_save_IFS
33771 
33772 fi
33773 fi
33774 CC=$ac_cv_prog_CC
33775 if test -n "$CC"; then
33776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33777 $as_echo "$CC" >&6; }
33778 else
33779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780 $as_echo "no" >&6; }
33781 fi
33782 
33783 
33784     test -n "$CC" && break
33785   done
33786 fi
33787 if test -z "$CC"; then
33788   ac_ct_CC=$CC
33789   for ac_prog in $CC
33790 do
33791   # Extract the first word of "$ac_prog", so it can be a program name with args.
33792 set dummy $ac_prog; ac_word=$2
33793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33794 $as_echo_n "checking for $ac_word... " >&6; }
33795 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33796   $as_echo_n "(cached) " >&6
33797 else
33798   if test -n "$ac_ct_CC"; then
33799   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33800 else
33801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33802 for as_dir in $PATH
33803 do
33804   IFS=$as_save_IFS
33805   test -z "$as_dir" && as_dir=.
33806     for ac_exec_ext in '' $ac_executable_extensions; do
33807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33808     ac_cv_prog_ac_ct_CC="$ac_prog"
33809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33810     break 2
33811   fi
33812 done
33813   done
33814 IFS=$as_save_IFS
33815 
33816 fi
33817 fi
33818 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33819 if test -n "$ac_ct_CC"; then
33820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33821 $as_echo "$ac_ct_CC" >&6; }
33822 else
33823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33824 $as_echo "no" >&6; }
33825 fi
33826 
33827 
33828   test -n "$ac_ct_CC" && break
33829 done
33830 
33831   if test "x$ac_ct_CC" = x; then
33832     CC=""
33833   else
33834     case $cross_compiling:$ac_tool_warned in
33835 yes:)
33836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33837 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33838 ac_tool_warned=yes ;;
33839 esac
33840     CC=$ac_ct_CC
33841   fi
33842 fi
33843 
33844 
33845 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33846 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33847 as_fn_error $? "no acceptable C compiler found in \$PATH
33848 See \`config.log' for more details" "$LINENO" 5; }
33849 
33850 # Provide some information about the compiler.
33851 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33852 set X $ac_compile
33853 ac_compiler=$2
33854 for ac_option in --version -v -V -qversion; do
33855   { { ac_try="$ac_compiler $ac_option >&5"
33856 case "(($ac_try" in
33857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33858   *) ac_try_echo=$ac_try;;
33859 esac
33860 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33861 $as_echo "$ac_try_echo"; } >&5
33862   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33863   ac_status=$?
33864   if test -s conftest.err; then
33865     sed '10a\
33866 ... rest of stderr output deleted ...
33867          10q' conftest.err >conftest.er1
33868     cat conftest.er1 >&5
33869   fi
33870   rm -f conftest.er1 conftest.err
33871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33872   test $ac_status = 0; }
33873 done
33874 
33875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33876 /* end confdefs.h.  */
33877 
33878 int
33879 main ()
33880 {
33881 
33882   ;
33883   return 0;
33884 }
33885 _ACEOF
33886 ac_clean_files_save=$ac_clean_files
33887 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33888 # Try to create an executable without -o first, disregard a.out.
33889 # It will help us diagnose broken compilers, and finding out an intuition
33890 # of exeext.
33891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33892 $as_echo_n "checking whether the C compiler works... " >&6; }
33893 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33894 
33895 # The possible output files:
33896 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33897 
33898 ac_rmfiles=
33899 for ac_file in $ac_files
33900 do
33901   case $ac_file in
33902     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33903     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33904   esac
33905 done
33906 rm -f $ac_rmfiles
33907 
33908 if { { ac_try="$ac_link_default"
33909 case "(($ac_try" in
33910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33911   *) ac_try_echo=$ac_try;;
33912 esac
33913 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33914 $as_echo "$ac_try_echo"; } >&5
33915   (eval "$ac_link_default") 2>&5
33916   ac_status=$?
33917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33918   test $ac_status = 0; }; then :
33919   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33920 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33921 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33922 # so that the user can short-circuit this test for compilers unknown to
33923 # Autoconf.
33924 for ac_file in $ac_files ''
33925 do
33926   test -f "$ac_file" || continue
33927   case $ac_file in
33928     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33929         ;;
33930     [ab].out )
33931         # We found the default executable, but exeext='' is most
33932         # certainly right.
33933         break;;
33934     *.* )
33935         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33936         then :; else
33937            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33938         fi
33939         # We set ac_cv_exeext here because the later test for it is not
33940         # safe: cross compilers may not add the suffix if given an `-o'
33941         # argument, so we may need to know it at that point already.
33942         # Even if this section looks crufty: it has the advantage of
33943         # actually working.
33944         break;;
33945     * )
33946         break;;
33947   esac
33948 done
33949 test "$ac_cv_exeext" = no && ac_cv_exeext=
33950 
33951 else
33952   ac_file=''
33953 fi
33954 if test -z "$ac_file"; then :
33955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33956 $as_echo "no" >&6; }
33957 $as_echo "$as_me: failed program was:" >&5
33958 sed 's/^/| /' conftest.$ac_ext >&5
33959 
33960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33962 as_fn_error 77 "C compiler cannot create executables
33963 See \`config.log' for more details" "$LINENO" 5; }
33964 else
33965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33966 $as_echo "yes" >&6; }
33967 fi
33968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33969 $as_echo_n "checking for C compiler default output file name... " >&6; }
33970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33971 $as_echo "$ac_file" >&6; }
33972 ac_exeext=$ac_cv_exeext
33973 
33974 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33975 ac_clean_files=$ac_clean_files_save
33976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33977 $as_echo_n "checking for suffix of executables... " >&6; }
33978 if { { ac_try="$ac_link"
33979 case "(($ac_try" in
33980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33981   *) ac_try_echo=$ac_try;;
33982 esac
33983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33984 $as_echo "$ac_try_echo"; } >&5
33985   (eval "$ac_link") 2>&5
33986   ac_status=$?
33987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33988   test $ac_status = 0; }; then :
33989   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33990 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33991 # work properly (i.e., refer to `conftest.exe'), while it won't with
33992 # `rm'.
33993 for ac_file in conftest.exe conftest conftest.*; do
33994   test -f "$ac_file" || continue
33995   case $ac_file in
33996     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33997     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33998           break;;
33999     * ) break;;
34000   esac
34001 done
34002 else
34003   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34005 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34006 See \`config.log' for more details" "$LINENO" 5; }
34007 fi
34008 rm -f conftest conftest$ac_cv_exeext
34009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34010 $as_echo "$ac_cv_exeext" >&6; }
34011 
34012 rm -f conftest.$ac_ext
34013 EXEEXT=$ac_cv_exeext
34014 ac_exeext=$EXEEXT
34015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34016 /* end confdefs.h.  */
34017 #include <stdio.h>
34018 int
34019 main ()
34020 {
34021 FILE *f = fopen ("conftest.out", "w");
34022  return ferror (f) || fclose (f) != 0;
34023 
34024   ;
34025   return 0;
34026 }
34027 _ACEOF
34028 ac_clean_files="$ac_clean_files conftest.out"
34029 # Check that the compiler produces executables we can run.  If not, either
34030 # the compiler is broken, or we cross compile.
34031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34032 $as_echo_n "checking whether we are cross compiling... " >&6; }
34033 if test "$cross_compiling" != yes; then
34034   { { ac_try="$ac_link"
34035 case "(($ac_try" in
34036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34037   *) ac_try_echo=$ac_try;;
34038 esac
34039 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34040 $as_echo "$ac_try_echo"; } >&5
34041   (eval "$ac_link") 2>&5
34042   ac_status=$?
34043   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34044   test $ac_status = 0; }
34045   if { ac_try='./conftest$ac_cv_exeext'
34046   { { case "(($ac_try" in
34047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34048   *) ac_try_echo=$ac_try;;
34049 esac
34050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34051 $as_echo "$ac_try_echo"; } >&5
34052   (eval "$ac_try") 2>&5
34053   ac_status=$?
34054   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34055   test $ac_status = 0; }; }; then
34056     cross_compiling=no
34057   else
34058     if test "$cross_compiling" = maybe; then
34059         cross_compiling=yes
34060     else
34061         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34062 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34063 as_fn_error $? "cannot run C compiled programs.
34064 If you meant to cross compile, use \`--host'.
34065 See \`config.log' for more details" "$LINENO" 5; }
34066     fi
34067   fi
34068 fi
34069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34070 $as_echo "$cross_compiling" >&6; }
34071 
34072 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34073 ac_clean_files=$ac_clean_files_save
34074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34075 $as_echo_n "checking for suffix of object files... " >&6; }
34076 if ${ac_cv_objext+:} false; then :
34077   $as_echo_n "(cached) " >&6
34078 else
34079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34080 /* end confdefs.h.  */
34081 
34082 int
34083 main ()
34084 {
34085 
34086   ;
34087   return 0;
34088 }
34089 _ACEOF
34090 rm -f conftest.o conftest.obj
34091 if { { ac_try="$ac_compile"
34092 case "(($ac_try" in
34093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34094   *) ac_try_echo=$ac_try;;
34095 esac
34096 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34097 $as_echo "$ac_try_echo"; } >&5
34098   (eval "$ac_compile") 2>&5
34099   ac_status=$?
34100   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34101   test $ac_status = 0; }; then :
34102   for ac_file in conftest.o conftest.obj conftest.*; do
34103   test -f "$ac_file" || continue;
34104   case $ac_file in
34105     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34106     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34107        break;;
34108   esac
34109 done
34110 else
34111   $as_echo "$as_me: failed program was:" >&5
34112 sed 's/^/| /' conftest.$ac_ext >&5
34113 
34114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34115 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34116 as_fn_error $? "cannot compute suffix of object files: cannot compile
34117 See \`config.log' for more details" "$LINENO" 5; }
34118 fi
34119 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34120 fi
34121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34122 $as_echo "$ac_cv_objext" >&6; }
34123 OBJEXT=$ac_cv_objext
34124 ac_objext=$OBJEXT
34125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34126 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34127 if ${ac_cv_c_compiler_gnu+:} false; then :
34128   $as_echo_n "(cached) " >&6
34129 else
34130   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34131 /* end confdefs.h.  */
34132 
34133 int
34134 main ()
34135 {
34136 #ifndef __GNUC__
34137        choke me
34138 #endif
34139 
34140   ;
34141   return 0;
34142 }
34143 _ACEOF
34144 if ac_fn_c_try_compile "$LINENO"; then :
34145   ac_compiler_gnu=yes
34146 else
34147   ac_compiler_gnu=no
34148 fi
34149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34150 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34151 
34152 fi
34153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34154 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34155 if test $ac_compiler_gnu = yes; then
34156   GCC=yes
34157 else
34158   GCC=
34159 fi
34160 ac_test_CFLAGS=${CFLAGS+set}
34161 ac_save_CFLAGS=$CFLAGS
34162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34163 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34164 if ${ac_cv_prog_cc_g+:} false; then :
34165   $as_echo_n "(cached) " >&6
34166 else
34167   ac_save_c_werror_flag=$ac_c_werror_flag
34168    ac_c_werror_flag=yes
34169    ac_cv_prog_cc_g=no
34170    CFLAGS="-g"
34171    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34172 /* end confdefs.h.  */
34173 
34174 int
34175 main ()
34176 {
34177 
34178   ;
34179   return 0;
34180 }
34181 _ACEOF
34182 if ac_fn_c_try_compile "$LINENO"; then :
34183   ac_cv_prog_cc_g=yes
34184 else
34185   CFLAGS=""
34186       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34187 /* end confdefs.h.  */
34188 
34189 int
34190 main ()
34191 {
34192 
34193   ;
34194   return 0;
34195 }
34196 _ACEOF
34197 if ac_fn_c_try_compile "$LINENO"; then :
34198 
34199 else
34200   ac_c_werror_flag=$ac_save_c_werror_flag
34201          CFLAGS="-g"
34202          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34203 /* end confdefs.h.  */
34204 
34205 int
34206 main ()
34207 {
34208 
34209   ;
34210   return 0;
34211 }
34212 _ACEOF
34213 if ac_fn_c_try_compile "$LINENO"; then :
34214   ac_cv_prog_cc_g=yes
34215 fi
34216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34217 fi
34218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34219 fi
34220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34221    ac_c_werror_flag=$ac_save_c_werror_flag
34222 fi
34223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34224 $as_echo "$ac_cv_prog_cc_g" >&6; }
34225 if test "$ac_test_CFLAGS" = set; then
34226   CFLAGS=$ac_save_CFLAGS
34227 elif test $ac_cv_prog_cc_g = yes; then
34228   if test "$GCC" = yes; then
34229     CFLAGS="-g -O2"
34230   else
34231     CFLAGS="-g"
34232   fi
34233 else
34234   if test "$GCC" = yes; then
34235     CFLAGS="-O2"
34236   else
34237     CFLAGS=
34238   fi
34239 fi
34240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34241 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34242 if ${ac_cv_prog_cc_c89+:} false; then :
34243   $as_echo_n "(cached) " >&6
34244 else
34245   ac_cv_prog_cc_c89=no
34246 ac_save_CC=$CC
34247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34248 /* end confdefs.h.  */
34249 #include <stdarg.h>
34250 #include <stdio.h>
34251 struct stat;
34252 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34253 struct buf { int x; };
34254 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34255 static char *e (p, i)
34256      char **p;
34257      int i;
34258 {
34259   return p[i];
34260 }
34261 static char *f (char * (*g) (char **, int), char **p, ...)
34262 {
34263   char *s;
34264   va_list v;
34265   va_start (v,p);
34266   s = g (p, va_arg (v,int));
34267   va_end (v);
34268   return s;
34269 }
34270 
34271 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34272    function prototypes and stuff, but not '\xHH' hex character constants.
34273    These don't provoke an error unfortunately, instead are silently treated
34274    as 'x'.  The following induces an error, until -std is added to get
34275    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34276    array size at least.  It's necessary to write '\x00'==0 to get something
34277    that's true only with -std.  */
34278 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34279 
34280 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34281    inside strings and character constants.  */
34282 #define FOO(x) 'x'
34283 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34284 
34285 int test (int i, double x);
34286 struct s1 {int (*f) (int a);};
34287 struct s2 {int (*f) (double a);};
34288 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34289 int argc;
34290 char **argv;
34291 int
34292 main ()
34293 {
34294 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34295   ;
34296   return 0;
34297 }
34298 _ACEOF
34299 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34300         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34301 do
34302   CC="$ac_save_CC $ac_arg"
34303   if ac_fn_c_try_compile "$LINENO"; then :
34304   ac_cv_prog_cc_c89=$ac_arg
34305 fi
34306 rm -f core conftest.err conftest.$ac_objext
34307   test "x$ac_cv_prog_cc_c89" != "xno" && break
34308 done
34309 rm -f conftest.$ac_ext
34310 CC=$ac_save_CC
34311 
34312 fi
34313 # AC_CACHE_VAL
34314 case "x$ac_cv_prog_cc_c89" in
34315   x)
34316     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34317 $as_echo "none needed" >&6; } ;;
34318   xno)
34319     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34320 $as_echo "unsupported" >&6; } ;;
34321   *)
34322     CC="$CC $ac_cv_prog_cc_c89"
34323     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34324 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34325 esac
34326 if test "x$ac_cv_prog_cc_c89" != xno; then :
34327 
34328 fi
34329 
34330 ac_ext=cpp
34331 ac_cpp='$CXXCPP $CPPFLAGS'
34332 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34333 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34334 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34335 
34336 
34337 
34338   COMPILER_NAME=C++
34339   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34340 
34341   if test "x$CXX" != x; then
34342     # User has supplied compiler name already, always let that override.
34343     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34344 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34345     if test "x`basename $CXX`" = "x$CXX"; then
34346       # A command without a complete path is provided, search $PATH.
34347 
34348       for ac_prog in $CXX
34349 do
34350   # Extract the first word of "$ac_prog", so it can be a program name with args.
34351 set dummy $ac_prog; ac_word=$2
34352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34353 $as_echo_n "checking for $ac_word... " >&6; }
34354 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34355   $as_echo_n "(cached) " >&6
34356 else
34357   case $POTENTIAL_CXX in
34358   [\\/]* | ?:[\\/]*)
34359   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34360   ;;
34361   *)
34362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34363 for as_dir in $PATH
34364 do
34365   IFS=$as_save_IFS
34366   test -z "$as_dir" && as_dir=.
34367     for ac_exec_ext in '' $ac_executable_extensions; do
34368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34369     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34371     break 2
34372   fi
34373 done
34374   done
34375 IFS=$as_save_IFS
34376 
34377   ;;
34378 esac
34379 fi
34380 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34381 if test -n "$POTENTIAL_CXX"; then
34382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34383 $as_echo "$POTENTIAL_CXX" >&6; }
34384 else
34385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34386 $as_echo "no" >&6; }
34387 fi
34388 
34389 
34390   test -n "$POTENTIAL_CXX" && break
34391 done
34392 
34393       if test "x$POTENTIAL_CXX" != x; then
34394         CXX=$POTENTIAL_CXX
34395       else
34396         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34397       fi
34398     else
34399       # Otherwise it might already be a complete path
34400       if test ! -x "$CXX"; then
34401         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34402       fi
34403     fi
34404   else
34405     # No user supplied value. Locate compiler ourselves.
34406 
34407     # If we are cross compiling, assume cross compilation tools follows the
34408     # cross compilation standard where they are prefixed with the autoconf
34409     # standard name for the target. For example the binary
34410     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34411     # If we are not cross compiling, then the default compiler name will be
34412     # used.
34413 
34414     CXX=
34415     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34416     # before checking the rest of the PATH.
34417     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34418     # step, this should not be necessary.
34419     if test -n "$TOOLCHAIN_PATH"; then
34420       PATH_save="$PATH"
34421       PATH="$TOOLCHAIN_PATH"
34422       for ac_prog in $SEARCH_LIST
34423 do
34424   # Extract the first word of "$ac_prog", so it can be a program name with args.
34425 set dummy $ac_prog; ac_word=$2
34426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34427 $as_echo_n "checking for $ac_word... " >&6; }
34428 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34429   $as_echo_n "(cached) " >&6
34430 else
34431   case $TOOLCHAIN_PATH_CXX in
34432   [\\/]* | ?:[\\/]*)
34433   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34434   ;;
34435   *)
34436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34437 for as_dir in $PATH
34438 do
34439   IFS=$as_save_IFS
34440   test -z "$as_dir" && as_dir=.
34441     for ac_exec_ext in '' $ac_executable_extensions; do
34442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34443     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34445     break 2
34446   fi
34447 done
34448   done
34449 IFS=$as_save_IFS
34450 
34451   ;;
34452 esac
34453 fi
34454 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34455 if test -n "$TOOLCHAIN_PATH_CXX"; then
34456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34457 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34458 else
34459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34460 $as_echo "no" >&6; }
34461 fi
34462 
34463 
34464   test -n "$TOOLCHAIN_PATH_CXX" && break
34465 done
34466 
34467       CXX=$TOOLCHAIN_PATH_CXX
34468       PATH="$PATH_save"
34469     fi
34470 
34471     # AC_PATH_PROGS can't be run multiple times with the same variable,
34472     # so create a new name for this run.
34473     if test "x$CXX" = x; then
34474       for ac_prog in $SEARCH_LIST
34475 do
34476   # Extract the first word of "$ac_prog", so it can be a program name with args.
34477 set dummy $ac_prog; ac_word=$2
34478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34479 $as_echo_n "checking for $ac_word... " >&6; }
34480 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34481   $as_echo_n "(cached) " >&6
34482 else
34483   case $POTENTIAL_CXX in
34484   [\\/]* | ?:[\\/]*)
34485   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34486   ;;
34487   *)
34488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34489 for as_dir in $PATH
34490 do
34491   IFS=$as_save_IFS
34492   test -z "$as_dir" && as_dir=.
34493     for ac_exec_ext in '' $ac_executable_extensions; do
34494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34495     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34497     break 2
34498   fi
34499 done
34500   done
34501 IFS=$as_save_IFS
34502 
34503   ;;
34504 esac
34505 fi
34506 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34507 if test -n "$POTENTIAL_CXX"; then
34508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34509 $as_echo "$POTENTIAL_CXX" >&6; }
34510 else
34511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34512 $as_echo "no" >&6; }
34513 fi
34514 
34515 
34516   test -n "$POTENTIAL_CXX" && break
34517 done
34518 
34519       CXX=$POTENTIAL_CXX
34520     fi
34521 
34522     if test "x$CXX" = x; then
34523 
34524   # Print a helpful message on how to acquire the necessary build dependency.
34525   # devkit is the help tag: freetype, cups, alsa etc
34526   MISSING_DEPENDENCY=devkit
34527 
34528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34529     cygwin_help $MISSING_DEPENDENCY
34530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34531     msys_help $MISSING_DEPENDENCY
34532   else
34533     PKGHANDLER_COMMAND=
34534 
34535     case $PKGHANDLER in
34536       apt-get)
34537         apt_help     $MISSING_DEPENDENCY ;;
34538       yum)
34539         yum_help     $MISSING_DEPENDENCY ;;
34540       port)
34541         port_help    $MISSING_DEPENDENCY ;;
34542       pkgutil)
34543         pkgutil_help $MISSING_DEPENDENCY ;;
34544       pkgadd)
34545         pkgadd_help  $MISSING_DEPENDENCY ;;
34546     esac
34547 
34548     if test "x$PKGHANDLER_COMMAND" != x; then
34549       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34550     fi
34551   fi
34552 
34553       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34554     fi
34555   fi
34556 
34557   # Now we have a compiler binary in CXX. Make sure it's okay.
34558 
34559   # Only process if variable expands to non-empty
34560 
34561   if test "x$CXX" != x; then
34562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34563 
34564   # First separate the path from the arguments. This will split at the first
34565   # space.
34566   complete="$CXX"
34567   path="${complete%% *}"
34568   tmp="$complete EOL"
34569   arguments="${tmp#* }"
34570 
34571   # Input might be given as Windows format, start by converting to
34572   # unix format.
34573   new_path=`$CYGPATH -u "$path"`
34574 
34575   # Now try to locate executable using which
34576   new_path=`$WHICH "$new_path" 2> /dev/null`
34577   # bat and cmd files are not always considered executable in cygwin causing which
34578   # to not find them
34579   if test "x$new_path" = x \
34580       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34581       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34582     new_path=`$CYGPATH -u "$path"`
34583   fi
34584   if test "x$new_path" = x; then
34585     # Oops. Which didn't find the executable.
34586     # The splitting of arguments from the executable at a space might have been incorrect,
34587     # since paths with space are more likely in Windows. Give it another try with the whole
34588     # argument.
34589     path="$complete"
34590     arguments="EOL"
34591     new_path=`$CYGPATH -u "$path"`
34592     new_path=`$WHICH "$new_path" 2> /dev/null`
34593     # bat and cmd files are not always considered executable in cygwin causing which
34594     # to not find them
34595     if test "x$new_path" = x \
34596         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34597         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34598       new_path=`$CYGPATH -u "$path"`
34599     fi
34600     if test "x$new_path" = x; then
34601       # It's still not found. Now this is an unrecoverable error.
34602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34603 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34604       has_space=`$ECHO "$complete" | $GREP " "`
34605       if test "x$has_space" != x; then
34606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34608       fi
34609       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34610     fi
34611   fi
34612 
34613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34616   # "foo.exe" is OK but "foo" is an error.
34617   #
34618   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34619   # It is also a way to make sure we got the proper file name for the real test later on.
34620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34621   if test "x$test_shortpath" = x; then
34622     # Short path failed, file does not exist as specified.
34623     # Try adding .exe or .cmd
34624     if test -f "${new_path}.exe"; then
34625       input_to_shortpath="${new_path}.exe"
34626     elif test -f "${new_path}.cmd"; then
34627       input_to_shortpath="${new_path}.cmd"
34628     else
34629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34630 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34631       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34633       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34634     fi
34635   else
34636     input_to_shortpath="$new_path"
34637   fi
34638 
34639   # Call helper function which possibly converts this using DOS-style short mode.
34640   # If so, the updated path is stored in $new_path.
34641   new_path="$input_to_shortpath"
34642 
34643   input_path="$input_to_shortpath"
34644   # Check if we need to convert this using DOS-style short mode. If the path
34645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34646   # take no chances and rewrite it.
34647   # Note: m4 eats our [], so we need to use [ and ] instead.
34648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34649   if test "x$has_forbidden_chars" != x; then
34650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34654       # Going to short mode and back again did indeed matter. Since short mode is
34655       # case insensitive, let's make it lowercase to improve readability.
34656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34657       # Now convert it back to Unix-style (cygpath)
34658       input_path=`$CYGPATH -u "$shortmode_path"`
34659       new_path="$input_path"
34660     fi
34661   fi
34662 
34663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34664   if test "x$test_cygdrive_prefix" = x; then
34665     # As a simple fix, exclude /usr/bin since it's not a real path.
34666     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34668       # a path prefixed by /cygdrive for fixpath to work.
34669       new_path="$CYGWIN_ROOT_PATH$input_path"
34670     fi
34671   fi
34672 
34673   # remove trailing .exe if any
34674   new_path="${new_path/%.exe/}"
34675 
34676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34677 
34678   # First separate the path from the arguments. This will split at the first
34679   # space.
34680   complete="$CXX"
34681   path="${complete%% *}"
34682   tmp="$complete EOL"
34683   arguments="${tmp#* }"
34684 
34685   # Input might be given as Windows format, start by converting to
34686   # unix format.
34687   new_path="$path"
34688 
34689   windows_path="$new_path"
34690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691     unix_path=`$CYGPATH -u "$windows_path"`
34692     new_path="$unix_path"
34693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695     new_path="$unix_path"
34696   fi
34697 
34698 
34699   # Now try to locate executable using which
34700   new_path=`$WHICH "$new_path" 2> /dev/null`
34701 
34702   if test "x$new_path" = x; then
34703     # Oops. Which didn't find the executable.
34704     # The splitting of arguments from the executable at a space might have been incorrect,
34705     # since paths with space are more likely in Windows. Give it another try with the whole
34706     # argument.
34707     path="$complete"
34708     arguments="EOL"
34709     new_path="$path"
34710 
34711   windows_path="$new_path"
34712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34713     unix_path=`$CYGPATH -u "$windows_path"`
34714     new_path="$unix_path"
34715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34717     new_path="$unix_path"
34718   fi
34719 
34720 
34721     new_path=`$WHICH "$new_path" 2> /dev/null`
34722     # bat and cmd files are not always considered executable in MSYS causing which
34723     # to not find them
34724     if test "x$new_path" = x \
34725         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34726         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34727       new_path="$path"
34728 
34729   windows_path="$new_path"
34730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34731     unix_path=`$CYGPATH -u "$windows_path"`
34732     new_path="$unix_path"
34733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34735     new_path="$unix_path"
34736   fi
34737 
34738     fi
34739 
34740     if test "x$new_path" = x; then
34741       # It's still not found. Now this is an unrecoverable error.
34742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34743 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34744       has_space=`$ECHO "$complete" | $GREP " "`
34745       if test "x$has_space" != x; then
34746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34748       fi
34749       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34750     fi
34751   fi
34752 
34753   # Now new_path has a complete unix path to the binary
34754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34755     # Keep paths in /bin as-is, but remove trailing .exe if any
34756     new_path="${new_path/%.exe/}"
34757     # Do not save /bin paths to all_fixpath_prefixes!
34758   else
34759     # Not in mixed or Windows style, start by that.
34760     new_path=`cmd //c echo $new_path`
34761 
34762   input_path="$new_path"
34763   # Check if we need to convert this using DOS-style short mode. If the path
34764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34765   # take no chances and rewrite it.
34766   # Note: m4 eats our [], so we need to use [ and ] instead.
34767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34768   if test "x$has_forbidden_chars" != x; then
34769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34771   fi
34772 
34773     # Output is in $new_path
34774 
34775   windows_path="$new_path"
34776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34777     unix_path=`$CYGPATH -u "$windows_path"`
34778     new_path="$unix_path"
34779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34781     new_path="$unix_path"
34782   fi
34783 
34784     # remove trailing .exe if any
34785     new_path="${new_path/%.exe/}"
34786 
34787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34789   fi
34790 
34791     else
34792       # We're on a unix platform. Hooray! :)
34793       # First separate the path from the arguments. This will split at the first
34794       # space.
34795       complete="$CXX"
34796       path="${complete%% *}"
34797       tmp="$complete EOL"
34798       arguments="${tmp#* }"
34799 
34800       # Cannot rely on the command "which" here since it doesn't always work.
34801       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34802       if test -z "$is_absolute_path"; then
34803         # Path to executable is not absolute. Find it.
34804         IFS_save="$IFS"
34805         IFS=:
34806         for p in $PATH; do
34807           if test -f "$p/$path" && test -x "$p/$path"; then
34808             new_path="$p/$path"
34809             break
34810           fi
34811         done
34812         IFS="$IFS_save"
34813       else
34814         # This is an absolute path, we can use it without further modifications.
34815         new_path="$path"
34816       fi
34817 
34818       if test "x$new_path" = x; then
34819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34820 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34821         has_space=`$ECHO "$complete" | $GREP " "`
34822         if test "x$has_space" != x; then
34823           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34824 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34825         fi
34826         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34827       fi
34828     fi
34829 
34830     # Now join together the path and the arguments once again
34831     if test "x$arguments" != xEOL; then
34832       new_complete="$new_path ${arguments% *}"
34833     else
34834       new_complete="$new_path"
34835     fi
34836 
34837     if test "x$complete" != "x$new_complete"; then
34838       CXX="$new_complete"
34839       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34840 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34841     fi
34842   fi
34843 
34844   TEST_COMPILER="$CXX"
34845 
34846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34847 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34848   SYMLINK_ORIGINAL="$TEST_COMPILER"
34849 
34850   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34851     # Follow a chain of symbolic links. Use readlink
34852     # where it exists, else fall back to horribly
34853     # complicated shell code.
34854     if test "x$READLINK_TESTED" != yes; then
34855       # On MacOSX there is a readlink tool with a different
34856       # purpose than the GNU readlink tool. Check the found readlink.
34857       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34858       if test "x$ISGNU" = x; then
34859         # A readlink that we do not know how to use.
34860         # Are there other non-GNU readlinks out there?
34861         READLINK_TESTED=yes
34862         READLINK=
34863       fi
34864     fi
34865 
34866     if test "x$READLINK" != x; then
34867       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34868     else
34869       # Save the current directory for restoring afterwards
34870       STARTDIR=$PWD
34871       COUNTER=0
34872       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34873       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34874       cd $sym_link_dir
34875       # Use -P flag to resolve symlinks in directories.
34876       cd `$THEPWDCMD -P`
34877       sym_link_dir=`$THEPWDCMD -P`
34878       # Resolve file symlinks
34879       while test $COUNTER -lt 20; do
34880         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34881         if test "x$ISLINK" == x; then
34882           # This is not a symbolic link! We are done!
34883           break
34884         fi
34885         # Again resolve directory symlinks since the target of the just found
34886         # link could be in a different directory
34887         cd `$DIRNAME $ISLINK`
34888         sym_link_dir=`$THEPWDCMD -P`
34889         sym_link_file=`$BASENAME $ISLINK`
34890         let COUNTER=COUNTER+1
34891       done
34892       cd $STARTDIR
34893       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34894     fi
34895   fi
34896 
34897   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34898     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34899 $as_echo "no symlink" >&6; }
34900   else
34901     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34902 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34903 
34904     # We can't handle ccache by gcc wrappers, since we need to know if we're
34905     # using ccache. Instead ccache usage must be controlled by a configure option.
34906     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34907     if test "x$COMPILER_BASENAME" = "xccache"; then
34908       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34909 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34910       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34911     fi
34912   fi
34913 
34914 
34915   COMPILER=$CXX
34916   COMPILER_NAME=$COMPILER_NAME
34917 
34918   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34919     # cc -V output typically looks like
34920     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34921     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34922     # Check that this is likely to be the Solaris Studio cc.
34923     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34924     if test $? -ne 0; then
34925       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34926       { $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
34927 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34928       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34929 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34930       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34931 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34932       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34933     fi
34934     # Remove usage instructions (if present), and
34935     # collapse compiler output into a single line
34936     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34937         $SED -e 's/ *[Uu]sage:.*//'`
34938     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34939         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34940   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34941     # xlc -qversion output typically looks like
34942     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34943     #     Version: 11.01.0000.0015
34944     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34945     # Check that this is likely to be the IBM XL C compiler.
34946     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34947     if test $? -ne 0; then
34948       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34949       { $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
34950 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34951       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34952 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34953       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34954 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34955       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34956     fi
34957     # Collapse compiler output into a single line
34958     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34959     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34960         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34961   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34962     # There is no specific version flag, but all output starts with a version string.
34963     # First line typically looks something like:
34964     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34965     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34966     # Check that this is likely to be Microsoft CL.EXE.
34967     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34968     if test $? -ne 0; then
34969       { $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
34970 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34971       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34972 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34973       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34974     fi
34975     # Collapse compiler output into a single line
34976     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34977     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34978         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34979   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34980     # gcc --version output typically looks like
34981     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34982     #     Copyright (C) 2013 Free Software Foundation, Inc.
34983     #     This is free software; see the source for copying conditions.  There is NO
34984     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34985     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34986     # Check that this is likely to be GCC.
34987     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34988     if test $? -ne 0; then
34989       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34990 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34991       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34992 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34993       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34994     fi
34995     # Remove Copyright and legalese from version string, and
34996     # collapse into a single line
34997     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34998         $SED -e 's/ *Copyright .*//'`
34999     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35000         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35001   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35002     # clang --version output typically looks like
35003     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35004     #    clang version 3.3 (tags/RELEASE_33/final)
35005     # or
35006     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35007     #    Target: x86_64-pc-linux-gnu
35008     #    Thread model: posix
35009     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35010     # Check that this is likely to be clang
35011     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35012     if test $? -ne 0; then
35013       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
35014 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35015       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35016 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35017       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35018     fi
35019     # Collapse compiler output into a single line
35020     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35021     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35022         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35023   else
35024       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35025   fi
35026   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35027   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35028   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35029   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35030 
35031   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35032 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35033 
35034 
35035   # Now that we have resolved CXX ourself, let autoconf have its go at it
35036   ac_ext=cpp
35037 ac_cpp='$CXXCPP $CPPFLAGS'
35038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35041 if test -z "$CXX"; then
35042   if test -n "$CCC"; then
35043     CXX=$CCC
35044   else
35045     if test -n "$ac_tool_prefix"; then
35046   for ac_prog in $CXX
35047   do
35048     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35049 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35051 $as_echo_n "checking for $ac_word... " >&6; }
35052 if ${ac_cv_prog_CXX+:} false; then :
35053   $as_echo_n "(cached) " >&6
35054 else
35055   if test -n "$CXX"; then
35056   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35057 else
35058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35059 for as_dir in $PATH
35060 do
35061   IFS=$as_save_IFS
35062   test -z "$as_dir" && as_dir=.
35063     for ac_exec_ext in '' $ac_executable_extensions; do
35064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35065     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35067     break 2
35068   fi
35069 done
35070   done
35071 IFS=$as_save_IFS
35072 
35073 fi
35074 fi
35075 CXX=$ac_cv_prog_CXX
35076 if test -n "$CXX"; then
35077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35078 $as_echo "$CXX" >&6; }
35079 else
35080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35081 $as_echo "no" >&6; }
35082 fi
35083 
35084 
35085     test -n "$CXX" && break
35086   done
35087 fi
35088 if test -z "$CXX"; then
35089   ac_ct_CXX=$CXX
35090   for ac_prog in $CXX
35091 do
35092   # Extract the first word of "$ac_prog", so it can be a program name with args.
35093 set dummy $ac_prog; ac_word=$2
35094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35095 $as_echo_n "checking for $ac_word... " >&6; }
35096 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35097   $as_echo_n "(cached) " >&6
35098 else
35099   if test -n "$ac_ct_CXX"; then
35100   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35101 else
35102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35103 for as_dir in $PATH
35104 do
35105   IFS=$as_save_IFS
35106   test -z "$as_dir" && as_dir=.
35107     for ac_exec_ext in '' $ac_executable_extensions; do
35108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35109     ac_cv_prog_ac_ct_CXX="$ac_prog"
35110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35111     break 2
35112   fi
35113 done
35114   done
35115 IFS=$as_save_IFS
35116 
35117 fi
35118 fi
35119 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35120 if test -n "$ac_ct_CXX"; then
35121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35122 $as_echo "$ac_ct_CXX" >&6; }
35123 else
35124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35125 $as_echo "no" >&6; }
35126 fi
35127 
35128 
35129   test -n "$ac_ct_CXX" && break
35130 done
35131 
35132   if test "x$ac_ct_CXX" = x; then
35133     CXX="g++"
35134   else
35135     case $cross_compiling:$ac_tool_warned in
35136 yes:)
35137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35138 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35139 ac_tool_warned=yes ;;
35140 esac
35141     CXX=$ac_ct_CXX
35142   fi
35143 fi
35144 
35145   fi
35146 fi
35147 # Provide some information about the compiler.
35148 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35149 set X $ac_compile
35150 ac_compiler=$2
35151 for ac_option in --version -v -V -qversion; do
35152   { { ac_try="$ac_compiler $ac_option >&5"
35153 case "(($ac_try" in
35154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35155   *) ac_try_echo=$ac_try;;
35156 esac
35157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35158 $as_echo "$ac_try_echo"; } >&5
35159   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35160   ac_status=$?
35161   if test -s conftest.err; then
35162     sed '10a\
35163 ... rest of stderr output deleted ...
35164          10q' conftest.err >conftest.er1
35165     cat conftest.er1 >&5
35166   fi
35167   rm -f conftest.er1 conftest.err
35168   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35169   test $ac_status = 0; }
35170 done
35171 
35172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35173 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35174 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35175   $as_echo_n "(cached) " >&6
35176 else
35177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35178 /* end confdefs.h.  */
35179 
35180 int
35181 main ()
35182 {
35183 #ifndef __GNUC__
35184        choke me
35185 #endif
35186 
35187   ;
35188   return 0;
35189 }
35190 _ACEOF
35191 if ac_fn_cxx_try_compile "$LINENO"; then :
35192   ac_compiler_gnu=yes
35193 else
35194   ac_compiler_gnu=no
35195 fi
35196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35197 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35198 
35199 fi
35200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35201 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35202 if test $ac_compiler_gnu = yes; then
35203   GXX=yes
35204 else
35205   GXX=
35206 fi
35207 ac_test_CXXFLAGS=${CXXFLAGS+set}
35208 ac_save_CXXFLAGS=$CXXFLAGS
35209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35210 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35211 if ${ac_cv_prog_cxx_g+:} false; then :
35212   $as_echo_n "(cached) " >&6
35213 else
35214   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35215    ac_cxx_werror_flag=yes
35216    ac_cv_prog_cxx_g=no
35217    CXXFLAGS="-g"
35218    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35219 /* end confdefs.h.  */
35220 
35221 int
35222 main ()
35223 {
35224 
35225   ;
35226   return 0;
35227 }
35228 _ACEOF
35229 if ac_fn_cxx_try_compile "$LINENO"; then :
35230   ac_cv_prog_cxx_g=yes
35231 else
35232   CXXFLAGS=""
35233       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35234 /* end confdefs.h.  */
35235 
35236 int
35237 main ()
35238 {
35239 
35240   ;
35241   return 0;
35242 }
35243 _ACEOF
35244 if ac_fn_cxx_try_compile "$LINENO"; then :
35245 
35246 else
35247   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35248          CXXFLAGS="-g"
35249          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35250 /* end confdefs.h.  */
35251 
35252 int
35253 main ()
35254 {
35255 
35256   ;
35257   return 0;
35258 }
35259 _ACEOF
35260 if ac_fn_cxx_try_compile "$LINENO"; then :
35261   ac_cv_prog_cxx_g=yes
35262 fi
35263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35264 fi
35265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35266 fi
35267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35268    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35269 fi
35270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35271 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35272 if test "$ac_test_CXXFLAGS" = set; then
35273   CXXFLAGS=$ac_save_CXXFLAGS
35274 elif test $ac_cv_prog_cxx_g = yes; then
35275   if test "$GXX" = yes; then
35276     CXXFLAGS="-g -O2"
35277   else
35278     CXXFLAGS="-g"
35279   fi
35280 else
35281   if test "$GXX" = yes; then
35282     CXXFLAGS="-O2"
35283   else
35284     CXXFLAGS=
35285   fi
35286 fi
35287 ac_ext=cpp
35288 ac_cpp='$CXXCPP $CPPFLAGS'
35289 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35290 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35291 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35292 
35293 
35294   # This is the compiler version number on the form X.Y[.Z]
35295 
35296 
35297 
35298 
35299   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35300     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35301 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35302     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35303 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35304   fi
35305 
35306   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35307   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35308     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35309 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35310   fi
35311 
35312   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35313     { $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
35314 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35315   fi
35316 
35317   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35318 
35319 
35320   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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 
35370     # Execute function body
35371 
35372   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35373   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35374 
35375   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35376     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35377   fi
35378 
35379   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35380     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35381   fi
35382 
35383   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35384   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35385 
35386   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35387     :
35388 
35389   else
35390     :
35391 
35392           { $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
35393 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35394 
35395 
35396   fi
35397 
35398 
35399 
35400 
35401 
35402 
35403 
35404 
35405 
35406 
35407 
35408 
35409 
35410 
35411   fi
35412 
35413   #
35414   # Setup the preprocessor (CPP and CXXCPP)
35415   #
35416   ac_ext=c
35417 ac_cpp='$CPP $CPPFLAGS'
35418 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35419 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35420 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35422 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35423 # On Suns, sometimes $CPP names a directory.
35424 if test -n "$CPP" && test -d "$CPP"; then
35425   CPP=
35426 fi
35427 if test -z "$CPP"; then
35428   if ${ac_cv_prog_CPP+:} false; then :
35429   $as_echo_n "(cached) " >&6
35430 else
35431       # Double quotes because CPP needs to be expanded
35432     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35433     do
35434       ac_preproc_ok=false
35435 for ac_c_preproc_warn_flag in '' yes
35436 do
35437   # Use a header file that comes with gcc, so configuring glibc
35438   # with a fresh cross-compiler works.
35439   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35440   # <limits.h> exists even on freestanding compilers.
35441   # On the NeXT, cc -E runs the code through the compiler's parser,
35442   # not just through cpp. "Syntax error" is here to catch this case.
35443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35444 /* end confdefs.h.  */
35445 #ifdef __STDC__
35446 # include <limits.h>
35447 #else
35448 # include <assert.h>
35449 #endif
35450                      Syntax error
35451 _ACEOF
35452 if ac_fn_c_try_cpp "$LINENO"; then :
35453 
35454 else
35455   # Broken: fails on valid input.
35456 continue
35457 fi
35458 rm -f conftest.err conftest.i conftest.$ac_ext
35459 
35460   # OK, works on sane cases.  Now check whether nonexistent headers
35461   # can be detected and how.
35462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35463 /* end confdefs.h.  */
35464 #include <ac_nonexistent.h>
35465 _ACEOF
35466 if ac_fn_c_try_cpp "$LINENO"; then :
35467   # Broken: success on invalid input.
35468 continue
35469 else
35470   # Passes both tests.
35471 ac_preproc_ok=:
35472 break
35473 fi
35474 rm -f conftest.err conftest.i conftest.$ac_ext
35475 
35476 done
35477 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35478 rm -f conftest.i conftest.err conftest.$ac_ext
35479 if $ac_preproc_ok; then :
35480   break
35481 fi
35482 
35483     done
35484     ac_cv_prog_CPP=$CPP
35485 
35486 fi
35487   CPP=$ac_cv_prog_CPP
35488 else
35489   ac_cv_prog_CPP=$CPP
35490 fi
35491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35492 $as_echo "$CPP" >&6; }
35493 ac_preproc_ok=false
35494 for ac_c_preproc_warn_flag in '' yes
35495 do
35496   # Use a header file that comes with gcc, so configuring glibc
35497   # with a fresh cross-compiler works.
35498   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35499   # <limits.h> exists even on freestanding compilers.
35500   # On the NeXT, cc -E runs the code through the compiler's parser,
35501   # not just through cpp. "Syntax error" is here to catch this case.
35502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35503 /* end confdefs.h.  */
35504 #ifdef __STDC__
35505 # include <limits.h>
35506 #else
35507 # include <assert.h>
35508 #endif
35509                      Syntax error
35510 _ACEOF
35511 if ac_fn_c_try_cpp "$LINENO"; then :
35512 
35513 else
35514   # Broken: fails on valid input.
35515 continue
35516 fi
35517 rm -f conftest.err conftest.i conftest.$ac_ext
35518 
35519   # OK, works on sane cases.  Now check whether nonexistent headers
35520   # can be detected and how.
35521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35522 /* end confdefs.h.  */
35523 #include <ac_nonexistent.h>
35524 _ACEOF
35525 if ac_fn_c_try_cpp "$LINENO"; then :
35526   # Broken: success on invalid input.
35527 continue
35528 else
35529   # Passes both tests.
35530 ac_preproc_ok=:
35531 break
35532 fi
35533 rm -f conftest.err conftest.i conftest.$ac_ext
35534 
35535 done
35536 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35537 rm -f conftest.i conftest.err conftest.$ac_ext
35538 if $ac_preproc_ok; then :
35539 
35540 else
35541   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35542 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35543 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35544 See \`config.log' for more details" "$LINENO" 5; }
35545 fi
35546 
35547 ac_ext=cpp
35548 ac_cpp='$CXXCPP $CPPFLAGS'
35549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35552 
35553 
35554   # Only process if variable expands to non-empty
35555 
35556   if test "x$CPP" != x; then
35557     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35558 
35559   # First separate the path from the arguments. This will split at the first
35560   # space.
35561   complete="$CPP"
35562   path="${complete%% *}"
35563   tmp="$complete EOL"
35564   arguments="${tmp#* }"
35565 
35566   # Input might be given as Windows format, start by converting to
35567   # unix format.
35568   new_path=`$CYGPATH -u "$path"`
35569 
35570   # Now try to locate executable using which
35571   new_path=`$WHICH "$new_path" 2> /dev/null`
35572   # bat and cmd files are not always considered executable in cygwin causing which
35573   # to not find them
35574   if test "x$new_path" = x \
35575       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35576       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35577     new_path=`$CYGPATH -u "$path"`
35578   fi
35579   if test "x$new_path" = x; then
35580     # Oops. Which didn't find the executable.
35581     # The splitting of arguments from the executable at a space might have been incorrect,
35582     # since paths with space are more likely in Windows. Give it another try with the whole
35583     # argument.
35584     path="$complete"
35585     arguments="EOL"
35586     new_path=`$CYGPATH -u "$path"`
35587     new_path=`$WHICH "$new_path" 2> /dev/null`
35588     # bat and cmd files are not always considered executable in cygwin causing which
35589     # to not find them
35590     if test "x$new_path" = x \
35591         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35592         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35593       new_path=`$CYGPATH -u "$path"`
35594     fi
35595     if test "x$new_path" = x; then
35596       # It's still not found. Now this is an unrecoverable error.
35597       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35598 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35599       has_space=`$ECHO "$complete" | $GREP " "`
35600       if test "x$has_space" != x; then
35601         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35602 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35603       fi
35604       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35605     fi
35606   fi
35607 
35608   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35609   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35610   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35611   # "foo.exe" is OK but "foo" is an error.
35612   #
35613   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35614   # It is also a way to make sure we got the proper file name for the real test later on.
35615   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35616   if test "x$test_shortpath" = x; then
35617     # Short path failed, file does not exist as specified.
35618     # Try adding .exe or .cmd
35619     if test -f "${new_path}.exe"; then
35620       input_to_shortpath="${new_path}.exe"
35621     elif test -f "${new_path}.cmd"; then
35622       input_to_shortpath="${new_path}.cmd"
35623     else
35624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35625 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35626       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35627 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35628       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35629     fi
35630   else
35631     input_to_shortpath="$new_path"
35632   fi
35633 
35634   # Call helper function which possibly converts this using DOS-style short mode.
35635   # If so, the updated path is stored in $new_path.
35636   new_path="$input_to_shortpath"
35637 
35638   input_path="$input_to_shortpath"
35639   # Check if we need to convert this using DOS-style short mode. If the path
35640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35641   # take no chances and rewrite it.
35642   # Note: m4 eats our [], so we need to use [ and ] instead.
35643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35644   if test "x$has_forbidden_chars" != x; then
35645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35649       # Going to short mode and back again did indeed matter. Since short mode is
35650       # case insensitive, let's make it lowercase to improve readability.
35651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35652       # Now convert it back to Unix-style (cygpath)
35653       input_path=`$CYGPATH -u "$shortmode_path"`
35654       new_path="$input_path"
35655     fi
35656   fi
35657 
35658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35659   if test "x$test_cygdrive_prefix" = x; then
35660     # As a simple fix, exclude /usr/bin since it's not a real path.
35661     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35663       # a path prefixed by /cygdrive for fixpath to work.
35664       new_path="$CYGWIN_ROOT_PATH$input_path"
35665     fi
35666   fi
35667 
35668   # remove trailing .exe if any
35669   new_path="${new_path/%.exe/}"
35670 
35671     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35672 
35673   # First separate the path from the arguments. This will split at the first
35674   # space.
35675   complete="$CPP"
35676   path="${complete%% *}"
35677   tmp="$complete EOL"
35678   arguments="${tmp#* }"
35679 
35680   # Input might be given as Windows format, start by converting to
35681   # unix format.
35682   new_path="$path"
35683 
35684   windows_path="$new_path"
35685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35686     unix_path=`$CYGPATH -u "$windows_path"`
35687     new_path="$unix_path"
35688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35690     new_path="$unix_path"
35691   fi
35692 
35693 
35694   # Now try to locate executable using which
35695   new_path=`$WHICH "$new_path" 2> /dev/null`
35696 
35697   if test "x$new_path" = x; then
35698     # Oops. Which didn't find the executable.
35699     # The splitting of arguments from the executable at a space might have been incorrect,
35700     # since paths with space are more likely in Windows. Give it another try with the whole
35701     # argument.
35702     path="$complete"
35703     arguments="EOL"
35704     new_path="$path"
35705 
35706   windows_path="$new_path"
35707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35708     unix_path=`$CYGPATH -u "$windows_path"`
35709     new_path="$unix_path"
35710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35712     new_path="$unix_path"
35713   fi
35714 
35715 
35716     new_path=`$WHICH "$new_path" 2> /dev/null`
35717     # bat and cmd files are not always considered executable in MSYS causing which
35718     # to not find them
35719     if test "x$new_path" = x \
35720         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35721         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35722       new_path="$path"
35723 
35724   windows_path="$new_path"
35725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35726     unix_path=`$CYGPATH -u "$windows_path"`
35727     new_path="$unix_path"
35728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35730     new_path="$unix_path"
35731   fi
35732 
35733     fi
35734 
35735     if test "x$new_path" = x; then
35736       # It's still not found. Now this is an unrecoverable error.
35737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35738 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35739       has_space=`$ECHO "$complete" | $GREP " "`
35740       if test "x$has_space" != x; then
35741         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35742 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35743       fi
35744       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35745     fi
35746   fi
35747 
35748   # Now new_path has a complete unix path to the binary
35749   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35750     # Keep paths in /bin as-is, but remove trailing .exe if any
35751     new_path="${new_path/%.exe/}"
35752     # Do not save /bin paths to all_fixpath_prefixes!
35753   else
35754     # Not in mixed or Windows style, start by that.
35755     new_path=`cmd //c echo $new_path`
35756 
35757   input_path="$new_path"
35758   # Check if we need to convert this using DOS-style short mode. If the path
35759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35760   # take no chances and rewrite it.
35761   # Note: m4 eats our [], so we need to use [ and ] instead.
35762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35763   if test "x$has_forbidden_chars" != x; then
35764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35765     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35766   fi
35767 
35768     # Output is in $new_path
35769 
35770   windows_path="$new_path"
35771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35772     unix_path=`$CYGPATH -u "$windows_path"`
35773     new_path="$unix_path"
35774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35776     new_path="$unix_path"
35777   fi
35778 
35779     # remove trailing .exe if any
35780     new_path="${new_path/%.exe/}"
35781 
35782     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35783     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35784   fi
35785 
35786     else
35787       # We're on a unix platform. Hooray! :)
35788       # First separate the path from the arguments. This will split at the first
35789       # space.
35790       complete="$CPP"
35791       path="${complete%% *}"
35792       tmp="$complete EOL"
35793       arguments="${tmp#* }"
35794 
35795       # Cannot rely on the command "which" here since it doesn't always work.
35796       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35797       if test -z "$is_absolute_path"; then
35798         # Path to executable is not absolute. Find it.
35799         IFS_save="$IFS"
35800         IFS=:
35801         for p in $PATH; do
35802           if test -f "$p/$path" && test -x "$p/$path"; then
35803             new_path="$p/$path"
35804             break
35805           fi
35806         done
35807         IFS="$IFS_save"
35808       else
35809         # This is an absolute path, we can use it without further modifications.
35810         new_path="$path"
35811       fi
35812 
35813       if test "x$new_path" = x; then
35814         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35815 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35816         has_space=`$ECHO "$complete" | $GREP " "`
35817         if test "x$has_space" != x; then
35818           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35819 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35820         fi
35821         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35822       fi
35823     fi
35824 
35825     # Now join together the path and the arguments once again
35826     if test "x$arguments" != xEOL; then
35827       new_complete="$new_path ${arguments% *}"
35828     else
35829       new_complete="$new_path"
35830     fi
35831 
35832     if test "x$complete" != "x$new_complete"; then
35833       CPP="$new_complete"
35834       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35835 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35836     fi
35837   fi
35838 
35839   ac_ext=cpp
35840 ac_cpp='$CXXCPP $CPPFLAGS'
35841 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35842 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35843 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35845 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35846 if test -z "$CXXCPP"; then
35847   if ${ac_cv_prog_CXXCPP+:} false; then :
35848   $as_echo_n "(cached) " >&6
35849 else
35850       # Double quotes because CXXCPP needs to be expanded
35851     for CXXCPP in "$CXX -E" "/lib/cpp"
35852     do
35853       ac_preproc_ok=false
35854 for ac_cxx_preproc_warn_flag in '' yes
35855 do
35856   # Use a header file that comes with gcc, so configuring glibc
35857   # with a fresh cross-compiler works.
35858   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35859   # <limits.h> exists even on freestanding compilers.
35860   # On the NeXT, cc -E runs the code through the compiler's parser,
35861   # not just through cpp. "Syntax error" is here to catch this case.
35862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35863 /* end confdefs.h.  */
35864 #ifdef __STDC__
35865 # include <limits.h>
35866 #else
35867 # include <assert.h>
35868 #endif
35869                      Syntax error
35870 _ACEOF
35871 if ac_fn_cxx_try_cpp "$LINENO"; then :
35872 
35873 else
35874   # Broken: fails on valid input.
35875 continue
35876 fi
35877 rm -f conftest.err conftest.i conftest.$ac_ext
35878 
35879   # OK, works on sane cases.  Now check whether nonexistent headers
35880   # can be detected and how.
35881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35882 /* end confdefs.h.  */
35883 #include <ac_nonexistent.h>
35884 _ACEOF
35885 if ac_fn_cxx_try_cpp "$LINENO"; then :
35886   # Broken: success on invalid input.
35887 continue
35888 else
35889   # Passes both tests.
35890 ac_preproc_ok=:
35891 break
35892 fi
35893 rm -f conftest.err conftest.i conftest.$ac_ext
35894 
35895 done
35896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35897 rm -f conftest.i conftest.err conftest.$ac_ext
35898 if $ac_preproc_ok; then :
35899   break
35900 fi
35901 
35902     done
35903     ac_cv_prog_CXXCPP=$CXXCPP
35904 
35905 fi
35906   CXXCPP=$ac_cv_prog_CXXCPP
35907 else
35908   ac_cv_prog_CXXCPP=$CXXCPP
35909 fi
35910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35911 $as_echo "$CXXCPP" >&6; }
35912 ac_preproc_ok=false
35913 for ac_cxx_preproc_warn_flag in '' yes
35914 do
35915   # Use a header file that comes with gcc, so configuring glibc
35916   # with a fresh cross-compiler works.
35917   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35918   # <limits.h> exists even on freestanding compilers.
35919   # On the NeXT, cc -E runs the code through the compiler's parser,
35920   # not just through cpp. "Syntax error" is here to catch this case.
35921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35922 /* end confdefs.h.  */
35923 #ifdef __STDC__
35924 # include <limits.h>
35925 #else
35926 # include <assert.h>
35927 #endif
35928                      Syntax error
35929 _ACEOF
35930 if ac_fn_cxx_try_cpp "$LINENO"; then :
35931 
35932 else
35933   # Broken: fails on valid input.
35934 continue
35935 fi
35936 rm -f conftest.err conftest.i conftest.$ac_ext
35937 
35938   # OK, works on sane cases.  Now check whether nonexistent headers
35939   # can be detected and how.
35940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35941 /* end confdefs.h.  */
35942 #include <ac_nonexistent.h>
35943 _ACEOF
35944 if ac_fn_cxx_try_cpp "$LINENO"; then :
35945   # Broken: success on invalid input.
35946 continue
35947 else
35948   # Passes both tests.
35949 ac_preproc_ok=:
35950 break
35951 fi
35952 rm -f conftest.err conftest.i conftest.$ac_ext
35953 
35954 done
35955 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35956 rm -f conftest.i conftest.err conftest.$ac_ext
35957 if $ac_preproc_ok; then :
35958 
35959 else
35960   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35962 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35963 See \`config.log' for more details" "$LINENO" 5; }
35964 fi
35965 
35966 ac_ext=cpp
35967 ac_cpp='$CXXCPP $CPPFLAGS'
35968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35971 
35972 
35973   # Only process if variable expands to non-empty
35974 
35975   if test "x$CXXCPP" != x; then
35976     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35977 
35978   # First separate the path from the arguments. This will split at the first
35979   # space.
35980   complete="$CXXCPP"
35981   path="${complete%% *}"
35982   tmp="$complete EOL"
35983   arguments="${tmp#* }"
35984 
35985   # Input might be given as Windows format, start by converting to
35986   # unix format.
35987   new_path=`$CYGPATH -u "$path"`
35988 
35989   # Now try to locate executable using which
35990   new_path=`$WHICH "$new_path" 2> /dev/null`
35991   # bat and cmd files are not always considered executable in cygwin causing which
35992   # to not find them
35993   if test "x$new_path" = x \
35994       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35995       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35996     new_path=`$CYGPATH -u "$path"`
35997   fi
35998   if test "x$new_path" = x; then
35999     # Oops. Which didn't find the executable.
36000     # The splitting of arguments from the executable at a space might have been incorrect,
36001     # since paths with space are more likely in Windows. Give it another try with the whole
36002     # argument.
36003     path="$complete"
36004     arguments="EOL"
36005     new_path=`$CYGPATH -u "$path"`
36006     new_path=`$WHICH "$new_path" 2> /dev/null`
36007     # bat and cmd files are not always considered executable in cygwin causing which
36008     # to not find them
36009     if test "x$new_path" = x \
36010         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36011         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36012       new_path=`$CYGPATH -u "$path"`
36013     fi
36014     if test "x$new_path" = x; then
36015       # It's still not found. Now this is an unrecoverable error.
36016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36017 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36018       has_space=`$ECHO "$complete" | $GREP " "`
36019       if test "x$has_space" != x; then
36020         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36021 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36022       fi
36023       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36024     fi
36025   fi
36026 
36027   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36028   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36029   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36030   # "foo.exe" is OK but "foo" is an error.
36031   #
36032   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36033   # It is also a way to make sure we got the proper file name for the real test later on.
36034   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36035   if test "x$test_shortpath" = x; then
36036     # Short path failed, file does not exist as specified.
36037     # Try adding .exe or .cmd
36038     if test -f "${new_path}.exe"; then
36039       input_to_shortpath="${new_path}.exe"
36040     elif test -f "${new_path}.cmd"; then
36041       input_to_shortpath="${new_path}.cmd"
36042     else
36043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36044 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36045       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36046 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36047       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36048     fi
36049   else
36050     input_to_shortpath="$new_path"
36051   fi
36052 
36053   # Call helper function which possibly converts this using DOS-style short mode.
36054   # If so, the updated path is stored in $new_path.
36055   new_path="$input_to_shortpath"
36056 
36057   input_path="$input_to_shortpath"
36058   # Check if we need to convert this using DOS-style short mode. If the path
36059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36060   # take no chances and rewrite it.
36061   # Note: m4 eats our [], so we need to use [ and ] instead.
36062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36063   if test "x$has_forbidden_chars" != x; then
36064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36068       # Going to short mode and back again did indeed matter. Since short mode is
36069       # case insensitive, let's make it lowercase to improve readability.
36070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36071       # Now convert it back to Unix-style (cygpath)
36072       input_path=`$CYGPATH -u "$shortmode_path"`
36073       new_path="$input_path"
36074     fi
36075   fi
36076 
36077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36078   if test "x$test_cygdrive_prefix" = x; then
36079     # As a simple fix, exclude /usr/bin since it's not a real path.
36080     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36082       # a path prefixed by /cygdrive for fixpath to work.
36083       new_path="$CYGWIN_ROOT_PATH$input_path"
36084     fi
36085   fi
36086 
36087   # remove trailing .exe if any
36088   new_path="${new_path/%.exe/}"
36089 
36090     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36091 
36092   # First separate the path from the arguments. This will split at the first
36093   # space.
36094   complete="$CXXCPP"
36095   path="${complete%% *}"
36096   tmp="$complete EOL"
36097   arguments="${tmp#* }"
36098 
36099   # Input might be given as Windows format, start by converting to
36100   # unix format.
36101   new_path="$path"
36102 
36103   windows_path="$new_path"
36104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36105     unix_path=`$CYGPATH -u "$windows_path"`
36106     new_path="$unix_path"
36107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36109     new_path="$unix_path"
36110   fi
36111 
36112 
36113   # Now try to locate executable using which
36114   new_path=`$WHICH "$new_path" 2> /dev/null`
36115 
36116   if test "x$new_path" = x; then
36117     # Oops. Which didn't find the executable.
36118     # The splitting of arguments from the executable at a space might have been incorrect,
36119     # since paths with space are more likely in Windows. Give it another try with the whole
36120     # argument.
36121     path="$complete"
36122     arguments="EOL"
36123     new_path="$path"
36124 
36125   windows_path="$new_path"
36126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36127     unix_path=`$CYGPATH -u "$windows_path"`
36128     new_path="$unix_path"
36129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36131     new_path="$unix_path"
36132   fi
36133 
36134 
36135     new_path=`$WHICH "$new_path" 2> /dev/null`
36136     # bat and cmd files are not always considered executable in MSYS causing which
36137     # to not find them
36138     if test "x$new_path" = x \
36139         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36140         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36141       new_path="$path"
36142 
36143   windows_path="$new_path"
36144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36145     unix_path=`$CYGPATH -u "$windows_path"`
36146     new_path="$unix_path"
36147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36149     new_path="$unix_path"
36150   fi
36151 
36152     fi
36153 
36154     if test "x$new_path" = x; then
36155       # It's still not found. Now this is an unrecoverable error.
36156       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36157 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36158       has_space=`$ECHO "$complete" | $GREP " "`
36159       if test "x$has_space" != x; then
36160         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36161 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36162       fi
36163       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36164     fi
36165   fi
36166 
36167   # Now new_path has a complete unix path to the binary
36168   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36169     # Keep paths in /bin as-is, but remove trailing .exe if any
36170     new_path="${new_path/%.exe/}"
36171     # Do not save /bin paths to all_fixpath_prefixes!
36172   else
36173     # Not in mixed or Windows style, start by that.
36174     new_path=`cmd //c echo $new_path`
36175 
36176   input_path="$new_path"
36177   # Check if we need to convert this using DOS-style short mode. If the path
36178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36179   # take no chances and rewrite it.
36180   # Note: m4 eats our [], so we need to use [ and ] instead.
36181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36182   if test "x$has_forbidden_chars" != x; then
36183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36185   fi
36186 
36187     # Output is in $new_path
36188 
36189   windows_path="$new_path"
36190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36191     unix_path=`$CYGPATH -u "$windows_path"`
36192     new_path="$unix_path"
36193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36195     new_path="$unix_path"
36196   fi
36197 
36198     # remove trailing .exe if any
36199     new_path="${new_path/%.exe/}"
36200 
36201     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36202     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36203   fi
36204 
36205     else
36206       # We're on a unix platform. Hooray! :)
36207       # First separate the path from the arguments. This will split at the first
36208       # space.
36209       complete="$CXXCPP"
36210       path="${complete%% *}"
36211       tmp="$complete EOL"
36212       arguments="${tmp#* }"
36213 
36214       # Cannot rely on the command "which" here since it doesn't always work.
36215       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36216       if test -z "$is_absolute_path"; then
36217         # Path to executable is not absolute. Find it.
36218         IFS_save="$IFS"
36219         IFS=:
36220         for p in $PATH; do
36221           if test -f "$p/$path" && test -x "$p/$path"; then
36222             new_path="$p/$path"
36223             break
36224           fi
36225         done
36226         IFS="$IFS_save"
36227       else
36228         # This is an absolute path, we can use it without further modifications.
36229         new_path="$path"
36230       fi
36231 
36232       if test "x$new_path" = x; then
36233         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36234 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36235         has_space=`$ECHO "$complete" | $GREP " "`
36236         if test "x$has_space" != x; then
36237           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36238 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36239         fi
36240         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36241       fi
36242     fi
36243 
36244     # Now join together the path and the arguments once again
36245     if test "x$arguments" != xEOL; then
36246       new_complete="$new_path ${arguments% *}"
36247     else
36248       new_complete="$new_path"
36249     fi
36250 
36251     if test "x$complete" != "x$new_complete"; then
36252       CXXCPP="$new_complete"
36253       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36254 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36255     fi
36256   fi
36257 
36258 
36259   #
36260   # Setup the linker (LD)
36261   #
36262   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36263     # In the Microsoft toolchain we have a separate LD command "link".
36264     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36265     # a cygwin program for something completely different.
36266     # Extract the first word of "link", so it can be a program name with args.
36267 set dummy link; ac_word=$2
36268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36269 $as_echo_n "checking for $ac_word... " >&6; }
36270 if ${ac_cv_prog_LD+:} false; then :
36271   $as_echo_n "(cached) " >&6
36272 else
36273   if test -n "$LD"; then
36274   ac_cv_prog_LD="$LD" # Let the user override the test.
36275 else
36276   ac_prog_rejected=no
36277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36278 for as_dir in $PATH
36279 do
36280   IFS=$as_save_IFS
36281   test -z "$as_dir" && as_dir=.
36282     for ac_exec_ext in '' $ac_executable_extensions; do
36283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36284     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36285        ac_prog_rejected=yes
36286        continue
36287      fi
36288     ac_cv_prog_LD="link"
36289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36290     break 2
36291   fi
36292 done
36293   done
36294 IFS=$as_save_IFS
36295 
36296 if test $ac_prog_rejected = yes; then
36297   # We found a bogon in the path, so make sure we never use it.
36298   set dummy $ac_cv_prog_LD
36299   shift
36300   if test $# != 0; then
36301     # We chose a different compiler from the bogus one.
36302     # However, it has the same basename, so the bogon will be chosen
36303     # first if we set LD to just the basename; use the full file name.
36304     shift
36305     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36306   fi
36307 fi
36308 fi
36309 fi
36310 LD=$ac_cv_prog_LD
36311 if test -n "$LD"; then
36312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36313 $as_echo "$LD" >&6; }
36314 else
36315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36316 $as_echo "no" >&6; }
36317 fi
36318 
36319 
36320 
36321   # Only process if variable expands to non-empty
36322 
36323   if test "x$LD" != x; then
36324     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36325 
36326   # First separate the path from the arguments. This will split at the first
36327   # space.
36328   complete="$LD"
36329   path="${complete%% *}"
36330   tmp="$complete EOL"
36331   arguments="${tmp#* }"
36332 
36333   # Input might be given as Windows format, start by converting to
36334   # unix format.
36335   new_path=`$CYGPATH -u "$path"`
36336 
36337   # Now try to locate executable using which
36338   new_path=`$WHICH "$new_path" 2> /dev/null`
36339   # bat and cmd files are not always considered executable in cygwin causing which
36340   # to not find them
36341   if test "x$new_path" = x \
36342       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36343       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36344     new_path=`$CYGPATH -u "$path"`
36345   fi
36346   if test "x$new_path" = x; then
36347     # Oops. Which didn't find the executable.
36348     # The splitting of arguments from the executable at a space might have been incorrect,
36349     # since paths with space are more likely in Windows. Give it another try with the whole
36350     # argument.
36351     path="$complete"
36352     arguments="EOL"
36353     new_path=`$CYGPATH -u "$path"`
36354     new_path=`$WHICH "$new_path" 2> /dev/null`
36355     # bat and cmd files are not always considered executable in cygwin causing which
36356     # to not find them
36357     if test "x$new_path" = x \
36358         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36359         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36360       new_path=`$CYGPATH -u "$path"`
36361     fi
36362     if test "x$new_path" = x; then
36363       # It's still not found. Now this is an unrecoverable error.
36364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36365 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36366       has_space=`$ECHO "$complete" | $GREP " "`
36367       if test "x$has_space" != x; then
36368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36370       fi
36371       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36372     fi
36373   fi
36374 
36375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36378   # "foo.exe" is OK but "foo" is an error.
36379   #
36380   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36381   # It is also a way to make sure we got the proper file name for the real test later on.
36382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36383   if test "x$test_shortpath" = x; then
36384     # Short path failed, file does not exist as specified.
36385     # Try adding .exe or .cmd
36386     if test -f "${new_path}.exe"; then
36387       input_to_shortpath="${new_path}.exe"
36388     elif test -f "${new_path}.cmd"; then
36389       input_to_shortpath="${new_path}.cmd"
36390     else
36391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36392 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36393       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36394 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36395       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36396     fi
36397   else
36398     input_to_shortpath="$new_path"
36399   fi
36400 
36401   # Call helper function which possibly converts this using DOS-style short mode.
36402   # If so, the updated path is stored in $new_path.
36403   new_path="$input_to_shortpath"
36404 
36405   input_path="$input_to_shortpath"
36406   # Check if we need to convert this using DOS-style short mode. If the path
36407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36408   # take no chances and rewrite it.
36409   # Note: m4 eats our [], so we need to use [ and ] instead.
36410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36411   if test "x$has_forbidden_chars" != x; then
36412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36416       # Going to short mode and back again did indeed matter. Since short mode is
36417       # case insensitive, let's make it lowercase to improve readability.
36418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36419       # Now convert it back to Unix-style (cygpath)
36420       input_path=`$CYGPATH -u "$shortmode_path"`
36421       new_path="$input_path"
36422     fi
36423   fi
36424 
36425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36426   if test "x$test_cygdrive_prefix" = x; then
36427     # As a simple fix, exclude /usr/bin since it's not a real path.
36428     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36430       # a path prefixed by /cygdrive for fixpath to work.
36431       new_path="$CYGWIN_ROOT_PATH$input_path"
36432     fi
36433   fi
36434 
36435   # remove trailing .exe if any
36436   new_path="${new_path/%.exe/}"
36437 
36438     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36439 
36440   # First separate the path from the arguments. This will split at the first
36441   # space.
36442   complete="$LD"
36443   path="${complete%% *}"
36444   tmp="$complete EOL"
36445   arguments="${tmp#* }"
36446 
36447   # Input might be given as Windows format, start by converting to
36448   # unix format.
36449   new_path="$path"
36450 
36451   windows_path="$new_path"
36452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36453     unix_path=`$CYGPATH -u "$windows_path"`
36454     new_path="$unix_path"
36455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36457     new_path="$unix_path"
36458   fi
36459 
36460 
36461   # Now try to locate executable using which
36462   new_path=`$WHICH "$new_path" 2> /dev/null`
36463 
36464   if test "x$new_path" = x; then
36465     # Oops. Which didn't find the executable.
36466     # The splitting of arguments from the executable at a space might have been incorrect,
36467     # since paths with space are more likely in Windows. Give it another try with the whole
36468     # argument.
36469     path="$complete"
36470     arguments="EOL"
36471     new_path="$path"
36472 
36473   windows_path="$new_path"
36474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36475     unix_path=`$CYGPATH -u "$windows_path"`
36476     new_path="$unix_path"
36477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36479     new_path="$unix_path"
36480   fi
36481 
36482 
36483     new_path=`$WHICH "$new_path" 2> /dev/null`
36484     # bat and cmd files are not always considered executable in MSYS causing which
36485     # to not find them
36486     if test "x$new_path" = x \
36487         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36488         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36489       new_path="$path"
36490 
36491   windows_path="$new_path"
36492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36493     unix_path=`$CYGPATH -u "$windows_path"`
36494     new_path="$unix_path"
36495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36497     new_path="$unix_path"
36498   fi
36499 
36500     fi
36501 
36502     if test "x$new_path" = x; then
36503       # It's still not found. Now this is an unrecoverable error.
36504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36505 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36506       has_space=`$ECHO "$complete" | $GREP " "`
36507       if test "x$has_space" != x; then
36508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36510       fi
36511       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36512     fi
36513   fi
36514 
36515   # Now new_path has a complete unix path to the binary
36516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36517     # Keep paths in /bin as-is, but remove trailing .exe if any
36518     new_path="${new_path/%.exe/}"
36519     # Do not save /bin paths to all_fixpath_prefixes!
36520   else
36521     # Not in mixed or Windows style, start by that.
36522     new_path=`cmd //c echo $new_path`
36523 
36524   input_path="$new_path"
36525   # Check if we need to convert this using DOS-style short mode. If the path
36526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36527   # take no chances and rewrite it.
36528   # Note: m4 eats our [], so we need to use [ and ] instead.
36529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36530   if test "x$has_forbidden_chars" != x; then
36531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36533   fi
36534 
36535     # Output is in $new_path
36536 
36537   windows_path="$new_path"
36538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36539     unix_path=`$CYGPATH -u "$windows_path"`
36540     new_path="$unix_path"
36541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36543     new_path="$unix_path"
36544   fi
36545 
36546     # remove trailing .exe if any
36547     new_path="${new_path/%.exe/}"
36548 
36549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36551   fi
36552 
36553     else
36554       # We're on a unix platform. Hooray! :)
36555       # First separate the path from the arguments. This will split at the first
36556       # space.
36557       complete="$LD"
36558       path="${complete%% *}"
36559       tmp="$complete EOL"
36560       arguments="${tmp#* }"
36561 
36562       # Cannot rely on the command "which" here since it doesn't always work.
36563       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36564       if test -z "$is_absolute_path"; then
36565         # Path to executable is not absolute. Find it.
36566         IFS_save="$IFS"
36567         IFS=:
36568         for p in $PATH; do
36569           if test -f "$p/$path" && test -x "$p/$path"; then
36570             new_path="$p/$path"
36571             break
36572           fi
36573         done
36574         IFS="$IFS_save"
36575       else
36576         # This is an absolute path, we can use it without further modifications.
36577         new_path="$path"
36578       fi
36579 
36580       if test "x$new_path" = x; then
36581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36582 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36583         has_space=`$ECHO "$complete" | $GREP " "`
36584         if test "x$has_space" != x; then
36585           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36586 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36587         fi
36588         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36589       fi
36590     fi
36591 
36592     # Now join together the path and the arguments once again
36593     if test "x$arguments" != xEOL; then
36594       new_complete="$new_path ${arguments% *}"
36595     else
36596       new_complete="$new_path"
36597     fi
36598 
36599     if test "x$complete" != "x$new_complete"; then
36600       LD="$new_complete"
36601       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36602 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36603     fi
36604   fi
36605 
36606     # Verify that we indeed succeeded with this trick.
36607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36608 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36609     "$LD" --version > /dev/null
36610     if test $? -eq 0 ; then
36611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36612 $as_echo "no" >&6; }
36613       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36614     else
36615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36616 $as_echo "yes" >&6; }
36617     fi
36618     LDCXX="$LD"
36619   else
36620     # All other toolchains use the compiler to link.
36621     LD="$CC"
36622     LDCXX="$CXX"
36623   fi
36624 
36625   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36626 
36627 
36628   #
36629   # Setup the assembler (AS)
36630   #
36631   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36632 
36633 
36634   # Publish this variable in the help.
36635 
36636 
36637   if [ -z "${AS+x}" ]; then
36638     # The variable is not set by user, try to locate tool using the code snippet
36639     for ac_prog in as
36640 do
36641   # Extract the first word of "$ac_prog", so it can be a program name with args.
36642 set dummy $ac_prog; ac_word=$2
36643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36644 $as_echo_n "checking for $ac_word... " >&6; }
36645 if ${ac_cv_path_AS+:} false; then :
36646   $as_echo_n "(cached) " >&6
36647 else
36648   case $AS in
36649   [\\/]* | ?:[\\/]*)
36650   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36651   ;;
36652   *)
36653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36654 for as_dir in $PATH
36655 do
36656   IFS=$as_save_IFS
36657   test -z "$as_dir" && as_dir=.
36658     for ac_exec_ext in '' $ac_executable_extensions; do
36659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36660     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36662     break 2
36663   fi
36664 done
36665   done
36666 IFS=$as_save_IFS
36667 
36668   ;;
36669 esac
36670 fi
36671 AS=$ac_cv_path_AS
36672 if test -n "$AS"; then
36673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36674 $as_echo "$AS" >&6; }
36675 else
36676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36677 $as_echo "no" >&6; }
36678 fi
36679 
36680 
36681   test -n "$AS" && break
36682 done
36683 
36684   else
36685     # The variable is set, but is it from the command line or the environment?
36686 
36687     # Try to remove the string !AS! from our list.
36688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36690       # If it failed, the variable was not from the command line. Ignore it,
36691       # but warn the user (except for BASH, which is always set by the calling BASH).
36692       if test "xAS" != xBASH; then
36693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36694 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36695       fi
36696       # Try to locate tool using the code snippet
36697       for ac_prog in as
36698 do
36699   # Extract the first word of "$ac_prog", so it can be a program name with args.
36700 set dummy $ac_prog; ac_word=$2
36701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36702 $as_echo_n "checking for $ac_word... " >&6; }
36703 if ${ac_cv_path_AS+:} false; then :
36704   $as_echo_n "(cached) " >&6
36705 else
36706   case $AS in
36707   [\\/]* | ?:[\\/]*)
36708   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36709   ;;
36710   *)
36711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36712 for as_dir in $PATH
36713 do
36714   IFS=$as_save_IFS
36715   test -z "$as_dir" && as_dir=.
36716     for ac_exec_ext in '' $ac_executable_extensions; do
36717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36718     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36720     break 2
36721   fi
36722 done
36723   done
36724 IFS=$as_save_IFS
36725 
36726   ;;
36727 esac
36728 fi
36729 AS=$ac_cv_path_AS
36730 if test -n "$AS"; then
36731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36732 $as_echo "$AS" >&6; }
36733 else
36734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36735 $as_echo "no" >&6; }
36736 fi
36737 
36738 
36739   test -n "$AS" && break
36740 done
36741 
36742     else
36743       # If it succeeded, then it was overridden by the user. We will use it
36744       # for the tool.
36745 
36746       # First remove it from the list of overridden variables, so we can test
36747       # for unknown variables in the end.
36748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36749 
36750       # Check if we try to supply an empty value
36751       if test "x$AS" = x; then
36752         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36753 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36755 $as_echo_n "checking for AS... " >&6; }
36756         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36757 $as_echo "disabled" >&6; }
36758       else
36759         # Check if the provided tool contains a complete path.
36760         tool_specified="$AS"
36761         tool_basename="${tool_specified##*/}"
36762         if test "x$tool_basename" = "x$tool_specified"; then
36763           # A command without a complete path is provided, search $PATH.
36764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36765 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36766           # Extract the first word of "$tool_basename", so it can be a program name with args.
36767 set dummy $tool_basename; ac_word=$2
36768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36769 $as_echo_n "checking for $ac_word... " >&6; }
36770 if ${ac_cv_path_AS+:} false; then :
36771   $as_echo_n "(cached) " >&6
36772 else
36773   case $AS in
36774   [\\/]* | ?:[\\/]*)
36775   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36776   ;;
36777   *)
36778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36779 for as_dir in $PATH
36780 do
36781   IFS=$as_save_IFS
36782   test -z "$as_dir" && as_dir=.
36783     for ac_exec_ext in '' $ac_executable_extensions; do
36784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36785     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36787     break 2
36788   fi
36789 done
36790   done
36791 IFS=$as_save_IFS
36792 
36793   ;;
36794 esac
36795 fi
36796 AS=$ac_cv_path_AS
36797 if test -n "$AS"; then
36798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36799 $as_echo "$AS" >&6; }
36800 else
36801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36802 $as_echo "no" >&6; }
36803 fi
36804 
36805 
36806           if test "x$AS" = x; then
36807             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36808           fi
36809         else
36810           # Otherwise we believe it is a complete path. Use it as it is.
36811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36812 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36813           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36814 $as_echo_n "checking for AS... " >&6; }
36815           if test ! -x "$tool_specified"; then
36816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36817 $as_echo "not found" >&6; }
36818             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36819           fi
36820           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36821 $as_echo "$tool_specified" >&6; }
36822         fi
36823       fi
36824     fi
36825 
36826   fi
36827 
36828 
36829 
36830   # Only process if variable expands to non-empty
36831 
36832   if test "x$AS" != x; then
36833     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36834 
36835   # First separate the path from the arguments. This will split at the first
36836   # space.
36837   complete="$AS"
36838   path="${complete%% *}"
36839   tmp="$complete EOL"
36840   arguments="${tmp#* }"
36841 
36842   # Input might be given as Windows format, start by converting to
36843   # unix format.
36844   new_path=`$CYGPATH -u "$path"`
36845 
36846   # Now try to locate executable using which
36847   new_path=`$WHICH "$new_path" 2> /dev/null`
36848   # bat and cmd files are not always considered executable in cygwin causing which
36849   # to not find them
36850   if test "x$new_path" = x \
36851       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36852       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36853     new_path=`$CYGPATH -u "$path"`
36854   fi
36855   if test "x$new_path" = x; then
36856     # Oops. Which didn't find the executable.
36857     # The splitting of arguments from the executable at a space might have been incorrect,
36858     # since paths with space are more likely in Windows. Give it another try with the whole
36859     # argument.
36860     path="$complete"
36861     arguments="EOL"
36862     new_path=`$CYGPATH -u "$path"`
36863     new_path=`$WHICH "$new_path" 2> /dev/null`
36864     # bat and cmd files are not always considered executable in cygwin causing which
36865     # to not find them
36866     if test "x$new_path" = x \
36867         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36868         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36869       new_path=`$CYGPATH -u "$path"`
36870     fi
36871     if test "x$new_path" = x; then
36872       # It's still not found. Now this is an unrecoverable error.
36873       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36874 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36875       has_space=`$ECHO "$complete" | $GREP " "`
36876       if test "x$has_space" != x; then
36877         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36878 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36879       fi
36880       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36881     fi
36882   fi
36883 
36884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36887   # "foo.exe" is OK but "foo" is an error.
36888   #
36889   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36890   # It is also a way to make sure we got the proper file name for the real test later on.
36891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36892   if test "x$test_shortpath" = x; then
36893     # Short path failed, file does not exist as specified.
36894     # Try adding .exe or .cmd
36895     if test -f "${new_path}.exe"; then
36896       input_to_shortpath="${new_path}.exe"
36897     elif test -f "${new_path}.cmd"; then
36898       input_to_shortpath="${new_path}.cmd"
36899     else
36900       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36901 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36902       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36903 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36904       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36905     fi
36906   else
36907     input_to_shortpath="$new_path"
36908   fi
36909 
36910   # Call helper function which possibly converts this using DOS-style short mode.
36911   # If so, the updated path is stored in $new_path.
36912   new_path="$input_to_shortpath"
36913 
36914   input_path="$input_to_shortpath"
36915   # Check if we need to convert this using DOS-style short mode. If the path
36916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36917   # take no chances and rewrite it.
36918   # Note: m4 eats our [], so we need to use [ and ] instead.
36919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36920   if test "x$has_forbidden_chars" != x; then
36921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36922     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36923     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36924     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36925       # Going to short mode and back again did indeed matter. Since short mode is
36926       # case insensitive, let's make it lowercase to improve readability.
36927       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36928       # Now convert it back to Unix-style (cygpath)
36929       input_path=`$CYGPATH -u "$shortmode_path"`
36930       new_path="$input_path"
36931     fi
36932   fi
36933 
36934   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36935   if test "x$test_cygdrive_prefix" = x; then
36936     # As a simple fix, exclude /usr/bin since it's not a real path.
36937     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36938       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36939       # a path prefixed by /cygdrive for fixpath to work.
36940       new_path="$CYGWIN_ROOT_PATH$input_path"
36941     fi
36942   fi
36943 
36944   # remove trailing .exe if any
36945   new_path="${new_path/%.exe/}"
36946 
36947     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36948 
36949   # First separate the path from the arguments. This will split at the first
36950   # space.
36951   complete="$AS"
36952   path="${complete%% *}"
36953   tmp="$complete EOL"
36954   arguments="${tmp#* }"
36955 
36956   # Input might be given as Windows format, start by converting to
36957   # unix format.
36958   new_path="$path"
36959 
36960   windows_path="$new_path"
36961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36962     unix_path=`$CYGPATH -u "$windows_path"`
36963     new_path="$unix_path"
36964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36966     new_path="$unix_path"
36967   fi
36968 
36969 
36970   # Now try to locate executable using which
36971   new_path=`$WHICH "$new_path" 2> /dev/null`
36972 
36973   if test "x$new_path" = x; then
36974     # Oops. Which didn't find the executable.
36975     # The splitting of arguments from the executable at a space might have been incorrect,
36976     # since paths with space are more likely in Windows. Give it another try with the whole
36977     # argument.
36978     path="$complete"
36979     arguments="EOL"
36980     new_path="$path"
36981 
36982   windows_path="$new_path"
36983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984     unix_path=`$CYGPATH -u "$windows_path"`
36985     new_path="$unix_path"
36986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36988     new_path="$unix_path"
36989   fi
36990 
36991 
36992     new_path=`$WHICH "$new_path" 2> /dev/null`
36993     # bat and cmd files are not always considered executable in MSYS causing which
36994     # to not find them
36995     if test "x$new_path" = x \
36996         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36997         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36998       new_path="$path"
36999 
37000   windows_path="$new_path"
37001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37002     unix_path=`$CYGPATH -u "$windows_path"`
37003     new_path="$unix_path"
37004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37006     new_path="$unix_path"
37007   fi
37008 
37009     fi
37010 
37011     if test "x$new_path" = x; then
37012       # It's still not found. Now this is an unrecoverable error.
37013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37014 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37015       has_space=`$ECHO "$complete" | $GREP " "`
37016       if test "x$has_space" != x; then
37017         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37018 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37019       fi
37020       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37021     fi
37022   fi
37023 
37024   # Now new_path has a complete unix path to the binary
37025   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37026     # Keep paths in /bin as-is, but remove trailing .exe if any
37027     new_path="${new_path/%.exe/}"
37028     # Do not save /bin paths to all_fixpath_prefixes!
37029   else
37030     # Not in mixed or Windows style, start by that.
37031     new_path=`cmd //c echo $new_path`
37032 
37033   input_path="$new_path"
37034   # Check if we need to convert this using DOS-style short mode. If the path
37035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37036   # take no chances and rewrite it.
37037   # Note: m4 eats our [], so we need to use [ and ] instead.
37038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37039   if test "x$has_forbidden_chars" != x; then
37040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37042   fi
37043 
37044     # Output is in $new_path
37045 
37046   windows_path="$new_path"
37047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37048     unix_path=`$CYGPATH -u "$windows_path"`
37049     new_path="$unix_path"
37050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37052     new_path="$unix_path"
37053   fi
37054 
37055     # remove trailing .exe if any
37056     new_path="${new_path/%.exe/}"
37057 
37058     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37059     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37060   fi
37061 
37062     else
37063       # We're on a unix platform. Hooray! :)
37064       # First separate the path from the arguments. This will split at the first
37065       # space.
37066       complete="$AS"
37067       path="${complete%% *}"
37068       tmp="$complete EOL"
37069       arguments="${tmp#* }"
37070 
37071       # Cannot rely on the command "which" here since it doesn't always work.
37072       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37073       if test -z "$is_absolute_path"; then
37074         # Path to executable is not absolute. Find it.
37075         IFS_save="$IFS"
37076         IFS=:
37077         for p in $PATH; do
37078           if test -f "$p/$path" && test -x "$p/$path"; then
37079             new_path="$p/$path"
37080             break
37081           fi
37082         done
37083         IFS="$IFS_save"
37084       else
37085         # This is an absolute path, we can use it without further modifications.
37086         new_path="$path"
37087       fi
37088 
37089       if test "x$new_path" = x; then
37090         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37091 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37092         has_space=`$ECHO "$complete" | $GREP " "`
37093         if test "x$has_space" != x; then
37094           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37095 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37096         fi
37097         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37098       fi
37099     fi
37100 
37101     # Now join together the path and the arguments once again
37102     if test "x$arguments" != xEOL; then
37103       new_complete="$new_path ${arguments% *}"
37104     else
37105       new_complete="$new_path"
37106     fi
37107 
37108     if test "x$complete" != "x$new_complete"; then
37109       AS="$new_complete"
37110       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37111 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37112     fi
37113   fi
37114 
37115     if test "x$AS" = x; then
37116       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37117     fi
37118   else
37119     # FIXME: is this correct for microsoft?
37120     AS="$CC -c"
37121   fi
37122 
37123 
37124   #
37125   # Setup the archiver (AR)
37126   #
37127   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37128     # The corresponding ar tool is lib.exe (used to create static libraries)
37129     # Extract the first word of "lib", so it can be a program name with args.
37130 set dummy lib; ac_word=$2
37131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37132 $as_echo_n "checking for $ac_word... " >&6; }
37133 if ${ac_cv_prog_AR+:} false; then :
37134   $as_echo_n "(cached) " >&6
37135 else
37136   if test -n "$AR"; then
37137   ac_cv_prog_AR="$AR" # Let the user override the test.
37138 else
37139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37140 for as_dir in $PATH
37141 do
37142   IFS=$as_save_IFS
37143   test -z "$as_dir" && as_dir=.
37144     for ac_exec_ext in '' $ac_executable_extensions; do
37145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37146     ac_cv_prog_AR="lib"
37147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37148     break 2
37149   fi
37150 done
37151   done
37152 IFS=$as_save_IFS
37153 
37154 fi
37155 fi
37156 AR=$ac_cv_prog_AR
37157 if test -n "$AR"; then
37158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37159 $as_echo "$AR" >&6; }
37160 else
37161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37162 $as_echo "no" >&6; }
37163 fi
37164 
37165 
37166   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37167 
37168 
37169   # Publish this variable in the help.
37170 
37171 
37172   if [ -z "${AR+x}" ]; then
37173     # The variable is not set by user, try to locate tool using the code snippet
37174     if test -n "$ac_tool_prefix"; then
37175   for ac_prog in ar gcc-ar
37176   do
37177     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37178 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180 $as_echo_n "checking for $ac_word... " >&6; }
37181 if ${ac_cv_prog_AR+:} false; then :
37182   $as_echo_n "(cached) " >&6
37183 else
37184   if test -n "$AR"; then
37185   ac_cv_prog_AR="$AR" # Let the user override the test.
37186 else
37187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37188 for as_dir in $PATH
37189 do
37190   IFS=$as_save_IFS
37191   test -z "$as_dir" && as_dir=.
37192     for ac_exec_ext in '' $ac_executable_extensions; do
37193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37194     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37196     break 2
37197   fi
37198 done
37199   done
37200 IFS=$as_save_IFS
37201 
37202 fi
37203 fi
37204 AR=$ac_cv_prog_AR
37205 if test -n "$AR"; then
37206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37207 $as_echo "$AR" >&6; }
37208 else
37209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37210 $as_echo "no" >&6; }
37211 fi
37212 
37213 
37214     test -n "$AR" && break
37215   done
37216 fi
37217 if test -z "$AR"; then
37218   ac_ct_AR=$AR
37219   for ac_prog in ar gcc-ar
37220 do
37221   # Extract the first word of "$ac_prog", so it can be a program name with args.
37222 set dummy $ac_prog; ac_word=$2
37223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37224 $as_echo_n "checking for $ac_word... " >&6; }
37225 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37226   $as_echo_n "(cached) " >&6
37227 else
37228   if test -n "$ac_ct_AR"; then
37229   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37230 else
37231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37232 for as_dir in $PATH
37233 do
37234   IFS=$as_save_IFS
37235   test -z "$as_dir" && as_dir=.
37236     for ac_exec_ext in '' $ac_executable_extensions; do
37237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37238     ac_cv_prog_ac_ct_AR="$ac_prog"
37239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37240     break 2
37241   fi
37242 done
37243   done
37244 IFS=$as_save_IFS
37245 
37246 fi
37247 fi
37248 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37249 if test -n "$ac_ct_AR"; then
37250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37251 $as_echo "$ac_ct_AR" >&6; }
37252 else
37253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37254 $as_echo "no" >&6; }
37255 fi
37256 
37257 
37258   test -n "$ac_ct_AR" && break
37259 done
37260 
37261   if test "x$ac_ct_AR" = x; then
37262     AR=""
37263   else
37264     case $cross_compiling:$ac_tool_warned in
37265 yes:)
37266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37268 ac_tool_warned=yes ;;
37269 esac
37270     AR=$ac_ct_AR
37271   fi
37272 fi
37273 
37274   else
37275     # The variable is set, but is it from the command line or the environment?
37276 
37277     # Try to remove the string !AR! from our list.
37278     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37279     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37280       # If it failed, the variable was not from the command line. Ignore it,
37281       # but warn the user (except for BASH, which is always set by the calling BASH).
37282       if test "xAR" != xBASH; then
37283         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37284 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37285       fi
37286       # Try to locate tool using the code snippet
37287       if test -n "$ac_tool_prefix"; then
37288   for ac_prog in ar gcc-ar
37289   do
37290     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37291 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37293 $as_echo_n "checking for $ac_word... " >&6; }
37294 if ${ac_cv_prog_AR+:} false; then :
37295   $as_echo_n "(cached) " >&6
37296 else
37297   if test -n "$AR"; then
37298   ac_cv_prog_AR="$AR" # Let the user override the test.
37299 else
37300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37301 for as_dir in $PATH
37302 do
37303   IFS=$as_save_IFS
37304   test -z "$as_dir" && as_dir=.
37305     for ac_exec_ext in '' $ac_executable_extensions; do
37306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37307     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37309     break 2
37310   fi
37311 done
37312   done
37313 IFS=$as_save_IFS
37314 
37315 fi
37316 fi
37317 AR=$ac_cv_prog_AR
37318 if test -n "$AR"; then
37319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37320 $as_echo "$AR" >&6; }
37321 else
37322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37323 $as_echo "no" >&6; }
37324 fi
37325 
37326 
37327     test -n "$AR" && break
37328   done
37329 fi
37330 if test -z "$AR"; then
37331   ac_ct_AR=$AR
37332   for ac_prog in ar gcc-ar
37333 do
37334   # Extract the first word of "$ac_prog", so it can be a program name with args.
37335 set dummy $ac_prog; ac_word=$2
37336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37337 $as_echo_n "checking for $ac_word... " >&6; }
37338 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37339   $as_echo_n "(cached) " >&6
37340 else
37341   if test -n "$ac_ct_AR"; then
37342   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37343 else
37344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37345 for as_dir in $PATH
37346 do
37347   IFS=$as_save_IFS
37348   test -z "$as_dir" && as_dir=.
37349     for ac_exec_ext in '' $ac_executable_extensions; do
37350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37351     ac_cv_prog_ac_ct_AR="$ac_prog"
37352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37353     break 2
37354   fi
37355 done
37356   done
37357 IFS=$as_save_IFS
37358 
37359 fi
37360 fi
37361 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37362 if test -n "$ac_ct_AR"; then
37363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37364 $as_echo "$ac_ct_AR" >&6; }
37365 else
37366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37367 $as_echo "no" >&6; }
37368 fi
37369 
37370 
37371   test -n "$ac_ct_AR" && break
37372 done
37373 
37374   if test "x$ac_ct_AR" = x; then
37375     AR=""
37376   else
37377     case $cross_compiling:$ac_tool_warned in
37378 yes:)
37379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37380 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37381 ac_tool_warned=yes ;;
37382 esac
37383     AR=$ac_ct_AR
37384   fi
37385 fi
37386 
37387     else
37388       # If it succeeded, then it was overridden by the user. We will use it
37389       # for the tool.
37390 
37391       # First remove it from the list of overridden variables, so we can test
37392       # for unknown variables in the end.
37393       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37394 
37395       # Check if we try to supply an empty value
37396       if test "x$AR" = x; then
37397         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37398 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37399         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37400 $as_echo_n "checking for AR... " >&6; }
37401         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37402 $as_echo "disabled" >&6; }
37403       else
37404         # Check if the provided tool contains a complete path.
37405         tool_specified="$AR"
37406         tool_basename="${tool_specified##*/}"
37407         if test "x$tool_basename" = "x$tool_specified"; then
37408           # A command without a complete path is provided, search $PATH.
37409           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37410 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37411           # Extract the first word of "$tool_basename", so it can be a program name with args.
37412 set dummy $tool_basename; ac_word=$2
37413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37414 $as_echo_n "checking for $ac_word... " >&6; }
37415 if ${ac_cv_path_AR+:} false; then :
37416   $as_echo_n "(cached) " >&6
37417 else
37418   case $AR in
37419   [\\/]* | ?:[\\/]*)
37420   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37421   ;;
37422   *)
37423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37424 for as_dir in $PATH
37425 do
37426   IFS=$as_save_IFS
37427   test -z "$as_dir" && as_dir=.
37428     for ac_exec_ext in '' $ac_executable_extensions; do
37429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37430     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37432     break 2
37433   fi
37434 done
37435   done
37436 IFS=$as_save_IFS
37437 
37438   ;;
37439 esac
37440 fi
37441 AR=$ac_cv_path_AR
37442 if test -n "$AR"; then
37443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37444 $as_echo "$AR" >&6; }
37445 else
37446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37447 $as_echo "no" >&6; }
37448 fi
37449 
37450 
37451           if test "x$AR" = x; then
37452             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37453           fi
37454         else
37455           # Otherwise we believe it is a complete path. Use it as it is.
37456           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37457 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37458           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37459 $as_echo_n "checking for AR... " >&6; }
37460           if test ! -x "$tool_specified"; then
37461             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37462 $as_echo "not found" >&6; }
37463             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37464           fi
37465           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37466 $as_echo "$tool_specified" >&6; }
37467         fi
37468       fi
37469     fi
37470 
37471   fi
37472 
37473 
37474   else
37475 
37476 
37477   # Publish this variable in the help.
37478 
37479 
37480   if [ -z "${AR+x}" ]; then
37481     # The variable is not set by user, try to locate tool using the code snippet
37482     if test -n "$ac_tool_prefix"; then
37483   for ac_prog in ar
37484   do
37485     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37486 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37488 $as_echo_n "checking for $ac_word... " >&6; }
37489 if ${ac_cv_prog_AR+:} false; then :
37490   $as_echo_n "(cached) " >&6
37491 else
37492   if test -n "$AR"; then
37493   ac_cv_prog_AR="$AR" # Let the user override the test.
37494 else
37495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37496 for as_dir in $PATH
37497 do
37498   IFS=$as_save_IFS
37499   test -z "$as_dir" && as_dir=.
37500     for ac_exec_ext in '' $ac_executable_extensions; do
37501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37502     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37504     break 2
37505   fi
37506 done
37507   done
37508 IFS=$as_save_IFS
37509 
37510 fi
37511 fi
37512 AR=$ac_cv_prog_AR
37513 if test -n "$AR"; then
37514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37515 $as_echo "$AR" >&6; }
37516 else
37517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37518 $as_echo "no" >&6; }
37519 fi
37520 
37521 
37522     test -n "$AR" && break
37523   done
37524 fi
37525 if test -z "$AR"; then
37526   ac_ct_AR=$AR
37527   for ac_prog in ar
37528 do
37529   # Extract the first word of "$ac_prog", so it can be a program name with args.
37530 set dummy $ac_prog; ac_word=$2
37531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37532 $as_echo_n "checking for $ac_word... " >&6; }
37533 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37534   $as_echo_n "(cached) " >&6
37535 else
37536   if test -n "$ac_ct_AR"; then
37537   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37538 else
37539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37540 for as_dir in $PATH
37541 do
37542   IFS=$as_save_IFS
37543   test -z "$as_dir" && as_dir=.
37544     for ac_exec_ext in '' $ac_executable_extensions; do
37545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37546     ac_cv_prog_ac_ct_AR="$ac_prog"
37547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37548     break 2
37549   fi
37550 done
37551   done
37552 IFS=$as_save_IFS
37553 
37554 fi
37555 fi
37556 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37557 if test -n "$ac_ct_AR"; then
37558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37559 $as_echo "$ac_ct_AR" >&6; }
37560 else
37561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37562 $as_echo "no" >&6; }
37563 fi
37564 
37565 
37566   test -n "$ac_ct_AR" && break
37567 done
37568 
37569   if test "x$ac_ct_AR" = x; then
37570     AR=""
37571   else
37572     case $cross_compiling:$ac_tool_warned in
37573 yes:)
37574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37575 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37576 ac_tool_warned=yes ;;
37577 esac
37578     AR=$ac_ct_AR
37579   fi
37580 fi
37581 
37582   else
37583     # The variable is set, but is it from the command line or the environment?
37584 
37585     # Try to remove the string !AR! from our list.
37586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37588       # If it failed, the variable was not from the command line. Ignore it,
37589       # but warn the user (except for BASH, which is always set by the calling BASH).
37590       if test "xAR" != xBASH; then
37591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37592 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37593       fi
37594       # Try to locate tool using the code snippet
37595       if test -n "$ac_tool_prefix"; then
37596   for ac_prog in ar
37597   do
37598     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37599 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37601 $as_echo_n "checking for $ac_word... " >&6; }
37602 if ${ac_cv_prog_AR+:} false; then :
37603   $as_echo_n "(cached) " >&6
37604 else
37605   if test -n "$AR"; then
37606   ac_cv_prog_AR="$AR" # Let the user override the test.
37607 else
37608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37609 for as_dir in $PATH
37610 do
37611   IFS=$as_save_IFS
37612   test -z "$as_dir" && as_dir=.
37613     for ac_exec_ext in '' $ac_executable_extensions; do
37614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37615     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37617     break 2
37618   fi
37619 done
37620   done
37621 IFS=$as_save_IFS
37622 
37623 fi
37624 fi
37625 AR=$ac_cv_prog_AR
37626 if test -n "$AR"; then
37627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37628 $as_echo "$AR" >&6; }
37629 else
37630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37631 $as_echo "no" >&6; }
37632 fi
37633 
37634 
37635     test -n "$AR" && break
37636   done
37637 fi
37638 if test -z "$AR"; then
37639   ac_ct_AR=$AR
37640   for ac_prog in ar
37641 do
37642   # Extract the first word of "$ac_prog", so it can be a program name with args.
37643 set dummy $ac_prog; ac_word=$2
37644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37645 $as_echo_n "checking for $ac_word... " >&6; }
37646 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37647   $as_echo_n "(cached) " >&6
37648 else
37649   if test -n "$ac_ct_AR"; then
37650   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37651 else
37652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37653 for as_dir in $PATH
37654 do
37655   IFS=$as_save_IFS
37656   test -z "$as_dir" && as_dir=.
37657     for ac_exec_ext in '' $ac_executable_extensions; do
37658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37659     ac_cv_prog_ac_ct_AR="$ac_prog"
37660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37661     break 2
37662   fi
37663 done
37664   done
37665 IFS=$as_save_IFS
37666 
37667 fi
37668 fi
37669 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37670 if test -n "$ac_ct_AR"; then
37671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37672 $as_echo "$ac_ct_AR" >&6; }
37673 else
37674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37675 $as_echo "no" >&6; }
37676 fi
37677 
37678 
37679   test -n "$ac_ct_AR" && break
37680 done
37681 
37682   if test "x$ac_ct_AR" = x; then
37683     AR=""
37684   else
37685     case $cross_compiling:$ac_tool_warned in
37686 yes:)
37687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37688 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37689 ac_tool_warned=yes ;;
37690 esac
37691     AR=$ac_ct_AR
37692   fi
37693 fi
37694 
37695     else
37696       # If it succeeded, then it was overridden by the user. We will use it
37697       # for the tool.
37698 
37699       # First remove it from the list of overridden variables, so we can test
37700       # for unknown variables in the end.
37701       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37702 
37703       # Check if we try to supply an empty value
37704       if test "x$AR" = x; then
37705         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37706 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37708 $as_echo_n "checking for AR... " >&6; }
37709         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37710 $as_echo "disabled" >&6; }
37711       else
37712         # Check if the provided tool contains a complete path.
37713         tool_specified="$AR"
37714         tool_basename="${tool_specified##*/}"
37715         if test "x$tool_basename" = "x$tool_specified"; then
37716           # A command without a complete path is provided, search $PATH.
37717           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37718 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37719           # Extract the first word of "$tool_basename", so it can be a program name with args.
37720 set dummy $tool_basename; ac_word=$2
37721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37722 $as_echo_n "checking for $ac_word... " >&6; }
37723 if ${ac_cv_path_AR+:} false; then :
37724   $as_echo_n "(cached) " >&6
37725 else
37726   case $AR in
37727   [\\/]* | ?:[\\/]*)
37728   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37729   ;;
37730   *)
37731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37732 for as_dir in $PATH
37733 do
37734   IFS=$as_save_IFS
37735   test -z "$as_dir" && as_dir=.
37736     for ac_exec_ext in '' $ac_executable_extensions; do
37737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37738     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37740     break 2
37741   fi
37742 done
37743   done
37744 IFS=$as_save_IFS
37745 
37746   ;;
37747 esac
37748 fi
37749 AR=$ac_cv_path_AR
37750 if test -n "$AR"; then
37751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37752 $as_echo "$AR" >&6; }
37753 else
37754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37755 $as_echo "no" >&6; }
37756 fi
37757 
37758 
37759           if test "x$AR" = x; then
37760             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37761           fi
37762         else
37763           # Otherwise we believe it is a complete path. Use it as it is.
37764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37765 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37766           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37767 $as_echo_n "checking for AR... " >&6; }
37768           if test ! -x "$tool_specified"; then
37769             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37770 $as_echo "not found" >&6; }
37771             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37772           fi
37773           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37774 $as_echo "$tool_specified" >&6; }
37775         fi
37776       fi
37777     fi
37778 
37779   fi
37780 
37781 
37782   fi
37783 
37784   # Only process if variable expands to non-empty
37785 
37786   if test "x$AR" != x; then
37787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37788 
37789   # First separate the path from the arguments. This will split at the first
37790   # space.
37791   complete="$AR"
37792   path="${complete%% *}"
37793   tmp="$complete EOL"
37794   arguments="${tmp#* }"
37795 
37796   # Input might be given as Windows format, start by converting to
37797   # unix format.
37798   new_path=`$CYGPATH -u "$path"`
37799 
37800   # Now try to locate executable using which
37801   new_path=`$WHICH "$new_path" 2> /dev/null`
37802   # bat and cmd files are not always considered executable in cygwin causing which
37803   # to not find them
37804   if test "x$new_path" = x \
37805       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37806       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37807     new_path=`$CYGPATH -u "$path"`
37808   fi
37809   if test "x$new_path" = x; then
37810     # Oops. Which didn't find the executable.
37811     # The splitting of arguments from the executable at a space might have been incorrect,
37812     # since paths with space are more likely in Windows. Give it another try with the whole
37813     # argument.
37814     path="$complete"
37815     arguments="EOL"
37816     new_path=`$CYGPATH -u "$path"`
37817     new_path=`$WHICH "$new_path" 2> /dev/null`
37818     # bat and cmd files are not always considered executable in cygwin causing which
37819     # to not find them
37820     if test "x$new_path" = x \
37821         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37822         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37823       new_path=`$CYGPATH -u "$path"`
37824     fi
37825     if test "x$new_path" = x; then
37826       # It's still not found. Now this is an unrecoverable error.
37827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37828 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37829       has_space=`$ECHO "$complete" | $GREP " "`
37830       if test "x$has_space" != x; then
37831         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37832 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37833       fi
37834       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37835     fi
37836   fi
37837 
37838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37841   # "foo.exe" is OK but "foo" is an error.
37842   #
37843   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37844   # It is also a way to make sure we got the proper file name for the real test later on.
37845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37846   if test "x$test_shortpath" = x; then
37847     # Short path failed, file does not exist as specified.
37848     # Try adding .exe or .cmd
37849     if test -f "${new_path}.exe"; then
37850       input_to_shortpath="${new_path}.exe"
37851     elif test -f "${new_path}.cmd"; then
37852       input_to_shortpath="${new_path}.cmd"
37853     else
37854       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37855 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37856       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37857 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37858       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37859     fi
37860   else
37861     input_to_shortpath="$new_path"
37862   fi
37863 
37864   # Call helper function which possibly converts this using DOS-style short mode.
37865   # If so, the updated path is stored in $new_path.
37866   new_path="$input_to_shortpath"
37867 
37868   input_path="$input_to_shortpath"
37869   # Check if we need to convert this using DOS-style short mode. If the path
37870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37871   # take no chances and rewrite it.
37872   # Note: m4 eats our [], so we need to use [ and ] instead.
37873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37874   if test "x$has_forbidden_chars" != x; then
37875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37879       # Going to short mode and back again did indeed matter. Since short mode is
37880       # case insensitive, let's make it lowercase to improve readability.
37881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37882       # Now convert it back to Unix-style (cygpath)
37883       input_path=`$CYGPATH -u "$shortmode_path"`
37884       new_path="$input_path"
37885     fi
37886   fi
37887 
37888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37889   if test "x$test_cygdrive_prefix" = x; then
37890     # As a simple fix, exclude /usr/bin since it's not a real path.
37891     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37893       # a path prefixed by /cygdrive for fixpath to work.
37894       new_path="$CYGWIN_ROOT_PATH$input_path"
37895     fi
37896   fi
37897 
37898   # remove trailing .exe if any
37899   new_path="${new_path/%.exe/}"
37900 
37901     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37902 
37903   # First separate the path from the arguments. This will split at the first
37904   # space.
37905   complete="$AR"
37906   path="${complete%% *}"
37907   tmp="$complete EOL"
37908   arguments="${tmp#* }"
37909 
37910   # Input might be given as Windows format, start by converting to
37911   # unix format.
37912   new_path="$path"
37913 
37914   windows_path="$new_path"
37915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37916     unix_path=`$CYGPATH -u "$windows_path"`
37917     new_path="$unix_path"
37918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37920     new_path="$unix_path"
37921   fi
37922 
37923 
37924   # Now try to locate executable using which
37925   new_path=`$WHICH "$new_path" 2> /dev/null`
37926 
37927   if test "x$new_path" = x; then
37928     # Oops. Which didn't find the executable.
37929     # The splitting of arguments from the executable at a space might have been incorrect,
37930     # since paths with space are more likely in Windows. Give it another try with the whole
37931     # argument.
37932     path="$complete"
37933     arguments="EOL"
37934     new_path="$path"
37935 
37936   windows_path="$new_path"
37937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37938     unix_path=`$CYGPATH -u "$windows_path"`
37939     new_path="$unix_path"
37940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37942     new_path="$unix_path"
37943   fi
37944 
37945 
37946     new_path=`$WHICH "$new_path" 2> /dev/null`
37947     # bat and cmd files are not always considered executable in MSYS causing which
37948     # to not find them
37949     if test "x$new_path" = x \
37950         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37951         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37952       new_path="$path"
37953 
37954   windows_path="$new_path"
37955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37956     unix_path=`$CYGPATH -u "$windows_path"`
37957     new_path="$unix_path"
37958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37960     new_path="$unix_path"
37961   fi
37962 
37963     fi
37964 
37965     if test "x$new_path" = x; then
37966       # It's still not found. Now this is an unrecoverable error.
37967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37968 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37969       has_space=`$ECHO "$complete" | $GREP " "`
37970       if test "x$has_space" != x; then
37971         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37973       fi
37974       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37975     fi
37976   fi
37977 
37978   # Now new_path has a complete unix path to the binary
37979   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37980     # Keep paths in /bin as-is, but remove trailing .exe if any
37981     new_path="${new_path/%.exe/}"
37982     # Do not save /bin paths to all_fixpath_prefixes!
37983   else
37984     # Not in mixed or Windows style, start by that.
37985     new_path=`cmd //c echo $new_path`
37986 
37987   input_path="$new_path"
37988   # Check if we need to convert this using DOS-style short mode. If the path
37989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37990   # take no chances and rewrite it.
37991   # Note: m4 eats our [], so we need to use [ and ] instead.
37992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37993   if test "x$has_forbidden_chars" != x; then
37994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37996   fi
37997 
37998     # Output is in $new_path
37999 
38000   windows_path="$new_path"
38001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38002     unix_path=`$CYGPATH -u "$windows_path"`
38003     new_path="$unix_path"
38004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38006     new_path="$unix_path"
38007   fi
38008 
38009     # remove trailing .exe if any
38010     new_path="${new_path/%.exe/}"
38011 
38012     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38013     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38014   fi
38015 
38016     else
38017       # We're on a unix platform. Hooray! :)
38018       # First separate the path from the arguments. This will split at the first
38019       # space.
38020       complete="$AR"
38021       path="${complete%% *}"
38022       tmp="$complete EOL"
38023       arguments="${tmp#* }"
38024 
38025       # Cannot rely on the command "which" here since it doesn't always work.
38026       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38027       if test -z "$is_absolute_path"; then
38028         # Path to executable is not absolute. Find it.
38029         IFS_save="$IFS"
38030         IFS=:
38031         for p in $PATH; do
38032           if test -f "$p/$path" && test -x "$p/$path"; then
38033             new_path="$p/$path"
38034             break
38035           fi
38036         done
38037         IFS="$IFS_save"
38038       else
38039         # This is an absolute path, we can use it without further modifications.
38040         new_path="$path"
38041       fi
38042 
38043       if test "x$new_path" = x; then
38044         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38045 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38046         has_space=`$ECHO "$complete" | $GREP " "`
38047         if test "x$has_space" != x; then
38048           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38049 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38050         fi
38051         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38052       fi
38053     fi
38054 
38055     # Now join together the path and the arguments once again
38056     if test "x$arguments" != xEOL; then
38057       new_complete="$new_path ${arguments% *}"
38058     else
38059       new_complete="$new_path"
38060     fi
38061 
38062     if test "x$complete" != "x$new_complete"; then
38063       AR="$new_complete"
38064       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38065 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38066     fi
38067   fi
38068 
38069 
38070 
38071   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38072 
38073 
38074   # Publish this variable in the help.
38075 
38076 
38077   if [ -z "${LIPO+x}" ]; then
38078     # The variable is not set by user, try to locate tool using the code snippet
38079     for ac_prog in lipo
38080 do
38081   # Extract the first word of "$ac_prog", so it can be a program name with args.
38082 set dummy $ac_prog; ac_word=$2
38083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38084 $as_echo_n "checking for $ac_word... " >&6; }
38085 if ${ac_cv_path_LIPO+:} false; then :
38086   $as_echo_n "(cached) " >&6
38087 else
38088   case $LIPO in
38089   [\\/]* | ?:[\\/]*)
38090   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38091   ;;
38092   *)
38093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38094 for as_dir in $PATH
38095 do
38096   IFS=$as_save_IFS
38097   test -z "$as_dir" && as_dir=.
38098     for ac_exec_ext in '' $ac_executable_extensions; do
38099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38100     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38102     break 2
38103   fi
38104 done
38105   done
38106 IFS=$as_save_IFS
38107 
38108   ;;
38109 esac
38110 fi
38111 LIPO=$ac_cv_path_LIPO
38112 if test -n "$LIPO"; then
38113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38114 $as_echo "$LIPO" >&6; }
38115 else
38116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38117 $as_echo "no" >&6; }
38118 fi
38119 
38120 
38121   test -n "$LIPO" && break
38122 done
38123 
38124   else
38125     # The variable is set, but is it from the command line or the environment?
38126 
38127     # Try to remove the string !LIPO! from our list.
38128     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38129     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38130       # If it failed, the variable was not from the command line. Ignore it,
38131       # but warn the user (except for BASH, which is always set by the calling BASH).
38132       if test "xLIPO" != xBASH; then
38133         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38134 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38135       fi
38136       # Try to locate tool using the code snippet
38137       for ac_prog in lipo
38138 do
38139   # Extract the first word of "$ac_prog", so it can be a program name with args.
38140 set dummy $ac_prog; ac_word=$2
38141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38142 $as_echo_n "checking for $ac_word... " >&6; }
38143 if ${ac_cv_path_LIPO+:} false; then :
38144   $as_echo_n "(cached) " >&6
38145 else
38146   case $LIPO in
38147   [\\/]* | ?:[\\/]*)
38148   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38149   ;;
38150   *)
38151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38152 for as_dir in $PATH
38153 do
38154   IFS=$as_save_IFS
38155   test -z "$as_dir" && as_dir=.
38156     for ac_exec_ext in '' $ac_executable_extensions; do
38157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38158     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38160     break 2
38161   fi
38162 done
38163   done
38164 IFS=$as_save_IFS
38165 
38166   ;;
38167 esac
38168 fi
38169 LIPO=$ac_cv_path_LIPO
38170 if test -n "$LIPO"; then
38171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38172 $as_echo "$LIPO" >&6; }
38173 else
38174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38175 $as_echo "no" >&6; }
38176 fi
38177 
38178 
38179   test -n "$LIPO" && break
38180 done
38181 
38182     else
38183       # If it succeeded, then it was overridden by the user. We will use it
38184       # for the tool.
38185 
38186       # First remove it from the list of overridden variables, so we can test
38187       # for unknown variables in the end.
38188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38189 
38190       # Check if we try to supply an empty value
38191       if test "x$LIPO" = x; then
38192         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38193 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38195 $as_echo_n "checking for LIPO... " >&6; }
38196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38197 $as_echo "disabled" >&6; }
38198       else
38199         # Check if the provided tool contains a complete path.
38200         tool_specified="$LIPO"
38201         tool_basename="${tool_specified##*/}"
38202         if test "x$tool_basename" = "x$tool_specified"; then
38203           # A command without a complete path is provided, search $PATH.
38204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38205 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38206           # Extract the first word of "$tool_basename", so it can be a program name with args.
38207 set dummy $tool_basename; ac_word=$2
38208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38209 $as_echo_n "checking for $ac_word... " >&6; }
38210 if ${ac_cv_path_LIPO+:} false; then :
38211   $as_echo_n "(cached) " >&6
38212 else
38213   case $LIPO in
38214   [\\/]* | ?:[\\/]*)
38215   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38216   ;;
38217   *)
38218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38219 for as_dir in $PATH
38220 do
38221   IFS=$as_save_IFS
38222   test -z "$as_dir" && as_dir=.
38223     for ac_exec_ext in '' $ac_executable_extensions; do
38224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38225     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38227     break 2
38228   fi
38229 done
38230   done
38231 IFS=$as_save_IFS
38232 
38233   ;;
38234 esac
38235 fi
38236 LIPO=$ac_cv_path_LIPO
38237 if test -n "$LIPO"; then
38238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38239 $as_echo "$LIPO" >&6; }
38240 else
38241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38242 $as_echo "no" >&6; }
38243 fi
38244 
38245 
38246           if test "x$LIPO" = x; then
38247             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38248           fi
38249         else
38250           # Otherwise we believe it is a complete path. Use it as it is.
38251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38252 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38253           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38254 $as_echo_n "checking for LIPO... " >&6; }
38255           if test ! -x "$tool_specified"; then
38256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38257 $as_echo "not found" >&6; }
38258             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38259           fi
38260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38261 $as_echo "$tool_specified" >&6; }
38262         fi
38263       fi
38264     fi
38265 
38266   fi
38267 
38268 
38269 
38270   # Only process if variable expands to non-empty
38271 
38272   if test "x$LIPO" != x; then
38273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38274 
38275   # First separate the path from the arguments. This will split at the first
38276   # space.
38277   complete="$LIPO"
38278   path="${complete%% *}"
38279   tmp="$complete EOL"
38280   arguments="${tmp#* }"
38281 
38282   # Input might be given as Windows format, start by converting to
38283   # unix format.
38284   new_path=`$CYGPATH -u "$path"`
38285 
38286   # Now try to locate executable using which
38287   new_path=`$WHICH "$new_path" 2> /dev/null`
38288   # bat and cmd files are not always considered executable in cygwin causing which
38289   # to not find them
38290   if test "x$new_path" = x \
38291       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38292       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38293     new_path=`$CYGPATH -u "$path"`
38294   fi
38295   if test "x$new_path" = x; then
38296     # Oops. Which didn't find the executable.
38297     # The splitting of arguments from the executable at a space might have been incorrect,
38298     # since paths with space are more likely in Windows. Give it another try with the whole
38299     # argument.
38300     path="$complete"
38301     arguments="EOL"
38302     new_path=`$CYGPATH -u "$path"`
38303     new_path=`$WHICH "$new_path" 2> /dev/null`
38304     # bat and cmd files are not always considered executable in cygwin causing which
38305     # to not find them
38306     if test "x$new_path" = x \
38307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38309       new_path=`$CYGPATH -u "$path"`
38310     fi
38311     if test "x$new_path" = x; then
38312       # It's still not found. Now this is an unrecoverable error.
38313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38314 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38315       has_space=`$ECHO "$complete" | $GREP " "`
38316       if test "x$has_space" != x; then
38317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38319       fi
38320       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38321     fi
38322   fi
38323 
38324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38327   # "foo.exe" is OK but "foo" is an error.
38328   #
38329   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38330   # It is also a way to make sure we got the proper file name for the real test later on.
38331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38332   if test "x$test_shortpath" = x; then
38333     # Short path failed, file does not exist as specified.
38334     # Try adding .exe or .cmd
38335     if test -f "${new_path}.exe"; then
38336       input_to_shortpath="${new_path}.exe"
38337     elif test -f "${new_path}.cmd"; then
38338       input_to_shortpath="${new_path}.cmd"
38339     else
38340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38341 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38344       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38345     fi
38346   else
38347     input_to_shortpath="$new_path"
38348   fi
38349 
38350   # Call helper function which possibly converts this using DOS-style short mode.
38351   # If so, the updated path is stored in $new_path.
38352   new_path="$input_to_shortpath"
38353 
38354   input_path="$input_to_shortpath"
38355   # Check if we need to convert this using DOS-style short mode. If the path
38356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38357   # take no chances and rewrite it.
38358   # Note: m4 eats our [], so we need to use [ and ] instead.
38359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38360   if test "x$has_forbidden_chars" != x; then
38361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38365       # Going to short mode and back again did indeed matter. Since short mode is
38366       # case insensitive, let's make it lowercase to improve readability.
38367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38368       # Now convert it back to Unix-style (cygpath)
38369       input_path=`$CYGPATH -u "$shortmode_path"`
38370       new_path="$input_path"
38371     fi
38372   fi
38373 
38374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38375   if test "x$test_cygdrive_prefix" = x; then
38376     # As a simple fix, exclude /usr/bin since it's not a real path.
38377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38379       # a path prefixed by /cygdrive for fixpath to work.
38380       new_path="$CYGWIN_ROOT_PATH$input_path"
38381     fi
38382   fi
38383 
38384   # remove trailing .exe if any
38385   new_path="${new_path/%.exe/}"
38386 
38387     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38388 
38389   # First separate the path from the arguments. This will split at the first
38390   # space.
38391   complete="$LIPO"
38392   path="${complete%% *}"
38393   tmp="$complete EOL"
38394   arguments="${tmp#* }"
38395 
38396   # Input might be given as Windows format, start by converting to
38397   # unix format.
38398   new_path="$path"
38399 
38400   windows_path="$new_path"
38401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38402     unix_path=`$CYGPATH -u "$windows_path"`
38403     new_path="$unix_path"
38404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38406     new_path="$unix_path"
38407   fi
38408 
38409 
38410   # Now try to locate executable using which
38411   new_path=`$WHICH "$new_path" 2> /dev/null`
38412 
38413   if test "x$new_path" = x; then
38414     # Oops. Which didn't find the executable.
38415     # The splitting of arguments from the executable at a space might have been incorrect,
38416     # since paths with space are more likely in Windows. Give it another try with the whole
38417     # argument.
38418     path="$complete"
38419     arguments="EOL"
38420     new_path="$path"
38421 
38422   windows_path="$new_path"
38423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38424     unix_path=`$CYGPATH -u "$windows_path"`
38425     new_path="$unix_path"
38426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38428     new_path="$unix_path"
38429   fi
38430 
38431 
38432     new_path=`$WHICH "$new_path" 2> /dev/null`
38433     # bat and cmd files are not always considered executable in MSYS causing which
38434     # to not find them
38435     if test "x$new_path" = x \
38436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38438       new_path="$path"
38439 
38440   windows_path="$new_path"
38441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38442     unix_path=`$CYGPATH -u "$windows_path"`
38443     new_path="$unix_path"
38444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38446     new_path="$unix_path"
38447   fi
38448 
38449     fi
38450 
38451     if test "x$new_path" = x; then
38452       # It's still not found. Now this is an unrecoverable error.
38453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38454 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38455       has_space=`$ECHO "$complete" | $GREP " "`
38456       if test "x$has_space" != x; then
38457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38459       fi
38460       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38461     fi
38462   fi
38463 
38464   # Now new_path has a complete unix path to the binary
38465   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38466     # Keep paths in /bin as-is, but remove trailing .exe if any
38467     new_path="${new_path/%.exe/}"
38468     # Do not save /bin paths to all_fixpath_prefixes!
38469   else
38470     # Not in mixed or Windows style, start by that.
38471     new_path=`cmd //c echo $new_path`
38472 
38473   input_path="$new_path"
38474   # Check if we need to convert this using DOS-style short mode. If the path
38475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38476   # take no chances and rewrite it.
38477   # Note: m4 eats our [], so we need to use [ and ] instead.
38478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38479   if test "x$has_forbidden_chars" != x; then
38480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38482   fi
38483 
38484     # Output is in $new_path
38485 
38486   windows_path="$new_path"
38487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38488     unix_path=`$CYGPATH -u "$windows_path"`
38489     new_path="$unix_path"
38490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38492     new_path="$unix_path"
38493   fi
38494 
38495     # remove trailing .exe if any
38496     new_path="${new_path/%.exe/}"
38497 
38498     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38499     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38500   fi
38501 
38502     else
38503       # We're on a unix platform. Hooray! :)
38504       # First separate the path from the arguments. This will split at the first
38505       # space.
38506       complete="$LIPO"
38507       path="${complete%% *}"
38508       tmp="$complete EOL"
38509       arguments="${tmp#* }"
38510 
38511       # Cannot rely on the command "which" here since it doesn't always work.
38512       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38513       if test -z "$is_absolute_path"; then
38514         # Path to executable is not absolute. Find it.
38515         IFS_save="$IFS"
38516         IFS=:
38517         for p in $PATH; do
38518           if test -f "$p/$path" && test -x "$p/$path"; then
38519             new_path="$p/$path"
38520             break
38521           fi
38522         done
38523         IFS="$IFS_save"
38524       else
38525         # This is an absolute path, we can use it without further modifications.
38526         new_path="$path"
38527       fi
38528 
38529       if test "x$new_path" = x; then
38530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38531 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38532         has_space=`$ECHO "$complete" | $GREP " "`
38533         if test "x$has_space" != x; then
38534           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38535 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38536         fi
38537         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38538       fi
38539     fi
38540 
38541     # Now join together the path and the arguments once again
38542     if test "x$arguments" != xEOL; then
38543       new_complete="$new_path ${arguments% *}"
38544     else
38545       new_complete="$new_path"
38546     fi
38547 
38548     if test "x$complete" != "x$new_complete"; then
38549       LIPO="$new_complete"
38550       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38551 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38552     fi
38553   fi
38554 
38555   fi
38556 
38557   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38558     # Extract the first word of "mt", so it can be a program name with args.
38559 set dummy mt; ac_word=$2
38560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38561 $as_echo_n "checking for $ac_word... " >&6; }
38562 if ${ac_cv_prog_MT+:} false; then :
38563   $as_echo_n "(cached) " >&6
38564 else
38565   if test -n "$MT"; then
38566   ac_cv_prog_MT="$MT" # Let the user override the test.
38567 else
38568   ac_prog_rejected=no
38569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38570 for as_dir in $PATH
38571 do
38572   IFS=$as_save_IFS
38573   test -z "$as_dir" && as_dir=.
38574     for ac_exec_ext in '' $ac_executable_extensions; do
38575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38576     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38577        ac_prog_rejected=yes
38578        continue
38579      fi
38580     ac_cv_prog_MT="mt"
38581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38582     break 2
38583   fi
38584 done
38585   done
38586 IFS=$as_save_IFS
38587 
38588 if test $ac_prog_rejected = yes; then
38589   # We found a bogon in the path, so make sure we never use it.
38590   set dummy $ac_cv_prog_MT
38591   shift
38592   if test $# != 0; then
38593     # We chose a different compiler from the bogus one.
38594     # However, it has the same basename, so the bogon will be chosen
38595     # first if we set MT to just the basename; use the full file name.
38596     shift
38597     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38598   fi
38599 fi
38600 fi
38601 fi
38602 MT=$ac_cv_prog_MT
38603 if test -n "$MT"; then
38604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38605 $as_echo "$MT" >&6; }
38606 else
38607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38608 $as_echo "no" >&6; }
38609 fi
38610 
38611 
38612 
38613   # Only process if variable expands to non-empty
38614 
38615   if test "x$MT" != x; then
38616     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38617 
38618   # First separate the path from the arguments. This will split at the first
38619   # space.
38620   complete="$MT"
38621   path="${complete%% *}"
38622   tmp="$complete EOL"
38623   arguments="${tmp#* }"
38624 
38625   # Input might be given as Windows format, start by converting to
38626   # unix format.
38627   new_path=`$CYGPATH -u "$path"`
38628 
38629   # Now try to locate executable using which
38630   new_path=`$WHICH "$new_path" 2> /dev/null`
38631   # bat and cmd files are not always considered executable in cygwin causing which
38632   # to not find them
38633   if test "x$new_path" = x \
38634       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38635       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38636     new_path=`$CYGPATH -u "$path"`
38637   fi
38638   if test "x$new_path" = x; then
38639     # Oops. Which didn't find the executable.
38640     # The splitting of arguments from the executable at a space might have been incorrect,
38641     # since paths with space are more likely in Windows. Give it another try with the whole
38642     # argument.
38643     path="$complete"
38644     arguments="EOL"
38645     new_path=`$CYGPATH -u "$path"`
38646     new_path=`$WHICH "$new_path" 2> /dev/null`
38647     # bat and cmd files are not always considered executable in cygwin causing which
38648     # to not find them
38649     if test "x$new_path" = x \
38650         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38651         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38652       new_path=`$CYGPATH -u "$path"`
38653     fi
38654     if test "x$new_path" = x; then
38655       # It's still not found. Now this is an unrecoverable error.
38656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38657 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38658       has_space=`$ECHO "$complete" | $GREP " "`
38659       if test "x$has_space" != x; then
38660         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38662       fi
38663       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38664     fi
38665   fi
38666 
38667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38670   # "foo.exe" is OK but "foo" is an error.
38671   #
38672   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38673   # It is also a way to make sure we got the proper file name for the real test later on.
38674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38675   if test "x$test_shortpath" = x; then
38676     # Short path failed, file does not exist as specified.
38677     # Try adding .exe or .cmd
38678     if test -f "${new_path}.exe"; then
38679       input_to_shortpath="${new_path}.exe"
38680     elif test -f "${new_path}.cmd"; then
38681       input_to_shortpath="${new_path}.cmd"
38682     else
38683       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38684 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38685       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38686 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38687       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38688     fi
38689   else
38690     input_to_shortpath="$new_path"
38691   fi
38692 
38693   # Call helper function which possibly converts this using DOS-style short mode.
38694   # If so, the updated path is stored in $new_path.
38695   new_path="$input_to_shortpath"
38696 
38697   input_path="$input_to_shortpath"
38698   # Check if we need to convert this using DOS-style short mode. If the path
38699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38700   # take no chances and rewrite it.
38701   # Note: m4 eats our [], so we need to use [ and ] instead.
38702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38703   if test "x$has_forbidden_chars" != x; then
38704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38708       # Going to short mode and back again did indeed matter. Since short mode is
38709       # case insensitive, let's make it lowercase to improve readability.
38710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38711       # Now convert it back to Unix-style (cygpath)
38712       input_path=`$CYGPATH -u "$shortmode_path"`
38713       new_path="$input_path"
38714     fi
38715   fi
38716 
38717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38718   if test "x$test_cygdrive_prefix" = x; then
38719     # As a simple fix, exclude /usr/bin since it's not a real path.
38720     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38722       # a path prefixed by /cygdrive for fixpath to work.
38723       new_path="$CYGWIN_ROOT_PATH$input_path"
38724     fi
38725   fi
38726 
38727   # remove trailing .exe if any
38728   new_path="${new_path/%.exe/}"
38729 
38730     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38731 
38732   # First separate the path from the arguments. This will split at the first
38733   # space.
38734   complete="$MT"
38735   path="${complete%% *}"
38736   tmp="$complete EOL"
38737   arguments="${tmp#* }"
38738 
38739   # Input might be given as Windows format, start by converting to
38740   # unix format.
38741   new_path="$path"
38742 
38743   windows_path="$new_path"
38744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38745     unix_path=`$CYGPATH -u "$windows_path"`
38746     new_path="$unix_path"
38747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38748     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38749     new_path="$unix_path"
38750   fi
38751 
38752 
38753   # Now try to locate executable using which
38754   new_path=`$WHICH "$new_path" 2> /dev/null`
38755 
38756   if test "x$new_path" = x; then
38757     # Oops. Which didn't find the executable.
38758     # The splitting of arguments from the executable at a space might have been incorrect,
38759     # since paths with space are more likely in Windows. Give it another try with the whole
38760     # argument.
38761     path="$complete"
38762     arguments="EOL"
38763     new_path="$path"
38764 
38765   windows_path="$new_path"
38766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38767     unix_path=`$CYGPATH -u "$windows_path"`
38768     new_path="$unix_path"
38769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38771     new_path="$unix_path"
38772   fi
38773 
38774 
38775     new_path=`$WHICH "$new_path" 2> /dev/null`
38776     # bat and cmd files are not always considered executable in MSYS causing which
38777     # to not find them
38778     if test "x$new_path" = x \
38779         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38780         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38781       new_path="$path"
38782 
38783   windows_path="$new_path"
38784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38785     unix_path=`$CYGPATH -u "$windows_path"`
38786     new_path="$unix_path"
38787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38789     new_path="$unix_path"
38790   fi
38791 
38792     fi
38793 
38794     if test "x$new_path" = x; then
38795       # It's still not found. Now this is an unrecoverable error.
38796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38797 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38798       has_space=`$ECHO "$complete" | $GREP " "`
38799       if test "x$has_space" != x; then
38800         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38801 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38802       fi
38803       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38804     fi
38805   fi
38806 
38807   # Now new_path has a complete unix path to the binary
38808   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38809     # Keep paths in /bin as-is, but remove trailing .exe if any
38810     new_path="${new_path/%.exe/}"
38811     # Do not save /bin paths to all_fixpath_prefixes!
38812   else
38813     # Not in mixed or Windows style, start by that.
38814     new_path=`cmd //c echo $new_path`
38815 
38816   input_path="$new_path"
38817   # Check if we need to convert this using DOS-style short mode. If the path
38818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38819   # take no chances and rewrite it.
38820   # Note: m4 eats our [], so we need to use [ and ] instead.
38821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38822   if test "x$has_forbidden_chars" != x; then
38823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38824     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38825   fi
38826 
38827     # Output is in $new_path
38828 
38829   windows_path="$new_path"
38830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38831     unix_path=`$CYGPATH -u "$windows_path"`
38832     new_path="$unix_path"
38833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38835     new_path="$unix_path"
38836   fi
38837 
38838     # remove trailing .exe if any
38839     new_path="${new_path/%.exe/}"
38840 
38841     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38842     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38843   fi
38844 
38845     else
38846       # We're on a unix platform. Hooray! :)
38847       # First separate the path from the arguments. This will split at the first
38848       # space.
38849       complete="$MT"
38850       path="${complete%% *}"
38851       tmp="$complete EOL"
38852       arguments="${tmp#* }"
38853 
38854       # Cannot rely on the command "which" here since it doesn't always work.
38855       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38856       if test -z "$is_absolute_path"; then
38857         # Path to executable is not absolute. Find it.
38858         IFS_save="$IFS"
38859         IFS=:
38860         for p in $PATH; do
38861           if test -f "$p/$path" && test -x "$p/$path"; then
38862             new_path="$p/$path"
38863             break
38864           fi
38865         done
38866         IFS="$IFS_save"
38867       else
38868         # This is an absolute path, we can use it without further modifications.
38869         new_path="$path"
38870       fi
38871 
38872       if test "x$new_path" = x; then
38873         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38874 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38875         has_space=`$ECHO "$complete" | $GREP " "`
38876         if test "x$has_space" != x; then
38877           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38878 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38879         fi
38880         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38881       fi
38882     fi
38883 
38884     # Now join together the path and the arguments once again
38885     if test "x$arguments" != xEOL; then
38886       new_complete="$new_path ${arguments% *}"
38887     else
38888       new_complete="$new_path"
38889     fi
38890 
38891     if test "x$complete" != "x$new_complete"; then
38892       MT="$new_complete"
38893       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38894 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38895     fi
38896   fi
38897 
38898     # Setup the resource compiler (RC)
38899     # Extract the first word of "rc", so it can be a program name with args.
38900 set dummy rc; ac_word=$2
38901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38902 $as_echo_n "checking for $ac_word... " >&6; }
38903 if ${ac_cv_prog_RC+:} false; then :
38904   $as_echo_n "(cached) " >&6
38905 else
38906   if test -n "$RC"; then
38907   ac_cv_prog_RC="$RC" # Let the user override the test.
38908 else
38909   ac_prog_rejected=no
38910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38911 for as_dir in $PATH
38912 do
38913   IFS=$as_save_IFS
38914   test -z "$as_dir" && as_dir=.
38915     for ac_exec_ext in '' $ac_executable_extensions; do
38916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38917     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38918        ac_prog_rejected=yes
38919        continue
38920      fi
38921     ac_cv_prog_RC="rc"
38922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38923     break 2
38924   fi
38925 done
38926   done
38927 IFS=$as_save_IFS
38928 
38929 if test $ac_prog_rejected = yes; then
38930   # We found a bogon in the path, so make sure we never use it.
38931   set dummy $ac_cv_prog_RC
38932   shift
38933   if test $# != 0; then
38934     # We chose a different compiler from the bogus one.
38935     # However, it has the same basename, so the bogon will be chosen
38936     # first if we set RC to just the basename; use the full file name.
38937     shift
38938     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38939   fi
38940 fi
38941 fi
38942 fi
38943 RC=$ac_cv_prog_RC
38944 if test -n "$RC"; then
38945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38946 $as_echo "$RC" >&6; }
38947 else
38948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38949 $as_echo "no" >&6; }
38950 fi
38951 
38952 
38953 
38954   # Only process if variable expands to non-empty
38955 
38956   if test "x$RC" != x; then
38957     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38958 
38959   # First separate the path from the arguments. This will split at the first
38960   # space.
38961   complete="$RC"
38962   path="${complete%% *}"
38963   tmp="$complete EOL"
38964   arguments="${tmp#* }"
38965 
38966   # Input might be given as Windows format, start by converting to
38967   # unix format.
38968   new_path=`$CYGPATH -u "$path"`
38969 
38970   # Now try to locate executable using which
38971   new_path=`$WHICH "$new_path" 2> /dev/null`
38972   # bat and cmd files are not always considered executable in cygwin causing which
38973   # to not find them
38974   if test "x$new_path" = x \
38975       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38976       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38977     new_path=`$CYGPATH -u "$path"`
38978   fi
38979   if test "x$new_path" = x; then
38980     # Oops. Which didn't find the executable.
38981     # The splitting of arguments from the executable at a space might have been incorrect,
38982     # since paths with space are more likely in Windows. Give it another try with the whole
38983     # argument.
38984     path="$complete"
38985     arguments="EOL"
38986     new_path=`$CYGPATH -u "$path"`
38987     new_path=`$WHICH "$new_path" 2> /dev/null`
38988     # bat and cmd files are not always considered executable in cygwin causing which
38989     # to not find them
38990     if test "x$new_path" = x \
38991         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38992         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38993       new_path=`$CYGPATH -u "$path"`
38994     fi
38995     if test "x$new_path" = x; then
38996       # It's still not found. Now this is an unrecoverable error.
38997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38998 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38999       has_space=`$ECHO "$complete" | $GREP " "`
39000       if test "x$has_space" != x; then
39001         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39002 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39003       fi
39004       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39005     fi
39006   fi
39007 
39008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39011   # "foo.exe" is OK but "foo" is an error.
39012   #
39013   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39014   # It is also a way to make sure we got the proper file name for the real test later on.
39015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39016   if test "x$test_shortpath" = x; then
39017     # Short path failed, file does not exist as specified.
39018     # Try adding .exe or .cmd
39019     if test -f "${new_path}.exe"; then
39020       input_to_shortpath="${new_path}.exe"
39021     elif test -f "${new_path}.cmd"; then
39022       input_to_shortpath="${new_path}.cmd"
39023     else
39024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39025 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39026       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39027 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39028       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39029     fi
39030   else
39031     input_to_shortpath="$new_path"
39032   fi
39033 
39034   # Call helper function which possibly converts this using DOS-style short mode.
39035   # If so, the updated path is stored in $new_path.
39036   new_path="$input_to_shortpath"
39037 
39038   input_path="$input_to_shortpath"
39039   # Check if we need to convert this using DOS-style short mode. If the path
39040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39041   # take no chances and rewrite it.
39042   # Note: m4 eats our [], so we need to use [ and ] instead.
39043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39044   if test "x$has_forbidden_chars" != x; then
39045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39049       # Going to short mode and back again did indeed matter. Since short mode is
39050       # case insensitive, let's make it lowercase to improve readability.
39051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39052       # Now convert it back to Unix-style (cygpath)
39053       input_path=`$CYGPATH -u "$shortmode_path"`
39054       new_path="$input_path"
39055     fi
39056   fi
39057 
39058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39059   if test "x$test_cygdrive_prefix" = x; then
39060     # As a simple fix, exclude /usr/bin since it's not a real path.
39061     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39063       # a path prefixed by /cygdrive for fixpath to work.
39064       new_path="$CYGWIN_ROOT_PATH$input_path"
39065     fi
39066   fi
39067 
39068   # remove trailing .exe if any
39069   new_path="${new_path/%.exe/}"
39070 
39071     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072 
39073   # First separate the path from the arguments. This will split at the first
39074   # space.
39075   complete="$RC"
39076   path="${complete%% *}"
39077   tmp="$complete EOL"
39078   arguments="${tmp#* }"
39079 
39080   # Input might be given as Windows format, start by converting to
39081   # unix format.
39082   new_path="$path"
39083 
39084   windows_path="$new_path"
39085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39086     unix_path=`$CYGPATH -u "$windows_path"`
39087     new_path="$unix_path"
39088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39090     new_path="$unix_path"
39091   fi
39092 
39093 
39094   # Now try to locate executable using which
39095   new_path=`$WHICH "$new_path" 2> /dev/null`
39096 
39097   if test "x$new_path" = x; then
39098     # Oops. Which didn't find the executable.
39099     # The splitting of arguments from the executable at a space might have been incorrect,
39100     # since paths with space are more likely in Windows. Give it another try with the whole
39101     # argument.
39102     path="$complete"
39103     arguments="EOL"
39104     new_path="$path"
39105 
39106   windows_path="$new_path"
39107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39108     unix_path=`$CYGPATH -u "$windows_path"`
39109     new_path="$unix_path"
39110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39112     new_path="$unix_path"
39113   fi
39114 
39115 
39116     new_path=`$WHICH "$new_path" 2> /dev/null`
39117     # bat and cmd files are not always considered executable in MSYS causing which
39118     # to not find them
39119     if test "x$new_path" = x \
39120         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39121         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39122       new_path="$path"
39123 
39124   windows_path="$new_path"
39125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39126     unix_path=`$CYGPATH -u "$windows_path"`
39127     new_path="$unix_path"
39128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39130     new_path="$unix_path"
39131   fi
39132 
39133     fi
39134 
39135     if test "x$new_path" = x; then
39136       # It's still not found. Now this is an unrecoverable error.
39137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39138 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39139       has_space=`$ECHO "$complete" | $GREP " "`
39140       if test "x$has_space" != x; then
39141         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39142 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39143       fi
39144       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39145     fi
39146   fi
39147 
39148   # Now new_path has a complete unix path to the binary
39149   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39150     # Keep paths in /bin as-is, but remove trailing .exe if any
39151     new_path="${new_path/%.exe/}"
39152     # Do not save /bin paths to all_fixpath_prefixes!
39153   else
39154     # Not in mixed or Windows style, start by that.
39155     new_path=`cmd //c echo $new_path`
39156 
39157   input_path="$new_path"
39158   # Check if we need to convert this using DOS-style short mode. If the path
39159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39160   # take no chances and rewrite it.
39161   # Note: m4 eats our [], so we need to use [ and ] instead.
39162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39163   if test "x$has_forbidden_chars" != x; then
39164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39166   fi
39167 
39168     # Output is in $new_path
39169 
39170   windows_path="$new_path"
39171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39172     unix_path=`$CYGPATH -u "$windows_path"`
39173     new_path="$unix_path"
39174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39176     new_path="$unix_path"
39177   fi
39178 
39179     # remove trailing .exe if any
39180     new_path="${new_path/%.exe/}"
39181 
39182     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39183     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39184   fi
39185 
39186     else
39187       # We're on a unix platform. Hooray! :)
39188       # First separate the path from the arguments. This will split at the first
39189       # space.
39190       complete="$RC"
39191       path="${complete%% *}"
39192       tmp="$complete EOL"
39193       arguments="${tmp#* }"
39194 
39195       # Cannot rely on the command "which" here since it doesn't always work.
39196       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39197       if test -z "$is_absolute_path"; then
39198         # Path to executable is not absolute. Find it.
39199         IFS_save="$IFS"
39200         IFS=:
39201         for p in $PATH; do
39202           if test -f "$p/$path" && test -x "$p/$path"; then
39203             new_path="$p/$path"
39204             break
39205           fi
39206         done
39207         IFS="$IFS_save"
39208       else
39209         # This is an absolute path, we can use it without further modifications.
39210         new_path="$path"
39211       fi
39212 
39213       if test "x$new_path" = x; then
39214         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39215 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39216         has_space=`$ECHO "$complete" | $GREP " "`
39217         if test "x$has_space" != x; then
39218           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39219 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39220         fi
39221         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39222       fi
39223     fi
39224 
39225     # Now join together the path and the arguments once again
39226     if test "x$arguments" != xEOL; then
39227       new_complete="$new_path ${arguments% *}"
39228     else
39229       new_complete="$new_path"
39230     fi
39231 
39232     if test "x$complete" != "x$new_complete"; then
39233       RC="$new_complete"
39234       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39235 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39236     fi
39237   fi
39238 
39239     # Extract the first word of "dumpbin", so it can be a program name with args.
39240 set dummy dumpbin; ac_word=$2
39241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39242 $as_echo_n "checking for $ac_word... " >&6; }
39243 if ${ac_cv_prog_DUMPBIN+:} false; then :
39244   $as_echo_n "(cached) " >&6
39245 else
39246   if test -n "$DUMPBIN"; then
39247   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39248 else
39249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39250 for as_dir in $PATH
39251 do
39252   IFS=$as_save_IFS
39253   test -z "$as_dir" && as_dir=.
39254     for ac_exec_ext in '' $ac_executable_extensions; do
39255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39256     ac_cv_prog_DUMPBIN="dumpbin"
39257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39258     break 2
39259   fi
39260 done
39261   done
39262 IFS=$as_save_IFS
39263 
39264 fi
39265 fi
39266 DUMPBIN=$ac_cv_prog_DUMPBIN
39267 if test -n "$DUMPBIN"; then
39268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39269 $as_echo "$DUMPBIN" >&6; }
39270 else
39271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39272 $as_echo "no" >&6; }
39273 fi
39274 
39275 
39276 
39277   # Only process if variable expands to non-empty
39278 
39279   if test "x$DUMPBIN" != x; then
39280     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39281 
39282   # First separate the path from the arguments. This will split at the first
39283   # space.
39284   complete="$DUMPBIN"
39285   path="${complete%% *}"
39286   tmp="$complete EOL"
39287   arguments="${tmp#* }"
39288 
39289   # Input might be given as Windows format, start by converting to
39290   # unix format.
39291   new_path=`$CYGPATH -u "$path"`
39292 
39293   # Now try to locate executable using which
39294   new_path=`$WHICH "$new_path" 2> /dev/null`
39295   # bat and cmd files are not always considered executable in cygwin causing which
39296   # to not find them
39297   if test "x$new_path" = x \
39298       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39299       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39300     new_path=`$CYGPATH -u "$path"`
39301   fi
39302   if test "x$new_path" = x; then
39303     # Oops. Which didn't find the executable.
39304     # The splitting of arguments from the executable at a space might have been incorrect,
39305     # since paths with space are more likely in Windows. Give it another try with the whole
39306     # argument.
39307     path="$complete"
39308     arguments="EOL"
39309     new_path=`$CYGPATH -u "$path"`
39310     new_path=`$WHICH "$new_path" 2> /dev/null`
39311     # bat and cmd files are not always considered executable in cygwin causing which
39312     # to not find them
39313     if test "x$new_path" = x \
39314         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39315         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39316       new_path=`$CYGPATH -u "$path"`
39317     fi
39318     if test "x$new_path" = x; then
39319       # It's still not found. Now this is an unrecoverable error.
39320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39321 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39322       has_space=`$ECHO "$complete" | $GREP " "`
39323       if test "x$has_space" != x; then
39324         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39325 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39326       fi
39327       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39328     fi
39329   fi
39330 
39331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39334   # "foo.exe" is OK but "foo" is an error.
39335   #
39336   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39337   # It is also a way to make sure we got the proper file name for the real test later on.
39338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39339   if test "x$test_shortpath" = x; then
39340     # Short path failed, file does not exist as specified.
39341     # Try adding .exe or .cmd
39342     if test -f "${new_path}.exe"; then
39343       input_to_shortpath="${new_path}.exe"
39344     elif test -f "${new_path}.cmd"; then
39345       input_to_shortpath="${new_path}.cmd"
39346     else
39347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39348 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39349       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39350 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39351       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39352     fi
39353   else
39354     input_to_shortpath="$new_path"
39355   fi
39356 
39357   # Call helper function which possibly converts this using DOS-style short mode.
39358   # If so, the updated path is stored in $new_path.
39359   new_path="$input_to_shortpath"
39360 
39361   input_path="$input_to_shortpath"
39362   # Check if we need to convert this using DOS-style short mode. If the path
39363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39364   # take no chances and rewrite it.
39365   # Note: m4 eats our [], so we need to use [ and ] instead.
39366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39367   if test "x$has_forbidden_chars" != x; then
39368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39372       # Going to short mode and back again did indeed matter. Since short mode is
39373       # case insensitive, let's make it lowercase to improve readability.
39374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39375       # Now convert it back to Unix-style (cygpath)
39376       input_path=`$CYGPATH -u "$shortmode_path"`
39377       new_path="$input_path"
39378     fi
39379   fi
39380 
39381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39382   if test "x$test_cygdrive_prefix" = x; then
39383     # As a simple fix, exclude /usr/bin since it's not a real path.
39384     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39386       # a path prefixed by /cygdrive for fixpath to work.
39387       new_path="$CYGWIN_ROOT_PATH$input_path"
39388     fi
39389   fi
39390 
39391   # remove trailing .exe if any
39392   new_path="${new_path/%.exe/}"
39393 
39394     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39395 
39396   # First separate the path from the arguments. This will split at the first
39397   # space.
39398   complete="$DUMPBIN"
39399   path="${complete%% *}"
39400   tmp="$complete EOL"
39401   arguments="${tmp#* }"
39402 
39403   # Input might be given as Windows format, start by converting to
39404   # unix format.
39405   new_path="$path"
39406 
39407   windows_path="$new_path"
39408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39409     unix_path=`$CYGPATH -u "$windows_path"`
39410     new_path="$unix_path"
39411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39413     new_path="$unix_path"
39414   fi
39415 
39416 
39417   # Now try to locate executable using which
39418   new_path=`$WHICH "$new_path" 2> /dev/null`
39419 
39420   if test "x$new_path" = x; then
39421     # Oops. Which didn't find the executable.
39422     # The splitting of arguments from the executable at a space might have been incorrect,
39423     # since paths with space are more likely in Windows. Give it another try with the whole
39424     # argument.
39425     path="$complete"
39426     arguments="EOL"
39427     new_path="$path"
39428 
39429   windows_path="$new_path"
39430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39431     unix_path=`$CYGPATH -u "$windows_path"`
39432     new_path="$unix_path"
39433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39435     new_path="$unix_path"
39436   fi
39437 
39438 
39439     new_path=`$WHICH "$new_path" 2> /dev/null`
39440     # bat and cmd files are not always considered executable in MSYS causing which
39441     # to not find them
39442     if test "x$new_path" = x \
39443         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39444         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39445       new_path="$path"
39446 
39447   windows_path="$new_path"
39448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39449     unix_path=`$CYGPATH -u "$windows_path"`
39450     new_path="$unix_path"
39451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39453     new_path="$unix_path"
39454   fi
39455 
39456     fi
39457 
39458     if test "x$new_path" = x; then
39459       # It's still not found. Now this is an unrecoverable error.
39460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39461 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39462       has_space=`$ECHO "$complete" | $GREP " "`
39463       if test "x$has_space" != x; then
39464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39466       fi
39467       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39468     fi
39469   fi
39470 
39471   # Now new_path has a complete unix path to the binary
39472   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39473     # Keep paths in /bin as-is, but remove trailing .exe if any
39474     new_path="${new_path/%.exe/}"
39475     # Do not save /bin paths to all_fixpath_prefixes!
39476   else
39477     # Not in mixed or Windows style, start by that.
39478     new_path=`cmd //c echo $new_path`
39479 
39480   input_path="$new_path"
39481   # Check if we need to convert this using DOS-style short mode. If the path
39482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39483   # take no chances and rewrite it.
39484   # Note: m4 eats our [], so we need to use [ and ] instead.
39485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39486   if test "x$has_forbidden_chars" != x; then
39487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39489   fi
39490 
39491     # Output is in $new_path
39492 
39493   windows_path="$new_path"
39494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39495     unix_path=`$CYGPATH -u "$windows_path"`
39496     new_path="$unix_path"
39497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39499     new_path="$unix_path"
39500   fi
39501 
39502     # remove trailing .exe if any
39503     new_path="${new_path/%.exe/}"
39504 
39505     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39506     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39507   fi
39508 
39509     else
39510       # We're on a unix platform. Hooray! :)
39511       # First separate the path from the arguments. This will split at the first
39512       # space.
39513       complete="$DUMPBIN"
39514       path="${complete%% *}"
39515       tmp="$complete EOL"
39516       arguments="${tmp#* }"
39517 
39518       # Cannot rely on the command "which" here since it doesn't always work.
39519       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39520       if test -z "$is_absolute_path"; then
39521         # Path to executable is not absolute. Find it.
39522         IFS_save="$IFS"
39523         IFS=:
39524         for p in $PATH; do
39525           if test -f "$p/$path" && test -x "$p/$path"; then
39526             new_path="$p/$path"
39527             break
39528           fi
39529         done
39530         IFS="$IFS_save"
39531       else
39532         # This is an absolute path, we can use it without further modifications.
39533         new_path="$path"
39534       fi
39535 
39536       if test "x$new_path" = x; then
39537         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39538 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39539         has_space=`$ECHO "$complete" | $GREP " "`
39540         if test "x$has_space" != x; then
39541           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39542 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39543         fi
39544         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39545       fi
39546     fi
39547 
39548     # Now join together the path and the arguments once again
39549     if test "x$arguments" != xEOL; then
39550       new_complete="$new_path ${arguments% *}"
39551     else
39552       new_complete="$new_path"
39553     fi
39554 
39555     if test "x$complete" != "x$new_complete"; then
39556       DUMPBIN="$new_complete"
39557       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39558 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39559     fi
39560   fi
39561 
39562     # We need to check for 'msbuild.exe' because at the place where we expect to
39563     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39564     # won't find the 'msbuild.exe' executable in that case (and the
39565     # 'ac_executable_extensions' is unusable due to performance reasons).
39566     # Notice that we intentionally don't fix up the path to MSBUILD because we
39567     # will call it in a DOS shell during freetype detection on Windows (see
39568     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39569     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39570 set dummy msbuild.exe; ac_word=$2
39571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39572 $as_echo_n "checking for $ac_word... " >&6; }
39573 if ${ac_cv_prog_MSBUILD+:} false; then :
39574   $as_echo_n "(cached) " >&6
39575 else
39576   if test -n "$MSBUILD"; then
39577   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39578 else
39579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39580 for as_dir in $PATH
39581 do
39582   IFS=$as_save_IFS
39583   test -z "$as_dir" && as_dir=.
39584     for ac_exec_ext in '' $ac_executable_extensions; do
39585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39586     ac_cv_prog_MSBUILD="msbuild.exe"
39587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39588     break 2
39589   fi
39590 done
39591   done
39592 IFS=$as_save_IFS
39593 
39594 fi
39595 fi
39596 MSBUILD=$ac_cv_prog_MSBUILD
39597 if test -n "$MSBUILD"; then
39598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39599 $as_echo "$MSBUILD" >&6; }
39600 else
39601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39602 $as_echo "no" >&6; }
39603 fi
39604 
39605 
39606   fi
39607 
39608   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39609 
39610 
39611   # Publish this variable in the help.
39612 
39613 
39614   if [ -z "${STRIP+x}" ]; then
39615     # The variable is not set by user, try to locate tool using the code snippet
39616     for ac_prog in strip
39617 do
39618   # Extract the first word of "$ac_prog", so it can be a program name with args.
39619 set dummy $ac_prog; ac_word=$2
39620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39621 $as_echo_n "checking for $ac_word... " >&6; }
39622 if ${ac_cv_path_STRIP+:} false; then :
39623   $as_echo_n "(cached) " >&6
39624 else
39625   case $STRIP in
39626   [\\/]* | ?:[\\/]*)
39627   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39628   ;;
39629   *)
39630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39631 for as_dir in $PATH
39632 do
39633   IFS=$as_save_IFS
39634   test -z "$as_dir" && as_dir=.
39635     for ac_exec_ext in '' $ac_executable_extensions; do
39636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39637     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39639     break 2
39640   fi
39641 done
39642   done
39643 IFS=$as_save_IFS
39644 
39645   ;;
39646 esac
39647 fi
39648 STRIP=$ac_cv_path_STRIP
39649 if test -n "$STRIP"; then
39650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39651 $as_echo "$STRIP" >&6; }
39652 else
39653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39654 $as_echo "no" >&6; }
39655 fi
39656 
39657 
39658   test -n "$STRIP" && break
39659 done
39660 
39661   else
39662     # The variable is set, but is it from the command line or the environment?
39663 
39664     # Try to remove the string !STRIP! from our list.
39665     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39666     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39667       # If it failed, the variable was not from the command line. Ignore it,
39668       # but warn the user (except for BASH, which is always set by the calling BASH).
39669       if test "xSTRIP" != xBASH; then
39670         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39671 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39672       fi
39673       # Try to locate tool using the code snippet
39674       for ac_prog in strip
39675 do
39676   # Extract the first word of "$ac_prog", so it can be a program name with args.
39677 set dummy $ac_prog; ac_word=$2
39678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39679 $as_echo_n "checking for $ac_word... " >&6; }
39680 if ${ac_cv_path_STRIP+:} false; then :
39681   $as_echo_n "(cached) " >&6
39682 else
39683   case $STRIP in
39684   [\\/]* | ?:[\\/]*)
39685   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39686   ;;
39687   *)
39688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39689 for as_dir in $PATH
39690 do
39691   IFS=$as_save_IFS
39692   test -z "$as_dir" && as_dir=.
39693     for ac_exec_ext in '' $ac_executable_extensions; do
39694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39695     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39697     break 2
39698   fi
39699 done
39700   done
39701 IFS=$as_save_IFS
39702 
39703   ;;
39704 esac
39705 fi
39706 STRIP=$ac_cv_path_STRIP
39707 if test -n "$STRIP"; then
39708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39709 $as_echo "$STRIP" >&6; }
39710 else
39711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39712 $as_echo "no" >&6; }
39713 fi
39714 
39715 
39716   test -n "$STRIP" && break
39717 done
39718 
39719     else
39720       # If it succeeded, then it was overridden by the user. We will use it
39721       # for the tool.
39722 
39723       # First remove it from the list of overridden variables, so we can test
39724       # for unknown variables in the end.
39725       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39726 
39727       # Check if we try to supply an empty value
39728       if test "x$STRIP" = x; then
39729         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39730 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39732 $as_echo_n "checking for STRIP... " >&6; }
39733         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39734 $as_echo "disabled" >&6; }
39735       else
39736         # Check if the provided tool contains a complete path.
39737         tool_specified="$STRIP"
39738         tool_basename="${tool_specified##*/}"
39739         if test "x$tool_basename" = "x$tool_specified"; then
39740           # A command without a complete path is provided, search $PATH.
39741           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39742 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39743           # Extract the first word of "$tool_basename", so it can be a program name with args.
39744 set dummy $tool_basename; ac_word=$2
39745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39746 $as_echo_n "checking for $ac_word... " >&6; }
39747 if ${ac_cv_path_STRIP+:} false; then :
39748   $as_echo_n "(cached) " >&6
39749 else
39750   case $STRIP in
39751   [\\/]* | ?:[\\/]*)
39752   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39753   ;;
39754   *)
39755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39756 for as_dir in $PATH
39757 do
39758   IFS=$as_save_IFS
39759   test -z "$as_dir" && as_dir=.
39760     for ac_exec_ext in '' $ac_executable_extensions; do
39761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39762     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39764     break 2
39765   fi
39766 done
39767   done
39768 IFS=$as_save_IFS
39769 
39770   ;;
39771 esac
39772 fi
39773 STRIP=$ac_cv_path_STRIP
39774 if test -n "$STRIP"; then
39775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39776 $as_echo "$STRIP" >&6; }
39777 else
39778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39779 $as_echo "no" >&6; }
39780 fi
39781 
39782 
39783           if test "x$STRIP" = x; then
39784             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39785           fi
39786         else
39787           # Otherwise we believe it is a complete path. Use it as it is.
39788           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39789 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39790           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39791 $as_echo_n "checking for STRIP... " >&6; }
39792           if test ! -x "$tool_specified"; then
39793             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39794 $as_echo "not found" >&6; }
39795             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39796           fi
39797           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39798 $as_echo "$tool_specified" >&6; }
39799         fi
39800       fi
39801     fi
39802 
39803   fi
39804 
39805 
39806 
39807   # Only process if variable expands to non-empty
39808 
39809   if test "x$STRIP" != x; then
39810     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39811 
39812   # First separate the path from the arguments. This will split at the first
39813   # space.
39814   complete="$STRIP"
39815   path="${complete%% *}"
39816   tmp="$complete EOL"
39817   arguments="${tmp#* }"
39818 
39819   # Input might be given as Windows format, start by converting to
39820   # unix format.
39821   new_path=`$CYGPATH -u "$path"`
39822 
39823   # Now try to locate executable using which
39824   new_path=`$WHICH "$new_path" 2> /dev/null`
39825   # bat and cmd files are not always considered executable in cygwin causing which
39826   # to not find them
39827   if test "x$new_path" = x \
39828       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39829       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39830     new_path=`$CYGPATH -u "$path"`
39831   fi
39832   if test "x$new_path" = x; then
39833     # Oops. Which didn't find the executable.
39834     # The splitting of arguments from the executable at a space might have been incorrect,
39835     # since paths with space are more likely in Windows. Give it another try with the whole
39836     # argument.
39837     path="$complete"
39838     arguments="EOL"
39839     new_path=`$CYGPATH -u "$path"`
39840     new_path=`$WHICH "$new_path" 2> /dev/null`
39841     # bat and cmd files are not always considered executable in cygwin causing which
39842     # to not find them
39843     if test "x$new_path" = x \
39844         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39845         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39846       new_path=`$CYGPATH -u "$path"`
39847     fi
39848     if test "x$new_path" = x; then
39849       # It's still not found. Now this is an unrecoverable error.
39850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39851 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39852       has_space=`$ECHO "$complete" | $GREP " "`
39853       if test "x$has_space" != x; then
39854         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39856       fi
39857       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39858     fi
39859   fi
39860 
39861   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39862   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39863   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39864   # "foo.exe" is OK but "foo" is an error.
39865   #
39866   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39867   # It is also a way to make sure we got the proper file name for the real test later on.
39868   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39869   if test "x$test_shortpath" = x; then
39870     # Short path failed, file does not exist as specified.
39871     # Try adding .exe or .cmd
39872     if test -f "${new_path}.exe"; then
39873       input_to_shortpath="${new_path}.exe"
39874     elif test -f "${new_path}.cmd"; then
39875       input_to_shortpath="${new_path}.cmd"
39876     else
39877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39878 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39879       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39880 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39881       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39882     fi
39883   else
39884     input_to_shortpath="$new_path"
39885   fi
39886 
39887   # Call helper function which possibly converts this using DOS-style short mode.
39888   # If so, the updated path is stored in $new_path.
39889   new_path="$input_to_shortpath"
39890 
39891   input_path="$input_to_shortpath"
39892   # Check if we need to convert this using DOS-style short mode. If the path
39893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39894   # take no chances and rewrite it.
39895   # Note: m4 eats our [], so we need to use [ and ] instead.
39896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39897   if test "x$has_forbidden_chars" != x; then
39898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39899     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39900     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39901     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39902       # Going to short mode and back again did indeed matter. Since short mode is
39903       # case insensitive, let's make it lowercase to improve readability.
39904       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39905       # Now convert it back to Unix-style (cygpath)
39906       input_path=`$CYGPATH -u "$shortmode_path"`
39907       new_path="$input_path"
39908     fi
39909   fi
39910 
39911   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39912   if test "x$test_cygdrive_prefix" = x; then
39913     # As a simple fix, exclude /usr/bin since it's not a real path.
39914     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39915       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39916       # a path prefixed by /cygdrive for fixpath to work.
39917       new_path="$CYGWIN_ROOT_PATH$input_path"
39918     fi
39919   fi
39920 
39921   # remove trailing .exe if any
39922   new_path="${new_path/%.exe/}"
39923 
39924     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925 
39926   # First separate the path from the arguments. This will split at the first
39927   # space.
39928   complete="$STRIP"
39929   path="${complete%% *}"
39930   tmp="$complete EOL"
39931   arguments="${tmp#* }"
39932 
39933   # Input might be given as Windows format, start by converting to
39934   # unix format.
39935   new_path="$path"
39936 
39937   windows_path="$new_path"
39938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39939     unix_path=`$CYGPATH -u "$windows_path"`
39940     new_path="$unix_path"
39941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39943     new_path="$unix_path"
39944   fi
39945 
39946 
39947   # Now try to locate executable using which
39948   new_path=`$WHICH "$new_path" 2> /dev/null`
39949 
39950   if test "x$new_path" = x; then
39951     # Oops. Which didn't find the executable.
39952     # The splitting of arguments from the executable at a space might have been incorrect,
39953     # since paths with space are more likely in Windows. Give it another try with the whole
39954     # argument.
39955     path="$complete"
39956     arguments="EOL"
39957     new_path="$path"
39958 
39959   windows_path="$new_path"
39960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39961     unix_path=`$CYGPATH -u "$windows_path"`
39962     new_path="$unix_path"
39963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39965     new_path="$unix_path"
39966   fi
39967 
39968 
39969     new_path=`$WHICH "$new_path" 2> /dev/null`
39970     # bat and cmd files are not always considered executable in MSYS causing which
39971     # to not find them
39972     if test "x$new_path" = x \
39973         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39974         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39975       new_path="$path"
39976 
39977   windows_path="$new_path"
39978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39979     unix_path=`$CYGPATH -u "$windows_path"`
39980     new_path="$unix_path"
39981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39983     new_path="$unix_path"
39984   fi
39985 
39986     fi
39987 
39988     if test "x$new_path" = x; then
39989       # It's still not found. Now this is an unrecoverable error.
39990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39991 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39992       has_space=`$ECHO "$complete" | $GREP " "`
39993       if test "x$has_space" != x; then
39994         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39995 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39996       fi
39997       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39998     fi
39999   fi
40000 
40001   # Now new_path has a complete unix path to the binary
40002   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40003     # Keep paths in /bin as-is, but remove trailing .exe if any
40004     new_path="${new_path/%.exe/}"
40005     # Do not save /bin paths to all_fixpath_prefixes!
40006   else
40007     # Not in mixed or Windows style, start by that.
40008     new_path=`cmd //c echo $new_path`
40009 
40010   input_path="$new_path"
40011   # Check if we need to convert this using DOS-style short mode. If the path
40012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40013   # take no chances and rewrite it.
40014   # Note: m4 eats our [], so we need to use [ and ] instead.
40015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40016   if test "x$has_forbidden_chars" != x; then
40017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40018     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40019   fi
40020 
40021     # Output is in $new_path
40022 
40023   windows_path="$new_path"
40024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40025     unix_path=`$CYGPATH -u "$windows_path"`
40026     new_path="$unix_path"
40027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40029     new_path="$unix_path"
40030   fi
40031 
40032     # remove trailing .exe if any
40033     new_path="${new_path/%.exe/}"
40034 
40035     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40036     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40037   fi
40038 
40039     else
40040       # We're on a unix platform. Hooray! :)
40041       # First separate the path from the arguments. This will split at the first
40042       # space.
40043       complete="$STRIP"
40044       path="${complete%% *}"
40045       tmp="$complete EOL"
40046       arguments="${tmp#* }"
40047 
40048       # Cannot rely on the command "which" here since it doesn't always work.
40049       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40050       if test -z "$is_absolute_path"; then
40051         # Path to executable is not absolute. Find it.
40052         IFS_save="$IFS"
40053         IFS=:
40054         for p in $PATH; do
40055           if test -f "$p/$path" && test -x "$p/$path"; then
40056             new_path="$p/$path"
40057             break
40058           fi
40059         done
40060         IFS="$IFS_save"
40061       else
40062         # This is an absolute path, we can use it without further modifications.
40063         new_path="$path"
40064       fi
40065 
40066       if test "x$new_path" = x; then
40067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40068 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40069         has_space=`$ECHO "$complete" | $GREP " "`
40070         if test "x$has_space" != x; then
40071           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40072 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40073         fi
40074         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40075       fi
40076     fi
40077 
40078     # Now join together the path and the arguments once again
40079     if test "x$arguments" != xEOL; then
40080       new_complete="$new_path ${arguments% *}"
40081     else
40082       new_complete="$new_path"
40083     fi
40084 
40085     if test "x$complete" != "x$new_complete"; then
40086       STRIP="$new_complete"
40087       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40088 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40089     fi
40090   fi
40091 
40092 
40093 
40094   # Publish this variable in the help.
40095 
40096 
40097   if [ -z "${NM+x}" ]; then
40098     # The variable is not set by user, try to locate tool using the code snippet
40099     for ac_prog in nm
40100 do
40101   # Extract the first word of "$ac_prog", so it can be a program name with args.
40102 set dummy $ac_prog; ac_word=$2
40103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40104 $as_echo_n "checking for $ac_word... " >&6; }
40105 if ${ac_cv_path_NM+:} false; then :
40106   $as_echo_n "(cached) " >&6
40107 else
40108   case $NM in
40109   [\\/]* | ?:[\\/]*)
40110   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40111   ;;
40112   *)
40113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40114 for as_dir in $PATH
40115 do
40116   IFS=$as_save_IFS
40117   test -z "$as_dir" && as_dir=.
40118     for ac_exec_ext in '' $ac_executable_extensions; do
40119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40120     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40122     break 2
40123   fi
40124 done
40125   done
40126 IFS=$as_save_IFS
40127 
40128   ;;
40129 esac
40130 fi
40131 NM=$ac_cv_path_NM
40132 if test -n "$NM"; then
40133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40134 $as_echo "$NM" >&6; }
40135 else
40136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40137 $as_echo "no" >&6; }
40138 fi
40139 
40140 
40141   test -n "$NM" && break
40142 done
40143 
40144   else
40145     # The variable is set, but is it from the command line or the environment?
40146 
40147     # Try to remove the string !NM! from our list.
40148     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40149     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40150       # If it failed, the variable was not from the command line. Ignore it,
40151       # but warn the user (except for BASH, which is always set by the calling BASH).
40152       if test "xNM" != xBASH; then
40153         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40154 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40155       fi
40156       # Try to locate tool using the code snippet
40157       for ac_prog in nm
40158 do
40159   # Extract the first word of "$ac_prog", so it can be a program name with args.
40160 set dummy $ac_prog; ac_word=$2
40161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40162 $as_echo_n "checking for $ac_word... " >&6; }
40163 if ${ac_cv_path_NM+:} false; then :
40164   $as_echo_n "(cached) " >&6
40165 else
40166   case $NM in
40167   [\\/]* | ?:[\\/]*)
40168   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40169   ;;
40170   *)
40171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40172 for as_dir in $PATH
40173 do
40174   IFS=$as_save_IFS
40175   test -z "$as_dir" && as_dir=.
40176     for ac_exec_ext in '' $ac_executable_extensions; do
40177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40178     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40180     break 2
40181   fi
40182 done
40183   done
40184 IFS=$as_save_IFS
40185 
40186   ;;
40187 esac
40188 fi
40189 NM=$ac_cv_path_NM
40190 if test -n "$NM"; then
40191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40192 $as_echo "$NM" >&6; }
40193 else
40194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40195 $as_echo "no" >&6; }
40196 fi
40197 
40198 
40199   test -n "$NM" && break
40200 done
40201 
40202     else
40203       # If it succeeded, then it was overridden by the user. We will use it
40204       # for the tool.
40205 
40206       # First remove it from the list of overridden variables, so we can test
40207       # for unknown variables in the end.
40208       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40209 
40210       # Check if we try to supply an empty value
40211       if test "x$NM" = x; then
40212         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40213 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40214         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40215 $as_echo_n "checking for NM... " >&6; }
40216         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40217 $as_echo "disabled" >&6; }
40218       else
40219         # Check if the provided tool contains a complete path.
40220         tool_specified="$NM"
40221         tool_basename="${tool_specified##*/}"
40222         if test "x$tool_basename" = "x$tool_specified"; then
40223           # A command without a complete path is provided, search $PATH.
40224           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40225 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40226           # Extract the first word of "$tool_basename", so it can be a program name with args.
40227 set dummy $tool_basename; ac_word=$2
40228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40229 $as_echo_n "checking for $ac_word... " >&6; }
40230 if ${ac_cv_path_NM+:} false; then :
40231   $as_echo_n "(cached) " >&6
40232 else
40233   case $NM in
40234   [\\/]* | ?:[\\/]*)
40235   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40236   ;;
40237   *)
40238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40239 for as_dir in $PATH
40240 do
40241   IFS=$as_save_IFS
40242   test -z "$as_dir" && as_dir=.
40243     for ac_exec_ext in '' $ac_executable_extensions; do
40244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40245     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40247     break 2
40248   fi
40249 done
40250   done
40251 IFS=$as_save_IFS
40252 
40253   ;;
40254 esac
40255 fi
40256 NM=$ac_cv_path_NM
40257 if test -n "$NM"; then
40258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40259 $as_echo "$NM" >&6; }
40260 else
40261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40262 $as_echo "no" >&6; }
40263 fi
40264 
40265 
40266           if test "x$NM" = x; then
40267             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40268           fi
40269         else
40270           # Otherwise we believe it is a complete path. Use it as it is.
40271           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40272 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40273           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40274 $as_echo_n "checking for NM... " >&6; }
40275           if test ! -x "$tool_specified"; then
40276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40277 $as_echo "not found" >&6; }
40278             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40279           fi
40280           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40281 $as_echo "$tool_specified" >&6; }
40282         fi
40283       fi
40284     fi
40285 
40286   fi
40287 
40288 
40289 
40290   # Only process if variable expands to non-empty
40291 
40292   if test "x$NM" != x; then
40293     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40294 
40295   # First separate the path from the arguments. This will split at the first
40296   # space.
40297   complete="$NM"
40298   path="${complete%% *}"
40299   tmp="$complete EOL"
40300   arguments="${tmp#* }"
40301 
40302   # Input might be given as Windows format, start by converting to
40303   # unix format.
40304   new_path=`$CYGPATH -u "$path"`
40305 
40306   # Now try to locate executable using which
40307   new_path=`$WHICH "$new_path" 2> /dev/null`
40308   # bat and cmd files are not always considered executable in cygwin causing which
40309   # to not find them
40310   if test "x$new_path" = x \
40311       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40312       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40313     new_path=`$CYGPATH -u "$path"`
40314   fi
40315   if test "x$new_path" = x; then
40316     # Oops. Which didn't find the executable.
40317     # The splitting of arguments from the executable at a space might have been incorrect,
40318     # since paths with space are more likely in Windows. Give it another try with the whole
40319     # argument.
40320     path="$complete"
40321     arguments="EOL"
40322     new_path=`$CYGPATH -u "$path"`
40323     new_path=`$WHICH "$new_path" 2> /dev/null`
40324     # bat and cmd files are not always considered executable in cygwin causing which
40325     # to not find them
40326     if test "x$new_path" = x \
40327         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40328         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40329       new_path=`$CYGPATH -u "$path"`
40330     fi
40331     if test "x$new_path" = x; then
40332       # It's still not found. Now this is an unrecoverable error.
40333       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40334 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40335       has_space=`$ECHO "$complete" | $GREP " "`
40336       if test "x$has_space" != x; then
40337         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40338 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40339       fi
40340       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40341     fi
40342   fi
40343 
40344   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40345   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40346   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40347   # "foo.exe" is OK but "foo" is an error.
40348   #
40349   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40350   # It is also a way to make sure we got the proper file name for the real test later on.
40351   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40352   if test "x$test_shortpath" = x; then
40353     # Short path failed, file does not exist as specified.
40354     # Try adding .exe or .cmd
40355     if test -f "${new_path}.exe"; then
40356       input_to_shortpath="${new_path}.exe"
40357     elif test -f "${new_path}.cmd"; then
40358       input_to_shortpath="${new_path}.cmd"
40359     else
40360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40361 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40362       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40363 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40364       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40365     fi
40366   else
40367     input_to_shortpath="$new_path"
40368   fi
40369 
40370   # Call helper function which possibly converts this using DOS-style short mode.
40371   # If so, the updated path is stored in $new_path.
40372   new_path="$input_to_shortpath"
40373 
40374   input_path="$input_to_shortpath"
40375   # Check if we need to convert this using DOS-style short mode. If the path
40376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40377   # take no chances and rewrite it.
40378   # Note: m4 eats our [], so we need to use [ and ] instead.
40379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40380   if test "x$has_forbidden_chars" != x; then
40381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40385       # Going to short mode and back again did indeed matter. Since short mode is
40386       # case insensitive, let's make it lowercase to improve readability.
40387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40388       # Now convert it back to Unix-style (cygpath)
40389       input_path=`$CYGPATH -u "$shortmode_path"`
40390       new_path="$input_path"
40391     fi
40392   fi
40393 
40394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40395   if test "x$test_cygdrive_prefix" = x; then
40396     # As a simple fix, exclude /usr/bin since it's not a real path.
40397     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40399       # a path prefixed by /cygdrive for fixpath to work.
40400       new_path="$CYGWIN_ROOT_PATH$input_path"
40401     fi
40402   fi
40403 
40404   # remove trailing .exe if any
40405   new_path="${new_path/%.exe/}"
40406 
40407     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408 
40409   # First separate the path from the arguments. This will split at the first
40410   # space.
40411   complete="$NM"
40412   path="${complete%% *}"
40413   tmp="$complete EOL"
40414   arguments="${tmp#* }"
40415 
40416   # Input might be given as Windows format, start by converting to
40417   # unix format.
40418   new_path="$path"
40419 
40420   windows_path="$new_path"
40421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40422     unix_path=`$CYGPATH -u "$windows_path"`
40423     new_path="$unix_path"
40424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40426     new_path="$unix_path"
40427   fi
40428 
40429 
40430   # Now try to locate executable using which
40431   new_path=`$WHICH "$new_path" 2> /dev/null`
40432 
40433   if test "x$new_path" = x; then
40434     # Oops. Which didn't find the executable.
40435     # The splitting of arguments from the executable at a space might have been incorrect,
40436     # since paths with space are more likely in Windows. Give it another try with the whole
40437     # argument.
40438     path="$complete"
40439     arguments="EOL"
40440     new_path="$path"
40441 
40442   windows_path="$new_path"
40443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40444     unix_path=`$CYGPATH -u "$windows_path"`
40445     new_path="$unix_path"
40446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40448     new_path="$unix_path"
40449   fi
40450 
40451 
40452     new_path=`$WHICH "$new_path" 2> /dev/null`
40453     # bat and cmd files are not always considered executable in MSYS causing which
40454     # to not find them
40455     if test "x$new_path" = x \
40456         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40457         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40458       new_path="$path"
40459 
40460   windows_path="$new_path"
40461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40462     unix_path=`$CYGPATH -u "$windows_path"`
40463     new_path="$unix_path"
40464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40466     new_path="$unix_path"
40467   fi
40468 
40469     fi
40470 
40471     if test "x$new_path" = x; then
40472       # It's still not found. Now this is an unrecoverable error.
40473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40474 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40475       has_space=`$ECHO "$complete" | $GREP " "`
40476       if test "x$has_space" != x; then
40477         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40478 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40479       fi
40480       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40481     fi
40482   fi
40483 
40484   # Now new_path has a complete unix path to the binary
40485   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40486     # Keep paths in /bin as-is, but remove trailing .exe if any
40487     new_path="${new_path/%.exe/}"
40488     # Do not save /bin paths to all_fixpath_prefixes!
40489   else
40490     # Not in mixed or Windows style, start by that.
40491     new_path=`cmd //c echo $new_path`
40492 
40493   input_path="$new_path"
40494   # Check if we need to convert this using DOS-style short mode. If the path
40495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40496   # take no chances and rewrite it.
40497   # Note: m4 eats our [], so we need to use [ and ] instead.
40498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40499   if test "x$has_forbidden_chars" != x; then
40500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40501     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40502   fi
40503 
40504     # Output is in $new_path
40505 
40506   windows_path="$new_path"
40507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40508     unix_path=`$CYGPATH -u "$windows_path"`
40509     new_path="$unix_path"
40510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40512     new_path="$unix_path"
40513   fi
40514 
40515     # remove trailing .exe if any
40516     new_path="${new_path/%.exe/}"
40517 
40518     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40519     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40520   fi
40521 
40522     else
40523       # We're on a unix platform. Hooray! :)
40524       # First separate the path from the arguments. This will split at the first
40525       # space.
40526       complete="$NM"
40527       path="${complete%% *}"
40528       tmp="$complete EOL"
40529       arguments="${tmp#* }"
40530 
40531       # Cannot rely on the command "which" here since it doesn't always work.
40532       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40533       if test -z "$is_absolute_path"; then
40534         # Path to executable is not absolute. Find it.
40535         IFS_save="$IFS"
40536         IFS=:
40537         for p in $PATH; do
40538           if test -f "$p/$path" && test -x "$p/$path"; then
40539             new_path="$p/$path"
40540             break
40541           fi
40542         done
40543         IFS="$IFS_save"
40544       else
40545         # This is an absolute path, we can use it without further modifications.
40546         new_path="$path"
40547       fi
40548 
40549       if test "x$new_path" = x; then
40550         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40551 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40552         has_space=`$ECHO "$complete" | $GREP " "`
40553         if test "x$has_space" != x; then
40554           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40555 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40556         fi
40557         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40558       fi
40559     fi
40560 
40561     # Now join together the path and the arguments once again
40562     if test "x$arguments" != xEOL; then
40563       new_complete="$new_path ${arguments% *}"
40564     else
40565       new_complete="$new_path"
40566     fi
40567 
40568     if test "x$complete" != "x$new_complete"; then
40569       NM="$new_complete"
40570       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40571 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40572     fi
40573   fi
40574 
40575 
40576 
40577   # Publish this variable in the help.
40578 
40579 
40580   if [ -z "${GNM+x}" ]; then
40581     # The variable is not set by user, try to locate tool using the code snippet
40582     for ac_prog in gnm
40583 do
40584   # Extract the first word of "$ac_prog", so it can be a program name with args.
40585 set dummy $ac_prog; ac_word=$2
40586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40587 $as_echo_n "checking for $ac_word... " >&6; }
40588 if ${ac_cv_path_GNM+:} false; then :
40589   $as_echo_n "(cached) " >&6
40590 else
40591   case $GNM in
40592   [\\/]* | ?:[\\/]*)
40593   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40594   ;;
40595   *)
40596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597 for as_dir in $PATH
40598 do
40599   IFS=$as_save_IFS
40600   test -z "$as_dir" && as_dir=.
40601     for ac_exec_ext in '' $ac_executable_extensions; do
40602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605     break 2
40606   fi
40607 done
40608   done
40609 IFS=$as_save_IFS
40610 
40611   ;;
40612 esac
40613 fi
40614 GNM=$ac_cv_path_GNM
40615 if test -n "$GNM"; then
40616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40617 $as_echo "$GNM" >&6; }
40618 else
40619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40620 $as_echo "no" >&6; }
40621 fi
40622 
40623 
40624   test -n "$GNM" && break
40625 done
40626 
40627   else
40628     # The variable is set, but is it from the command line or the environment?
40629 
40630     # Try to remove the string !GNM! from our list.
40631     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40632     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40633       # If it failed, the variable was not from the command line. Ignore it,
40634       # but warn the user (except for BASH, which is always set by the calling BASH).
40635       if test "xGNM" != xBASH; then
40636         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40637 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40638       fi
40639       # Try to locate tool using the code snippet
40640       for ac_prog in gnm
40641 do
40642   # Extract the first word of "$ac_prog", so it can be a program name with args.
40643 set dummy $ac_prog; ac_word=$2
40644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40645 $as_echo_n "checking for $ac_word... " >&6; }
40646 if ${ac_cv_path_GNM+:} false; then :
40647   $as_echo_n "(cached) " >&6
40648 else
40649   case $GNM in
40650   [\\/]* | ?:[\\/]*)
40651   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40652   ;;
40653   *)
40654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40655 for as_dir in $PATH
40656 do
40657   IFS=$as_save_IFS
40658   test -z "$as_dir" && as_dir=.
40659     for ac_exec_ext in '' $ac_executable_extensions; do
40660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40661     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40663     break 2
40664   fi
40665 done
40666   done
40667 IFS=$as_save_IFS
40668 
40669   ;;
40670 esac
40671 fi
40672 GNM=$ac_cv_path_GNM
40673 if test -n "$GNM"; then
40674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40675 $as_echo "$GNM" >&6; }
40676 else
40677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40678 $as_echo "no" >&6; }
40679 fi
40680 
40681 
40682   test -n "$GNM" && break
40683 done
40684 
40685     else
40686       # If it succeeded, then it was overridden by the user. We will use it
40687       # for the tool.
40688 
40689       # First remove it from the list of overridden variables, so we can test
40690       # for unknown variables in the end.
40691       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40692 
40693       # Check if we try to supply an empty value
40694       if test "x$GNM" = x; then
40695         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40696 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40698 $as_echo_n "checking for GNM... " >&6; }
40699         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40700 $as_echo "disabled" >&6; }
40701       else
40702         # Check if the provided tool contains a complete path.
40703         tool_specified="$GNM"
40704         tool_basename="${tool_specified##*/}"
40705         if test "x$tool_basename" = "x$tool_specified"; then
40706           # A command without a complete path is provided, search $PATH.
40707           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40708 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40709           # Extract the first word of "$tool_basename", so it can be a program name with args.
40710 set dummy $tool_basename; ac_word=$2
40711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40712 $as_echo_n "checking for $ac_word... " >&6; }
40713 if ${ac_cv_path_GNM+:} false; then :
40714   $as_echo_n "(cached) " >&6
40715 else
40716   case $GNM in
40717   [\\/]* | ?:[\\/]*)
40718   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40719   ;;
40720   *)
40721   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40722 for as_dir in $PATH
40723 do
40724   IFS=$as_save_IFS
40725   test -z "$as_dir" && as_dir=.
40726     for ac_exec_ext in '' $ac_executable_extensions; do
40727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40728     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40730     break 2
40731   fi
40732 done
40733   done
40734 IFS=$as_save_IFS
40735 
40736   ;;
40737 esac
40738 fi
40739 GNM=$ac_cv_path_GNM
40740 if test -n "$GNM"; then
40741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40742 $as_echo "$GNM" >&6; }
40743 else
40744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40745 $as_echo "no" >&6; }
40746 fi
40747 
40748 
40749           if test "x$GNM" = x; then
40750             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40751           fi
40752         else
40753           # Otherwise we believe it is a complete path. Use it as it is.
40754           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40755 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40756           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40757 $as_echo_n "checking for GNM... " >&6; }
40758           if test ! -x "$tool_specified"; then
40759             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40760 $as_echo "not found" >&6; }
40761             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40762           fi
40763           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40764 $as_echo "$tool_specified" >&6; }
40765         fi
40766       fi
40767     fi
40768 
40769   fi
40770 
40771 
40772 
40773   # Only process if variable expands to non-empty
40774 
40775   if test "x$GNM" != x; then
40776     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40777 
40778   # First separate the path from the arguments. This will split at the first
40779   # space.
40780   complete="$GNM"
40781   path="${complete%% *}"
40782   tmp="$complete EOL"
40783   arguments="${tmp#* }"
40784 
40785   # Input might be given as Windows format, start by converting to
40786   # unix format.
40787   new_path=`$CYGPATH -u "$path"`
40788 
40789   # Now try to locate executable using which
40790   new_path=`$WHICH "$new_path" 2> /dev/null`
40791   # bat and cmd files are not always considered executable in cygwin causing which
40792   # to not find them
40793   if test "x$new_path" = x \
40794       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40795       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40796     new_path=`$CYGPATH -u "$path"`
40797   fi
40798   if test "x$new_path" = x; then
40799     # Oops. Which didn't find the executable.
40800     # The splitting of arguments from the executable at a space might have been incorrect,
40801     # since paths with space are more likely in Windows. Give it another try with the whole
40802     # argument.
40803     path="$complete"
40804     arguments="EOL"
40805     new_path=`$CYGPATH -u "$path"`
40806     new_path=`$WHICH "$new_path" 2> /dev/null`
40807     # bat and cmd files are not always considered executable in cygwin causing which
40808     # to not find them
40809     if test "x$new_path" = x \
40810         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40811         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40812       new_path=`$CYGPATH -u "$path"`
40813     fi
40814     if test "x$new_path" = x; then
40815       # It's still not found. Now this is an unrecoverable error.
40816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40817 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40818       has_space=`$ECHO "$complete" | $GREP " "`
40819       if test "x$has_space" != x; then
40820         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40821 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40822       fi
40823       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40824     fi
40825   fi
40826 
40827   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40828   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40829   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40830   # "foo.exe" is OK but "foo" is an error.
40831   #
40832   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40833   # It is also a way to make sure we got the proper file name for the real test later on.
40834   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40835   if test "x$test_shortpath" = x; then
40836     # Short path failed, file does not exist as specified.
40837     # Try adding .exe or .cmd
40838     if test -f "${new_path}.exe"; then
40839       input_to_shortpath="${new_path}.exe"
40840     elif test -f "${new_path}.cmd"; then
40841       input_to_shortpath="${new_path}.cmd"
40842     else
40843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40844 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40845       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40846 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40847       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40848     fi
40849   else
40850     input_to_shortpath="$new_path"
40851   fi
40852 
40853   # Call helper function which possibly converts this using DOS-style short mode.
40854   # If so, the updated path is stored in $new_path.
40855   new_path="$input_to_shortpath"
40856 
40857   input_path="$input_to_shortpath"
40858   # Check if we need to convert this using DOS-style short mode. If the path
40859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40860   # take no chances and rewrite it.
40861   # Note: m4 eats our [], so we need to use [ and ] instead.
40862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40863   if test "x$has_forbidden_chars" != x; then
40864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40868       # Going to short mode and back again did indeed matter. Since short mode is
40869       # case insensitive, let's make it lowercase to improve readability.
40870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40871       # Now convert it back to Unix-style (cygpath)
40872       input_path=`$CYGPATH -u "$shortmode_path"`
40873       new_path="$input_path"
40874     fi
40875   fi
40876 
40877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40878   if test "x$test_cygdrive_prefix" = x; then
40879     # As a simple fix, exclude /usr/bin since it's not a real path.
40880     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40882       # a path prefixed by /cygdrive for fixpath to work.
40883       new_path="$CYGWIN_ROOT_PATH$input_path"
40884     fi
40885   fi
40886 
40887   # remove trailing .exe if any
40888   new_path="${new_path/%.exe/}"
40889 
40890     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40891 
40892   # First separate the path from the arguments. This will split at the first
40893   # space.
40894   complete="$GNM"
40895   path="${complete%% *}"
40896   tmp="$complete EOL"
40897   arguments="${tmp#* }"
40898 
40899   # Input might be given as Windows format, start by converting to
40900   # unix format.
40901   new_path="$path"
40902 
40903   windows_path="$new_path"
40904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40905     unix_path=`$CYGPATH -u "$windows_path"`
40906     new_path="$unix_path"
40907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40909     new_path="$unix_path"
40910   fi
40911 
40912 
40913   # Now try to locate executable using which
40914   new_path=`$WHICH "$new_path" 2> /dev/null`
40915 
40916   if test "x$new_path" = x; then
40917     # Oops. Which didn't find the executable.
40918     # The splitting of arguments from the executable at a space might have been incorrect,
40919     # since paths with space are more likely in Windows. Give it another try with the whole
40920     # argument.
40921     path="$complete"
40922     arguments="EOL"
40923     new_path="$path"
40924 
40925   windows_path="$new_path"
40926   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40927     unix_path=`$CYGPATH -u "$windows_path"`
40928     new_path="$unix_path"
40929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40930     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40931     new_path="$unix_path"
40932   fi
40933 
40934 
40935     new_path=`$WHICH "$new_path" 2> /dev/null`
40936     # bat and cmd files are not always considered executable in MSYS causing which
40937     # to not find them
40938     if test "x$new_path" = x \
40939         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40940         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40941       new_path="$path"
40942 
40943   windows_path="$new_path"
40944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40945     unix_path=`$CYGPATH -u "$windows_path"`
40946     new_path="$unix_path"
40947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40949     new_path="$unix_path"
40950   fi
40951 
40952     fi
40953 
40954     if test "x$new_path" = x; then
40955       # It's still not found. Now this is an unrecoverable error.
40956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40957 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40958       has_space=`$ECHO "$complete" | $GREP " "`
40959       if test "x$has_space" != x; then
40960         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40962       fi
40963       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40964     fi
40965   fi
40966 
40967   # Now new_path has a complete unix path to the binary
40968   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40969     # Keep paths in /bin as-is, but remove trailing .exe if any
40970     new_path="${new_path/%.exe/}"
40971     # Do not save /bin paths to all_fixpath_prefixes!
40972   else
40973     # Not in mixed or Windows style, start by that.
40974     new_path=`cmd //c echo $new_path`
40975 
40976   input_path="$new_path"
40977   # Check if we need to convert this using DOS-style short mode. If the path
40978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40979   # take no chances and rewrite it.
40980   # Note: m4 eats our [], so we need to use [ and ] instead.
40981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40982   if test "x$has_forbidden_chars" != x; then
40983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40984     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40985   fi
40986 
40987     # Output is in $new_path
40988 
40989   windows_path="$new_path"
40990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40991     unix_path=`$CYGPATH -u "$windows_path"`
40992     new_path="$unix_path"
40993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40995     new_path="$unix_path"
40996   fi
40997 
40998     # remove trailing .exe if any
40999     new_path="${new_path/%.exe/}"
41000 
41001     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41002     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41003   fi
41004 
41005     else
41006       # We're on a unix platform. Hooray! :)
41007       # First separate the path from the arguments. This will split at the first
41008       # space.
41009       complete="$GNM"
41010       path="${complete%% *}"
41011       tmp="$complete EOL"
41012       arguments="${tmp#* }"
41013 
41014       # Cannot rely on the command "which" here since it doesn't always work.
41015       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41016       if test -z "$is_absolute_path"; then
41017         # Path to executable is not absolute. Find it.
41018         IFS_save="$IFS"
41019         IFS=:
41020         for p in $PATH; do
41021           if test -f "$p/$path" && test -x "$p/$path"; then
41022             new_path="$p/$path"
41023             break
41024           fi
41025         done
41026         IFS="$IFS_save"
41027       else
41028         # This is an absolute path, we can use it without further modifications.
41029         new_path="$path"
41030       fi
41031 
41032       if test "x$new_path" = x; then
41033         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41034 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41035         has_space=`$ECHO "$complete" | $GREP " "`
41036         if test "x$has_space" != x; then
41037           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41039         fi
41040         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41041       fi
41042     fi
41043 
41044     # Now join together the path and the arguments once again
41045     if test "x$arguments" != xEOL; then
41046       new_complete="$new_path ${arguments% *}"
41047     else
41048       new_complete="$new_path"
41049     fi
41050 
41051     if test "x$complete" != "x$new_complete"; then
41052       GNM="$new_complete"
41053       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41054 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41055     fi
41056   fi
41057 
41058   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41059     # FIXME: we should unify this with the solaris case above.
41060 
41061 
41062   # Publish this variable in the help.
41063 
41064 
41065   if [ -z "${STRIP+x}" ]; then
41066     # The variable is not set by user, try to locate tool using the code snippet
41067     if test -n "$ac_tool_prefix"; then
41068   for ac_prog in strip
41069   do
41070     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41071 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41073 $as_echo_n "checking for $ac_word... " >&6; }
41074 if ${ac_cv_prog_STRIP+:} false; then :
41075   $as_echo_n "(cached) " >&6
41076 else
41077   if test -n "$STRIP"; then
41078   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41079 else
41080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41081 for as_dir in $PATH
41082 do
41083   IFS=$as_save_IFS
41084   test -z "$as_dir" && as_dir=.
41085     for ac_exec_ext in '' $ac_executable_extensions; do
41086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41087     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41089     break 2
41090   fi
41091 done
41092   done
41093 IFS=$as_save_IFS
41094 
41095 fi
41096 fi
41097 STRIP=$ac_cv_prog_STRIP
41098 if test -n "$STRIP"; then
41099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41100 $as_echo "$STRIP" >&6; }
41101 else
41102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103 $as_echo "no" >&6; }
41104 fi
41105 
41106 
41107     test -n "$STRIP" && break
41108   done
41109 fi
41110 if test -z "$STRIP"; then
41111   ac_ct_STRIP=$STRIP
41112   for ac_prog in strip
41113 do
41114   # Extract the first word of "$ac_prog", so it can be a program name with args.
41115 set dummy $ac_prog; ac_word=$2
41116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41117 $as_echo_n "checking for $ac_word... " >&6; }
41118 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41119   $as_echo_n "(cached) " >&6
41120 else
41121   if test -n "$ac_ct_STRIP"; then
41122   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41123 else
41124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41125 for as_dir in $PATH
41126 do
41127   IFS=$as_save_IFS
41128   test -z "$as_dir" && as_dir=.
41129     for ac_exec_ext in '' $ac_executable_extensions; do
41130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41131     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41133     break 2
41134   fi
41135 done
41136   done
41137 IFS=$as_save_IFS
41138 
41139 fi
41140 fi
41141 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41142 if test -n "$ac_ct_STRIP"; then
41143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41144 $as_echo "$ac_ct_STRIP" >&6; }
41145 else
41146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41147 $as_echo "no" >&6; }
41148 fi
41149 
41150 
41151   test -n "$ac_ct_STRIP" && break
41152 done
41153 
41154   if test "x$ac_ct_STRIP" = x; then
41155     STRIP=""
41156   else
41157     case $cross_compiling:$ac_tool_warned in
41158 yes:)
41159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41161 ac_tool_warned=yes ;;
41162 esac
41163     STRIP=$ac_ct_STRIP
41164   fi
41165 fi
41166 
41167   else
41168     # The variable is set, but is it from the command line or the environment?
41169 
41170     # Try to remove the string !STRIP! from our list.
41171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41173       # If it failed, the variable was not from the command line. Ignore it,
41174       # but warn the user (except for BASH, which is always set by the calling BASH).
41175       if test "xSTRIP" != xBASH; then
41176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41177 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41178       fi
41179       # Try to locate tool using the code snippet
41180       if test -n "$ac_tool_prefix"; then
41181   for ac_prog in strip
41182   do
41183     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41184 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41186 $as_echo_n "checking for $ac_word... " >&6; }
41187 if ${ac_cv_prog_STRIP+:} false; then :
41188   $as_echo_n "(cached) " >&6
41189 else
41190   if test -n "$STRIP"; then
41191   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41192 else
41193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41194 for as_dir in $PATH
41195 do
41196   IFS=$as_save_IFS
41197   test -z "$as_dir" && as_dir=.
41198     for ac_exec_ext in '' $ac_executable_extensions; do
41199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41200     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41202     break 2
41203   fi
41204 done
41205   done
41206 IFS=$as_save_IFS
41207 
41208 fi
41209 fi
41210 STRIP=$ac_cv_prog_STRIP
41211 if test -n "$STRIP"; then
41212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41213 $as_echo "$STRIP" >&6; }
41214 else
41215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41216 $as_echo "no" >&6; }
41217 fi
41218 
41219 
41220     test -n "$STRIP" && break
41221   done
41222 fi
41223 if test -z "$STRIP"; then
41224   ac_ct_STRIP=$STRIP
41225   for ac_prog in strip
41226 do
41227   # Extract the first word of "$ac_prog", so it can be a program name with args.
41228 set dummy $ac_prog; ac_word=$2
41229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41230 $as_echo_n "checking for $ac_word... " >&6; }
41231 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41232   $as_echo_n "(cached) " >&6
41233 else
41234   if test -n "$ac_ct_STRIP"; then
41235   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41236 else
41237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41238 for as_dir in $PATH
41239 do
41240   IFS=$as_save_IFS
41241   test -z "$as_dir" && as_dir=.
41242     for ac_exec_ext in '' $ac_executable_extensions; do
41243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41244     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41246     break 2
41247   fi
41248 done
41249   done
41250 IFS=$as_save_IFS
41251 
41252 fi
41253 fi
41254 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41255 if test -n "$ac_ct_STRIP"; then
41256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41257 $as_echo "$ac_ct_STRIP" >&6; }
41258 else
41259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41260 $as_echo "no" >&6; }
41261 fi
41262 
41263 
41264   test -n "$ac_ct_STRIP" && break
41265 done
41266 
41267   if test "x$ac_ct_STRIP" = x; then
41268     STRIP=""
41269   else
41270     case $cross_compiling:$ac_tool_warned in
41271 yes:)
41272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41273 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41274 ac_tool_warned=yes ;;
41275 esac
41276     STRIP=$ac_ct_STRIP
41277   fi
41278 fi
41279 
41280     else
41281       # If it succeeded, then it was overridden by the user. We will use it
41282       # for the tool.
41283 
41284       # First remove it from the list of overridden variables, so we can test
41285       # for unknown variables in the end.
41286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41287 
41288       # Check if we try to supply an empty value
41289       if test "x$STRIP" = x; then
41290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41291 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41293 $as_echo_n "checking for STRIP... " >&6; }
41294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41295 $as_echo "disabled" >&6; }
41296       else
41297         # Check if the provided tool contains a complete path.
41298         tool_specified="$STRIP"
41299         tool_basename="${tool_specified##*/}"
41300         if test "x$tool_basename" = "x$tool_specified"; then
41301           # A command without a complete path is provided, search $PATH.
41302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41303 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41304           # Extract the first word of "$tool_basename", so it can be a program name with args.
41305 set dummy $tool_basename; ac_word=$2
41306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41307 $as_echo_n "checking for $ac_word... " >&6; }
41308 if ${ac_cv_path_STRIP+:} false; then :
41309   $as_echo_n "(cached) " >&6
41310 else
41311   case $STRIP in
41312   [\\/]* | ?:[\\/]*)
41313   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41314   ;;
41315   *)
41316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41317 for as_dir in $PATH
41318 do
41319   IFS=$as_save_IFS
41320   test -z "$as_dir" && as_dir=.
41321     for ac_exec_ext in '' $ac_executable_extensions; do
41322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41323     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41325     break 2
41326   fi
41327 done
41328   done
41329 IFS=$as_save_IFS
41330 
41331   ;;
41332 esac
41333 fi
41334 STRIP=$ac_cv_path_STRIP
41335 if test -n "$STRIP"; then
41336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41337 $as_echo "$STRIP" >&6; }
41338 else
41339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41340 $as_echo "no" >&6; }
41341 fi
41342 
41343 
41344           if test "x$STRIP" = x; then
41345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41346           fi
41347         else
41348           # Otherwise we believe it is a complete path. Use it as it is.
41349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41350 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41352 $as_echo_n "checking for STRIP... " >&6; }
41353           if test ! -x "$tool_specified"; then
41354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41355 $as_echo "not found" >&6; }
41356             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41357           fi
41358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41359 $as_echo "$tool_specified" >&6; }
41360         fi
41361       fi
41362     fi
41363 
41364   fi
41365 
41366 
41367 
41368   # Only process if variable expands to non-empty
41369 
41370   if test "x$STRIP" != x; then
41371     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41372 
41373   # First separate the path from the arguments. This will split at the first
41374   # space.
41375   complete="$STRIP"
41376   path="${complete%% *}"
41377   tmp="$complete EOL"
41378   arguments="${tmp#* }"
41379 
41380   # Input might be given as Windows format, start by converting to
41381   # unix format.
41382   new_path=`$CYGPATH -u "$path"`
41383 
41384   # Now try to locate executable using which
41385   new_path=`$WHICH "$new_path" 2> /dev/null`
41386   # bat and cmd files are not always considered executable in cygwin causing which
41387   # to not find them
41388   if test "x$new_path" = x \
41389       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41390       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41391     new_path=`$CYGPATH -u "$path"`
41392   fi
41393   if test "x$new_path" = x; then
41394     # Oops. Which didn't find the executable.
41395     # The splitting of arguments from the executable at a space might have been incorrect,
41396     # since paths with space are more likely in Windows. Give it another try with the whole
41397     # argument.
41398     path="$complete"
41399     arguments="EOL"
41400     new_path=`$CYGPATH -u "$path"`
41401     new_path=`$WHICH "$new_path" 2> /dev/null`
41402     # bat and cmd files are not always considered executable in cygwin causing which
41403     # to not find them
41404     if test "x$new_path" = x \
41405         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41406         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41407       new_path=`$CYGPATH -u "$path"`
41408     fi
41409     if test "x$new_path" = x; then
41410       # It's still not found. Now this is an unrecoverable error.
41411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41412 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41413       has_space=`$ECHO "$complete" | $GREP " "`
41414       if test "x$has_space" != x; then
41415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41417       fi
41418       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41419     fi
41420   fi
41421 
41422   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41423   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41424   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41425   # "foo.exe" is OK but "foo" is an error.
41426   #
41427   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41428   # It is also a way to make sure we got the proper file name for the real test later on.
41429   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41430   if test "x$test_shortpath" = x; then
41431     # Short path failed, file does not exist as specified.
41432     # Try adding .exe or .cmd
41433     if test -f "${new_path}.exe"; then
41434       input_to_shortpath="${new_path}.exe"
41435     elif test -f "${new_path}.cmd"; then
41436       input_to_shortpath="${new_path}.cmd"
41437     else
41438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41439 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41440       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41441 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41442       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41443     fi
41444   else
41445     input_to_shortpath="$new_path"
41446   fi
41447 
41448   # Call helper function which possibly converts this using DOS-style short mode.
41449   # If so, the updated path is stored in $new_path.
41450   new_path="$input_to_shortpath"
41451 
41452   input_path="$input_to_shortpath"
41453   # Check if we need to convert this using DOS-style short mode. If the path
41454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41455   # take no chances and rewrite it.
41456   # Note: m4 eats our [], so we need to use [ and ] instead.
41457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41458   if test "x$has_forbidden_chars" != x; then
41459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41463       # Going to short mode and back again did indeed matter. Since short mode is
41464       # case insensitive, let's make it lowercase to improve readability.
41465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41466       # Now convert it back to Unix-style (cygpath)
41467       input_path=`$CYGPATH -u "$shortmode_path"`
41468       new_path="$input_path"
41469     fi
41470   fi
41471 
41472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41473   if test "x$test_cygdrive_prefix" = x; then
41474     # As a simple fix, exclude /usr/bin since it's not a real path.
41475     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41477       # a path prefixed by /cygdrive for fixpath to work.
41478       new_path="$CYGWIN_ROOT_PATH$input_path"
41479     fi
41480   fi
41481 
41482   # remove trailing .exe if any
41483   new_path="${new_path/%.exe/}"
41484 
41485     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41486 
41487   # First separate the path from the arguments. This will split at the first
41488   # space.
41489   complete="$STRIP"
41490   path="${complete%% *}"
41491   tmp="$complete EOL"
41492   arguments="${tmp#* }"
41493 
41494   # Input might be given as Windows format, start by converting to
41495   # unix format.
41496   new_path="$path"
41497 
41498   windows_path="$new_path"
41499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41500     unix_path=`$CYGPATH -u "$windows_path"`
41501     new_path="$unix_path"
41502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41504     new_path="$unix_path"
41505   fi
41506 
41507 
41508   # Now try to locate executable using which
41509   new_path=`$WHICH "$new_path" 2> /dev/null`
41510 
41511   if test "x$new_path" = x; then
41512     # Oops. Which didn't find the executable.
41513     # The splitting of arguments from the executable at a space might have been incorrect,
41514     # since paths with space are more likely in Windows. Give it another try with the whole
41515     # argument.
41516     path="$complete"
41517     arguments="EOL"
41518     new_path="$path"
41519 
41520   windows_path="$new_path"
41521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41522     unix_path=`$CYGPATH -u "$windows_path"`
41523     new_path="$unix_path"
41524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41526     new_path="$unix_path"
41527   fi
41528 
41529 
41530     new_path=`$WHICH "$new_path" 2> /dev/null`
41531     # bat and cmd files are not always considered executable in MSYS causing which
41532     # to not find them
41533     if test "x$new_path" = x \
41534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41536       new_path="$path"
41537 
41538   windows_path="$new_path"
41539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41540     unix_path=`$CYGPATH -u "$windows_path"`
41541     new_path="$unix_path"
41542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41544     new_path="$unix_path"
41545   fi
41546 
41547     fi
41548 
41549     if test "x$new_path" = x; then
41550       # It's still not found. Now this is an unrecoverable error.
41551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41552 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41553       has_space=`$ECHO "$complete" | $GREP " "`
41554       if test "x$has_space" != x; then
41555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41557       fi
41558       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41559     fi
41560   fi
41561 
41562   # Now new_path has a complete unix path to the binary
41563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41564     # Keep paths in /bin as-is, but remove trailing .exe if any
41565     new_path="${new_path/%.exe/}"
41566     # Do not save /bin paths to all_fixpath_prefixes!
41567   else
41568     # Not in mixed or Windows style, start by that.
41569     new_path=`cmd //c echo $new_path`
41570 
41571   input_path="$new_path"
41572   # Check if we need to convert this using DOS-style short mode. If the path
41573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41574   # take no chances and rewrite it.
41575   # Note: m4 eats our [], so we need to use [ and ] instead.
41576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41577   if test "x$has_forbidden_chars" != x; then
41578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41580   fi
41581 
41582     # Output is in $new_path
41583 
41584   windows_path="$new_path"
41585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41586     unix_path=`$CYGPATH -u "$windows_path"`
41587     new_path="$unix_path"
41588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41590     new_path="$unix_path"
41591   fi
41592 
41593     # remove trailing .exe if any
41594     new_path="${new_path/%.exe/}"
41595 
41596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41598   fi
41599 
41600     else
41601       # We're on a unix platform. Hooray! :)
41602       # First separate the path from the arguments. This will split at the first
41603       # space.
41604       complete="$STRIP"
41605       path="${complete%% *}"
41606       tmp="$complete EOL"
41607       arguments="${tmp#* }"
41608 
41609       # Cannot rely on the command "which" here since it doesn't always work.
41610       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41611       if test -z "$is_absolute_path"; then
41612         # Path to executable is not absolute. Find it.
41613         IFS_save="$IFS"
41614         IFS=:
41615         for p in $PATH; do
41616           if test -f "$p/$path" && test -x "$p/$path"; then
41617             new_path="$p/$path"
41618             break
41619           fi
41620         done
41621         IFS="$IFS_save"
41622       else
41623         # This is an absolute path, we can use it without further modifications.
41624         new_path="$path"
41625       fi
41626 
41627       if test "x$new_path" = x; then
41628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41629 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41630         has_space=`$ECHO "$complete" | $GREP " "`
41631         if test "x$has_space" != x; then
41632           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41633 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41634         fi
41635         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41636       fi
41637     fi
41638 
41639     # Now join together the path and the arguments once again
41640     if test "x$arguments" != xEOL; then
41641       new_complete="$new_path ${arguments% *}"
41642     else
41643       new_complete="$new_path"
41644     fi
41645 
41646     if test "x$complete" != "x$new_complete"; then
41647       STRIP="$new_complete"
41648       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41649 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41650     fi
41651   fi
41652 
41653     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41654 
41655 
41656   # Publish this variable in the help.
41657 
41658 
41659   if [ -z "${NM+x}" ]; then
41660     # The variable is not set by user, try to locate tool using the code snippet
41661     if test -n "$ac_tool_prefix"; then
41662   for ac_prog in nm gcc-nm
41663   do
41664     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41665 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41667 $as_echo_n "checking for $ac_word... " >&6; }
41668 if ${ac_cv_prog_NM+:} false; then :
41669   $as_echo_n "(cached) " >&6
41670 else
41671   if test -n "$NM"; then
41672   ac_cv_prog_NM="$NM" # Let the user override the test.
41673 else
41674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41675 for as_dir in $PATH
41676 do
41677   IFS=$as_save_IFS
41678   test -z "$as_dir" && as_dir=.
41679     for ac_exec_ext in '' $ac_executable_extensions; do
41680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41681     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41683     break 2
41684   fi
41685 done
41686   done
41687 IFS=$as_save_IFS
41688 
41689 fi
41690 fi
41691 NM=$ac_cv_prog_NM
41692 if test -n "$NM"; then
41693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41694 $as_echo "$NM" >&6; }
41695 else
41696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41697 $as_echo "no" >&6; }
41698 fi
41699 
41700 
41701     test -n "$NM" && break
41702   done
41703 fi
41704 if test -z "$NM"; then
41705   ac_ct_NM=$NM
41706   for ac_prog in nm gcc-nm
41707 do
41708   # Extract the first word of "$ac_prog", so it can be a program name with args.
41709 set dummy $ac_prog; ac_word=$2
41710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41711 $as_echo_n "checking for $ac_word... " >&6; }
41712 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41713   $as_echo_n "(cached) " >&6
41714 else
41715   if test -n "$ac_ct_NM"; then
41716   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41717 else
41718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41719 for as_dir in $PATH
41720 do
41721   IFS=$as_save_IFS
41722   test -z "$as_dir" && as_dir=.
41723     for ac_exec_ext in '' $ac_executable_extensions; do
41724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41725     ac_cv_prog_ac_ct_NM="$ac_prog"
41726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41727     break 2
41728   fi
41729 done
41730   done
41731 IFS=$as_save_IFS
41732 
41733 fi
41734 fi
41735 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41736 if test -n "$ac_ct_NM"; then
41737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41738 $as_echo "$ac_ct_NM" >&6; }
41739 else
41740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41741 $as_echo "no" >&6; }
41742 fi
41743 
41744 
41745   test -n "$ac_ct_NM" && break
41746 done
41747 
41748   if test "x$ac_ct_NM" = x; then
41749     NM=""
41750   else
41751     case $cross_compiling:$ac_tool_warned in
41752 yes:)
41753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41754 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41755 ac_tool_warned=yes ;;
41756 esac
41757     NM=$ac_ct_NM
41758   fi
41759 fi
41760 
41761   else
41762     # The variable is set, but is it from the command line or the environment?
41763 
41764     # Try to remove the string !NM! from our list.
41765     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41766     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41767       # If it failed, the variable was not from the command line. Ignore it,
41768       # but warn the user (except for BASH, which is always set by the calling BASH).
41769       if test "xNM" != xBASH; then
41770         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41771 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41772       fi
41773       # Try to locate tool using the code snippet
41774       if test -n "$ac_tool_prefix"; then
41775   for ac_prog in nm gcc-nm
41776   do
41777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41780 $as_echo_n "checking for $ac_word... " >&6; }
41781 if ${ac_cv_prog_NM+:} false; then :
41782   $as_echo_n "(cached) " >&6
41783 else
41784   if test -n "$NM"; then
41785   ac_cv_prog_NM="$NM" # Let the user override the test.
41786 else
41787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41788 for as_dir in $PATH
41789 do
41790   IFS=$as_save_IFS
41791   test -z "$as_dir" && as_dir=.
41792     for ac_exec_ext in '' $ac_executable_extensions; do
41793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41794     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41796     break 2
41797   fi
41798 done
41799   done
41800 IFS=$as_save_IFS
41801 
41802 fi
41803 fi
41804 NM=$ac_cv_prog_NM
41805 if test -n "$NM"; then
41806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41807 $as_echo "$NM" >&6; }
41808 else
41809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41810 $as_echo "no" >&6; }
41811 fi
41812 
41813 
41814     test -n "$NM" && break
41815   done
41816 fi
41817 if test -z "$NM"; then
41818   ac_ct_NM=$NM
41819   for ac_prog in nm gcc-nm
41820 do
41821   # Extract the first word of "$ac_prog", so it can be a program name with args.
41822 set dummy $ac_prog; ac_word=$2
41823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41824 $as_echo_n "checking for $ac_word... " >&6; }
41825 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41826   $as_echo_n "(cached) " >&6
41827 else
41828   if test -n "$ac_ct_NM"; then
41829   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41830 else
41831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41832 for as_dir in $PATH
41833 do
41834   IFS=$as_save_IFS
41835   test -z "$as_dir" && as_dir=.
41836     for ac_exec_ext in '' $ac_executable_extensions; do
41837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41838     ac_cv_prog_ac_ct_NM="$ac_prog"
41839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41840     break 2
41841   fi
41842 done
41843   done
41844 IFS=$as_save_IFS
41845 
41846 fi
41847 fi
41848 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41849 if test -n "$ac_ct_NM"; then
41850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41851 $as_echo "$ac_ct_NM" >&6; }
41852 else
41853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41854 $as_echo "no" >&6; }
41855 fi
41856 
41857 
41858   test -n "$ac_ct_NM" && break
41859 done
41860 
41861   if test "x$ac_ct_NM" = x; then
41862     NM=""
41863   else
41864     case $cross_compiling:$ac_tool_warned in
41865 yes:)
41866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41867 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41868 ac_tool_warned=yes ;;
41869 esac
41870     NM=$ac_ct_NM
41871   fi
41872 fi
41873 
41874     else
41875       # If it succeeded, then it was overridden by the user. We will use it
41876       # for the tool.
41877 
41878       # First remove it from the list of overridden variables, so we can test
41879       # for unknown variables in the end.
41880       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41881 
41882       # Check if we try to supply an empty value
41883       if test "x$NM" = x; then
41884         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41885 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41887 $as_echo_n "checking for NM... " >&6; }
41888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41889 $as_echo "disabled" >&6; }
41890       else
41891         # Check if the provided tool contains a complete path.
41892         tool_specified="$NM"
41893         tool_basename="${tool_specified##*/}"
41894         if test "x$tool_basename" = "x$tool_specified"; then
41895           # A command without a complete path is provided, search $PATH.
41896           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41897 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41898           # Extract the first word of "$tool_basename", so it can be a program name with args.
41899 set dummy $tool_basename; ac_word=$2
41900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41901 $as_echo_n "checking for $ac_word... " >&6; }
41902 if ${ac_cv_path_NM+:} false; then :
41903   $as_echo_n "(cached) " >&6
41904 else
41905   case $NM in
41906   [\\/]* | ?:[\\/]*)
41907   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41908   ;;
41909   *)
41910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41911 for as_dir in $PATH
41912 do
41913   IFS=$as_save_IFS
41914   test -z "$as_dir" && as_dir=.
41915     for ac_exec_ext in '' $ac_executable_extensions; do
41916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41917     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41919     break 2
41920   fi
41921 done
41922   done
41923 IFS=$as_save_IFS
41924 
41925   ;;
41926 esac
41927 fi
41928 NM=$ac_cv_path_NM
41929 if test -n "$NM"; then
41930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41931 $as_echo "$NM" >&6; }
41932 else
41933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41934 $as_echo "no" >&6; }
41935 fi
41936 
41937 
41938           if test "x$NM" = x; then
41939             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41940           fi
41941         else
41942           # Otherwise we believe it is a complete path. Use it as it is.
41943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41944 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41945           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41946 $as_echo_n "checking for NM... " >&6; }
41947           if test ! -x "$tool_specified"; then
41948             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41949 $as_echo "not found" >&6; }
41950             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41951           fi
41952           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41953 $as_echo "$tool_specified" >&6; }
41954         fi
41955       fi
41956     fi
41957 
41958   fi
41959 
41960 
41961     else
41962 
41963 
41964   # Publish this variable in the help.
41965 
41966 
41967   if [ -z "${NM+x}" ]; then
41968     # The variable is not set by user, try to locate tool using the code snippet
41969     if test -n "$ac_tool_prefix"; then
41970   for ac_prog in nm
41971   do
41972     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41973 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41975 $as_echo_n "checking for $ac_word... " >&6; }
41976 if ${ac_cv_prog_NM+:} false; then :
41977   $as_echo_n "(cached) " >&6
41978 else
41979   if test -n "$NM"; then
41980   ac_cv_prog_NM="$NM" # Let the user override the test.
41981 else
41982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41983 for as_dir in $PATH
41984 do
41985   IFS=$as_save_IFS
41986   test -z "$as_dir" && as_dir=.
41987     for ac_exec_ext in '' $ac_executable_extensions; do
41988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41989     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41991     break 2
41992   fi
41993 done
41994   done
41995 IFS=$as_save_IFS
41996 
41997 fi
41998 fi
41999 NM=$ac_cv_prog_NM
42000 if test -n "$NM"; then
42001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42002 $as_echo "$NM" >&6; }
42003 else
42004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42005 $as_echo "no" >&6; }
42006 fi
42007 
42008 
42009     test -n "$NM" && break
42010   done
42011 fi
42012 if test -z "$NM"; then
42013   ac_ct_NM=$NM
42014   for ac_prog in nm
42015 do
42016   # Extract the first word of "$ac_prog", so it can be a program name with args.
42017 set dummy $ac_prog; ac_word=$2
42018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42019 $as_echo_n "checking for $ac_word... " >&6; }
42020 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42021   $as_echo_n "(cached) " >&6
42022 else
42023   if test -n "$ac_ct_NM"; then
42024   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42025 else
42026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42027 for as_dir in $PATH
42028 do
42029   IFS=$as_save_IFS
42030   test -z "$as_dir" && as_dir=.
42031     for ac_exec_ext in '' $ac_executable_extensions; do
42032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42033     ac_cv_prog_ac_ct_NM="$ac_prog"
42034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42035     break 2
42036   fi
42037 done
42038   done
42039 IFS=$as_save_IFS
42040 
42041 fi
42042 fi
42043 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42044 if test -n "$ac_ct_NM"; then
42045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42046 $as_echo "$ac_ct_NM" >&6; }
42047 else
42048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42049 $as_echo "no" >&6; }
42050 fi
42051 
42052 
42053   test -n "$ac_ct_NM" && break
42054 done
42055 
42056   if test "x$ac_ct_NM" = x; then
42057     NM=""
42058   else
42059     case $cross_compiling:$ac_tool_warned in
42060 yes:)
42061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42062 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42063 ac_tool_warned=yes ;;
42064 esac
42065     NM=$ac_ct_NM
42066   fi
42067 fi
42068 
42069   else
42070     # The variable is set, but is it from the command line or the environment?
42071 
42072     # Try to remove the string !NM! from our list.
42073     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42074     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42075       # If it failed, the variable was not from the command line. Ignore it,
42076       # but warn the user (except for BASH, which is always set by the calling BASH).
42077       if test "xNM" != xBASH; then
42078         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42079 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42080       fi
42081       # Try to locate tool using the code snippet
42082       if test -n "$ac_tool_prefix"; then
42083   for ac_prog in nm
42084   do
42085     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42086 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42088 $as_echo_n "checking for $ac_word... " >&6; }
42089 if ${ac_cv_prog_NM+:} false; then :
42090   $as_echo_n "(cached) " >&6
42091 else
42092   if test -n "$NM"; then
42093   ac_cv_prog_NM="$NM" # Let the user override the test.
42094 else
42095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42096 for as_dir in $PATH
42097 do
42098   IFS=$as_save_IFS
42099   test -z "$as_dir" && as_dir=.
42100     for ac_exec_ext in '' $ac_executable_extensions; do
42101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42102     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42104     break 2
42105   fi
42106 done
42107   done
42108 IFS=$as_save_IFS
42109 
42110 fi
42111 fi
42112 NM=$ac_cv_prog_NM
42113 if test -n "$NM"; then
42114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42115 $as_echo "$NM" >&6; }
42116 else
42117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42118 $as_echo "no" >&6; }
42119 fi
42120 
42121 
42122     test -n "$NM" && break
42123   done
42124 fi
42125 if test -z "$NM"; then
42126   ac_ct_NM=$NM
42127   for ac_prog in nm
42128 do
42129   # Extract the first word of "$ac_prog", so it can be a program name with args.
42130 set dummy $ac_prog; ac_word=$2
42131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42132 $as_echo_n "checking for $ac_word... " >&6; }
42133 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42134   $as_echo_n "(cached) " >&6
42135 else
42136   if test -n "$ac_ct_NM"; then
42137   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42138 else
42139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42140 for as_dir in $PATH
42141 do
42142   IFS=$as_save_IFS
42143   test -z "$as_dir" && as_dir=.
42144     for ac_exec_ext in '' $ac_executable_extensions; do
42145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42146     ac_cv_prog_ac_ct_NM="$ac_prog"
42147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42148     break 2
42149   fi
42150 done
42151   done
42152 IFS=$as_save_IFS
42153 
42154 fi
42155 fi
42156 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42157 if test -n "$ac_ct_NM"; then
42158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42159 $as_echo "$ac_ct_NM" >&6; }
42160 else
42161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42162 $as_echo "no" >&6; }
42163 fi
42164 
42165 
42166   test -n "$ac_ct_NM" && break
42167 done
42168 
42169   if test "x$ac_ct_NM" = x; then
42170     NM=""
42171   else
42172     case $cross_compiling:$ac_tool_warned in
42173 yes:)
42174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42175 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42176 ac_tool_warned=yes ;;
42177 esac
42178     NM=$ac_ct_NM
42179   fi
42180 fi
42181 
42182     else
42183       # If it succeeded, then it was overridden by the user. We will use it
42184       # for the tool.
42185 
42186       # First remove it from the list of overridden variables, so we can test
42187       # for unknown variables in the end.
42188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42189 
42190       # Check if we try to supply an empty value
42191       if test "x$NM" = x; then
42192         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42193 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42195 $as_echo_n "checking for NM... " >&6; }
42196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42197 $as_echo "disabled" >&6; }
42198       else
42199         # Check if the provided tool contains a complete path.
42200         tool_specified="$NM"
42201         tool_basename="${tool_specified##*/}"
42202         if test "x$tool_basename" = "x$tool_specified"; then
42203           # A command without a complete path is provided, search $PATH.
42204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42205 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42206           # Extract the first word of "$tool_basename", so it can be a program name with args.
42207 set dummy $tool_basename; ac_word=$2
42208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42209 $as_echo_n "checking for $ac_word... " >&6; }
42210 if ${ac_cv_path_NM+:} false; then :
42211   $as_echo_n "(cached) " >&6
42212 else
42213   case $NM in
42214   [\\/]* | ?:[\\/]*)
42215   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42216   ;;
42217   *)
42218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42219 for as_dir in $PATH
42220 do
42221   IFS=$as_save_IFS
42222   test -z "$as_dir" && as_dir=.
42223     for ac_exec_ext in '' $ac_executable_extensions; do
42224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42225     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42227     break 2
42228   fi
42229 done
42230   done
42231 IFS=$as_save_IFS
42232 
42233   ;;
42234 esac
42235 fi
42236 NM=$ac_cv_path_NM
42237 if test -n "$NM"; then
42238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42239 $as_echo "$NM" >&6; }
42240 else
42241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42242 $as_echo "no" >&6; }
42243 fi
42244 
42245 
42246           if test "x$NM" = x; then
42247             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42248           fi
42249         else
42250           # Otherwise we believe it is a complete path. Use it as it is.
42251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42252 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42253           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42254 $as_echo_n "checking for NM... " >&6; }
42255           if test ! -x "$tool_specified"; then
42256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42257 $as_echo "not found" >&6; }
42258             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42259           fi
42260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42261 $as_echo "$tool_specified" >&6; }
42262         fi
42263       fi
42264     fi
42265 
42266   fi
42267 
42268 
42269     fi
42270 
42271   # Only process if variable expands to non-empty
42272 
42273   if test "x$NM" != x; then
42274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42275 
42276   # First separate the path from the arguments. This will split at the first
42277   # space.
42278   complete="$NM"
42279   path="${complete%% *}"
42280   tmp="$complete EOL"
42281   arguments="${tmp#* }"
42282 
42283   # Input might be given as Windows format, start by converting to
42284   # unix format.
42285   new_path=`$CYGPATH -u "$path"`
42286 
42287   # Now try to locate executable using which
42288   new_path=`$WHICH "$new_path" 2> /dev/null`
42289   # bat and cmd files are not always considered executable in cygwin causing which
42290   # to not find them
42291   if test "x$new_path" = x \
42292       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42293       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42294     new_path=`$CYGPATH -u "$path"`
42295   fi
42296   if test "x$new_path" = x; then
42297     # Oops. Which didn't find the executable.
42298     # The splitting of arguments from the executable at a space might have been incorrect,
42299     # since paths with space are more likely in Windows. Give it another try with the whole
42300     # argument.
42301     path="$complete"
42302     arguments="EOL"
42303     new_path=`$CYGPATH -u "$path"`
42304     new_path=`$WHICH "$new_path" 2> /dev/null`
42305     # bat and cmd files are not always considered executable in cygwin causing which
42306     # to not find them
42307     if test "x$new_path" = x \
42308         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42309         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42310       new_path=`$CYGPATH -u "$path"`
42311     fi
42312     if test "x$new_path" = x; then
42313       # It's still not found. Now this is an unrecoverable error.
42314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42315 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42316       has_space=`$ECHO "$complete" | $GREP " "`
42317       if test "x$has_space" != x; then
42318         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42319 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42320       fi
42321       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42322     fi
42323   fi
42324 
42325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42328   # "foo.exe" is OK but "foo" is an error.
42329   #
42330   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42331   # It is also a way to make sure we got the proper file name for the real test later on.
42332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42333   if test "x$test_shortpath" = x; then
42334     # Short path failed, file does not exist as specified.
42335     # Try adding .exe or .cmd
42336     if test -f "${new_path}.exe"; then
42337       input_to_shortpath="${new_path}.exe"
42338     elif test -f "${new_path}.cmd"; then
42339       input_to_shortpath="${new_path}.cmd"
42340     else
42341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42342 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42343       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42344 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42345       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42346     fi
42347   else
42348     input_to_shortpath="$new_path"
42349   fi
42350 
42351   # Call helper function which possibly converts this using DOS-style short mode.
42352   # If so, the updated path is stored in $new_path.
42353   new_path="$input_to_shortpath"
42354 
42355   input_path="$input_to_shortpath"
42356   # Check if we need to convert this using DOS-style short mode. If the path
42357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42358   # take no chances and rewrite it.
42359   # Note: m4 eats our [], so we need to use [ and ] instead.
42360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42361   if test "x$has_forbidden_chars" != x; then
42362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42366       # Going to short mode and back again did indeed matter. Since short mode is
42367       # case insensitive, let's make it lowercase to improve readability.
42368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42369       # Now convert it back to Unix-style (cygpath)
42370       input_path=`$CYGPATH -u "$shortmode_path"`
42371       new_path="$input_path"
42372     fi
42373   fi
42374 
42375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42376   if test "x$test_cygdrive_prefix" = x; then
42377     # As a simple fix, exclude /usr/bin since it's not a real path.
42378     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42380       # a path prefixed by /cygdrive for fixpath to work.
42381       new_path="$CYGWIN_ROOT_PATH$input_path"
42382     fi
42383   fi
42384 
42385   # remove trailing .exe if any
42386   new_path="${new_path/%.exe/}"
42387 
42388     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42389 
42390   # First separate the path from the arguments. This will split at the first
42391   # space.
42392   complete="$NM"
42393   path="${complete%% *}"
42394   tmp="$complete EOL"
42395   arguments="${tmp#* }"
42396 
42397   # Input might be given as Windows format, start by converting to
42398   # unix format.
42399   new_path="$path"
42400 
42401   windows_path="$new_path"
42402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42403     unix_path=`$CYGPATH -u "$windows_path"`
42404     new_path="$unix_path"
42405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42407     new_path="$unix_path"
42408   fi
42409 
42410 
42411   # Now try to locate executable using which
42412   new_path=`$WHICH "$new_path" 2> /dev/null`
42413 
42414   if test "x$new_path" = x; then
42415     # Oops. Which didn't find the executable.
42416     # The splitting of arguments from the executable at a space might have been incorrect,
42417     # since paths with space are more likely in Windows. Give it another try with the whole
42418     # argument.
42419     path="$complete"
42420     arguments="EOL"
42421     new_path="$path"
42422 
42423   windows_path="$new_path"
42424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42425     unix_path=`$CYGPATH -u "$windows_path"`
42426     new_path="$unix_path"
42427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42429     new_path="$unix_path"
42430   fi
42431 
42432 
42433     new_path=`$WHICH "$new_path" 2> /dev/null`
42434     # bat and cmd files are not always considered executable in MSYS causing which
42435     # to not find them
42436     if test "x$new_path" = x \
42437         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42438         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42439       new_path="$path"
42440 
42441   windows_path="$new_path"
42442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42443     unix_path=`$CYGPATH -u "$windows_path"`
42444     new_path="$unix_path"
42445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42447     new_path="$unix_path"
42448   fi
42449 
42450     fi
42451 
42452     if test "x$new_path" = x; then
42453       # It's still not found. Now this is an unrecoverable error.
42454       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42455 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42456       has_space=`$ECHO "$complete" | $GREP " "`
42457       if test "x$has_space" != x; then
42458         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42459 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42460       fi
42461       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42462     fi
42463   fi
42464 
42465   # Now new_path has a complete unix path to the binary
42466   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42467     # Keep paths in /bin as-is, but remove trailing .exe if any
42468     new_path="${new_path/%.exe/}"
42469     # Do not save /bin paths to all_fixpath_prefixes!
42470   else
42471     # Not in mixed or Windows style, start by that.
42472     new_path=`cmd //c echo $new_path`
42473 
42474   input_path="$new_path"
42475   # Check if we need to convert this using DOS-style short mode. If the path
42476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42477   # take no chances and rewrite it.
42478   # Note: m4 eats our [], so we need to use [ and ] instead.
42479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42480   if test "x$has_forbidden_chars" != x; then
42481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42482     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42483   fi
42484 
42485     # Output is in $new_path
42486 
42487   windows_path="$new_path"
42488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42489     unix_path=`$CYGPATH -u "$windows_path"`
42490     new_path="$unix_path"
42491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42493     new_path="$unix_path"
42494   fi
42495 
42496     # remove trailing .exe if any
42497     new_path="${new_path/%.exe/}"
42498 
42499     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42500     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42501   fi
42502 
42503     else
42504       # We're on a unix platform. Hooray! :)
42505       # First separate the path from the arguments. This will split at the first
42506       # space.
42507       complete="$NM"
42508       path="${complete%% *}"
42509       tmp="$complete EOL"
42510       arguments="${tmp#* }"
42511 
42512       # Cannot rely on the command "which" here since it doesn't always work.
42513       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42514       if test -z "$is_absolute_path"; then
42515         # Path to executable is not absolute. Find it.
42516         IFS_save="$IFS"
42517         IFS=:
42518         for p in $PATH; do
42519           if test -f "$p/$path" && test -x "$p/$path"; then
42520             new_path="$p/$path"
42521             break
42522           fi
42523         done
42524         IFS="$IFS_save"
42525       else
42526         # This is an absolute path, we can use it without further modifications.
42527         new_path="$path"
42528       fi
42529 
42530       if test "x$new_path" = x; then
42531         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42532 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42533         has_space=`$ECHO "$complete" | $GREP " "`
42534         if test "x$has_space" != x; then
42535           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42536 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42537         fi
42538         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42539       fi
42540     fi
42541 
42542     # Now join together the path and the arguments once again
42543     if test "x$arguments" != xEOL; then
42544       new_complete="$new_path ${arguments% *}"
42545     else
42546       new_complete="$new_path"
42547     fi
42548 
42549     if test "x$complete" != "x$new_complete"; then
42550       NM="$new_complete"
42551       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42552 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42553     fi
42554   fi
42555 
42556     GNM="$NM"
42557 
42558   fi
42559 
42560   # objcopy is used for moving debug symbols to separate files when
42561   # full debug symbols are enabled.
42562   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42563 
42564 
42565   # Publish this variable in the help.
42566 
42567 
42568   if [ -z "${OBJCOPY+x}" ]; then
42569     # The variable is not set by user, try to locate tool using the code snippet
42570     if test -n "$ac_tool_prefix"; then
42571   for ac_prog in gobjcopy objcopy
42572   do
42573     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42574 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42576 $as_echo_n "checking for $ac_word... " >&6; }
42577 if ${ac_cv_prog_OBJCOPY+:} false; then :
42578   $as_echo_n "(cached) " >&6
42579 else
42580   if test -n "$OBJCOPY"; then
42581   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42582 else
42583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42584 for as_dir in $PATH
42585 do
42586   IFS=$as_save_IFS
42587   test -z "$as_dir" && as_dir=.
42588     for ac_exec_ext in '' $ac_executable_extensions; do
42589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42590     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42592     break 2
42593   fi
42594 done
42595   done
42596 IFS=$as_save_IFS
42597 
42598 fi
42599 fi
42600 OBJCOPY=$ac_cv_prog_OBJCOPY
42601 if test -n "$OBJCOPY"; then
42602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42603 $as_echo "$OBJCOPY" >&6; }
42604 else
42605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42606 $as_echo "no" >&6; }
42607 fi
42608 
42609 
42610     test -n "$OBJCOPY" && break
42611   done
42612 fi
42613 if test -z "$OBJCOPY"; then
42614   ac_ct_OBJCOPY=$OBJCOPY
42615   for ac_prog in gobjcopy objcopy
42616 do
42617   # Extract the first word of "$ac_prog", so it can be a program name with args.
42618 set dummy $ac_prog; ac_word=$2
42619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42620 $as_echo_n "checking for $ac_word... " >&6; }
42621 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42622   $as_echo_n "(cached) " >&6
42623 else
42624   if test -n "$ac_ct_OBJCOPY"; then
42625   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42626 else
42627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42628 for as_dir in $PATH
42629 do
42630   IFS=$as_save_IFS
42631   test -z "$as_dir" && as_dir=.
42632     for ac_exec_ext in '' $ac_executable_extensions; do
42633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42634     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42636     break 2
42637   fi
42638 done
42639   done
42640 IFS=$as_save_IFS
42641 
42642 fi
42643 fi
42644 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42645 if test -n "$ac_ct_OBJCOPY"; then
42646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42647 $as_echo "$ac_ct_OBJCOPY" >&6; }
42648 else
42649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42650 $as_echo "no" >&6; }
42651 fi
42652 
42653 
42654   test -n "$ac_ct_OBJCOPY" && break
42655 done
42656 
42657   if test "x$ac_ct_OBJCOPY" = x; then
42658     OBJCOPY=""
42659   else
42660     case $cross_compiling:$ac_tool_warned in
42661 yes:)
42662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42663 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42664 ac_tool_warned=yes ;;
42665 esac
42666     OBJCOPY=$ac_ct_OBJCOPY
42667   fi
42668 fi
42669 
42670   else
42671     # The variable is set, but is it from the command line or the environment?
42672 
42673     # Try to remove the string !OBJCOPY! from our list.
42674     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42675     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42676       # If it failed, the variable was not from the command line. Ignore it,
42677       # but warn the user (except for BASH, which is always set by the calling BASH).
42678       if test "xOBJCOPY" != xBASH; then
42679         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42680 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42681       fi
42682       # Try to locate tool using the code snippet
42683       if test -n "$ac_tool_prefix"; then
42684   for ac_prog in gobjcopy objcopy
42685   do
42686     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42687 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42689 $as_echo_n "checking for $ac_word... " >&6; }
42690 if ${ac_cv_prog_OBJCOPY+:} false; then :
42691   $as_echo_n "(cached) " >&6
42692 else
42693   if test -n "$OBJCOPY"; then
42694   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42695 else
42696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42697 for as_dir in $PATH
42698 do
42699   IFS=$as_save_IFS
42700   test -z "$as_dir" && as_dir=.
42701     for ac_exec_ext in '' $ac_executable_extensions; do
42702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42703     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42705     break 2
42706   fi
42707 done
42708   done
42709 IFS=$as_save_IFS
42710 
42711 fi
42712 fi
42713 OBJCOPY=$ac_cv_prog_OBJCOPY
42714 if test -n "$OBJCOPY"; then
42715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42716 $as_echo "$OBJCOPY" >&6; }
42717 else
42718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42719 $as_echo "no" >&6; }
42720 fi
42721 
42722 
42723     test -n "$OBJCOPY" && break
42724   done
42725 fi
42726 if test -z "$OBJCOPY"; then
42727   ac_ct_OBJCOPY=$OBJCOPY
42728   for ac_prog in gobjcopy objcopy
42729 do
42730   # Extract the first word of "$ac_prog", so it can be a program name with args.
42731 set dummy $ac_prog; ac_word=$2
42732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42733 $as_echo_n "checking for $ac_word... " >&6; }
42734 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42735   $as_echo_n "(cached) " >&6
42736 else
42737   if test -n "$ac_ct_OBJCOPY"; then
42738   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42739 else
42740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42741 for as_dir in $PATH
42742 do
42743   IFS=$as_save_IFS
42744   test -z "$as_dir" && as_dir=.
42745     for ac_exec_ext in '' $ac_executable_extensions; do
42746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42747     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42749     break 2
42750   fi
42751 done
42752   done
42753 IFS=$as_save_IFS
42754 
42755 fi
42756 fi
42757 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42758 if test -n "$ac_ct_OBJCOPY"; then
42759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42760 $as_echo "$ac_ct_OBJCOPY" >&6; }
42761 else
42762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42763 $as_echo "no" >&6; }
42764 fi
42765 
42766 
42767   test -n "$ac_ct_OBJCOPY" && break
42768 done
42769 
42770   if test "x$ac_ct_OBJCOPY" = x; then
42771     OBJCOPY=""
42772   else
42773     case $cross_compiling:$ac_tool_warned in
42774 yes:)
42775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42776 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42777 ac_tool_warned=yes ;;
42778 esac
42779     OBJCOPY=$ac_ct_OBJCOPY
42780   fi
42781 fi
42782 
42783     else
42784       # If it succeeded, then it was overridden by the user. We will use it
42785       # for the tool.
42786 
42787       # First remove it from the list of overridden variables, so we can test
42788       # for unknown variables in the end.
42789       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42790 
42791       # Check if we try to supply an empty value
42792       if test "x$OBJCOPY" = x; then
42793         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42794 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42796 $as_echo_n "checking for OBJCOPY... " >&6; }
42797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42798 $as_echo "disabled" >&6; }
42799       else
42800         # Check if the provided tool contains a complete path.
42801         tool_specified="$OBJCOPY"
42802         tool_basename="${tool_specified##*/}"
42803         if test "x$tool_basename" = "x$tool_specified"; then
42804           # A command without a complete path is provided, search $PATH.
42805           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42806 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42807           # Extract the first word of "$tool_basename", so it can be a program name with args.
42808 set dummy $tool_basename; ac_word=$2
42809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42810 $as_echo_n "checking for $ac_word... " >&6; }
42811 if ${ac_cv_path_OBJCOPY+:} false; then :
42812   $as_echo_n "(cached) " >&6
42813 else
42814   case $OBJCOPY in
42815   [\\/]* | ?:[\\/]*)
42816   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42817   ;;
42818   *)
42819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42820 for as_dir in $PATH
42821 do
42822   IFS=$as_save_IFS
42823   test -z "$as_dir" && as_dir=.
42824     for ac_exec_ext in '' $ac_executable_extensions; do
42825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42826     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42828     break 2
42829   fi
42830 done
42831   done
42832 IFS=$as_save_IFS
42833 
42834   ;;
42835 esac
42836 fi
42837 OBJCOPY=$ac_cv_path_OBJCOPY
42838 if test -n "$OBJCOPY"; then
42839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42840 $as_echo "$OBJCOPY" >&6; }
42841 else
42842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42843 $as_echo "no" >&6; }
42844 fi
42845 
42846 
42847           if test "x$OBJCOPY" = x; then
42848             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42849           fi
42850         else
42851           # Otherwise we believe it is a complete path. Use it as it is.
42852           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42853 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42854           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42855 $as_echo_n "checking for OBJCOPY... " >&6; }
42856           if test ! -x "$tool_specified"; then
42857             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42858 $as_echo "not found" >&6; }
42859             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42860           fi
42861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42862 $as_echo "$tool_specified" >&6; }
42863         fi
42864       fi
42865     fi
42866 
42867   fi
42868 
42869 
42870     # Only call fixup if objcopy was found.
42871     if test -n "$OBJCOPY"; then
42872 
42873   # Only process if variable expands to non-empty
42874 
42875   if test "x$OBJCOPY" != x; then
42876     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42877 
42878   # First separate the path from the arguments. This will split at the first
42879   # space.
42880   complete="$OBJCOPY"
42881   path="${complete%% *}"
42882   tmp="$complete EOL"
42883   arguments="${tmp#* }"
42884 
42885   # Input might be given as Windows format, start by converting to
42886   # unix format.
42887   new_path=`$CYGPATH -u "$path"`
42888 
42889   # Now try to locate executable using which
42890   new_path=`$WHICH "$new_path" 2> /dev/null`
42891   # bat and cmd files are not always considered executable in cygwin causing which
42892   # to not find them
42893   if test "x$new_path" = x \
42894       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42895       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42896     new_path=`$CYGPATH -u "$path"`
42897   fi
42898   if test "x$new_path" = x; then
42899     # Oops. Which didn't find the executable.
42900     # The splitting of arguments from the executable at a space might have been incorrect,
42901     # since paths with space are more likely in Windows. Give it another try with the whole
42902     # argument.
42903     path="$complete"
42904     arguments="EOL"
42905     new_path=`$CYGPATH -u "$path"`
42906     new_path=`$WHICH "$new_path" 2> /dev/null`
42907     # bat and cmd files are not always considered executable in cygwin causing which
42908     # to not find them
42909     if test "x$new_path" = x \
42910         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42911         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42912       new_path=`$CYGPATH -u "$path"`
42913     fi
42914     if test "x$new_path" = x; then
42915       # It's still not found. Now this is an unrecoverable error.
42916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42917 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42918       has_space=`$ECHO "$complete" | $GREP " "`
42919       if test "x$has_space" != x; then
42920         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42921 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42922       fi
42923       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42924     fi
42925   fi
42926 
42927   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42928   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42929   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42930   # "foo.exe" is OK but "foo" is an error.
42931   #
42932   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42933   # It is also a way to make sure we got the proper file name for the real test later on.
42934   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42935   if test "x$test_shortpath" = x; then
42936     # Short path failed, file does not exist as specified.
42937     # Try adding .exe or .cmd
42938     if test -f "${new_path}.exe"; then
42939       input_to_shortpath="${new_path}.exe"
42940     elif test -f "${new_path}.cmd"; then
42941       input_to_shortpath="${new_path}.cmd"
42942     else
42943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42944 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42945       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42946 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42947       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42948     fi
42949   else
42950     input_to_shortpath="$new_path"
42951   fi
42952 
42953   # Call helper function which possibly converts this using DOS-style short mode.
42954   # If so, the updated path is stored in $new_path.
42955   new_path="$input_to_shortpath"
42956 
42957   input_path="$input_to_shortpath"
42958   # Check if we need to convert this using DOS-style short mode. If the path
42959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42960   # take no chances and rewrite it.
42961   # Note: m4 eats our [], so we need to use [ and ] instead.
42962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42963   if test "x$has_forbidden_chars" != x; then
42964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42965     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42966     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42967     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42968       # Going to short mode and back again did indeed matter. Since short mode is
42969       # case insensitive, let's make it lowercase to improve readability.
42970       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42971       # Now convert it back to Unix-style (cygpath)
42972       input_path=`$CYGPATH -u "$shortmode_path"`
42973       new_path="$input_path"
42974     fi
42975   fi
42976 
42977   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42978   if test "x$test_cygdrive_prefix" = x; then
42979     # As a simple fix, exclude /usr/bin since it's not a real path.
42980     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42981       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42982       # a path prefixed by /cygdrive for fixpath to work.
42983       new_path="$CYGWIN_ROOT_PATH$input_path"
42984     fi
42985   fi
42986 
42987   # remove trailing .exe if any
42988   new_path="${new_path/%.exe/}"
42989 
42990     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42991 
42992   # First separate the path from the arguments. This will split at the first
42993   # space.
42994   complete="$OBJCOPY"
42995   path="${complete%% *}"
42996   tmp="$complete EOL"
42997   arguments="${tmp#* }"
42998 
42999   # Input might be given as Windows format, start by converting to
43000   # unix format.
43001   new_path="$path"
43002 
43003   windows_path="$new_path"
43004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43005     unix_path=`$CYGPATH -u "$windows_path"`
43006     new_path="$unix_path"
43007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43009     new_path="$unix_path"
43010   fi
43011 
43012 
43013   # Now try to locate executable using which
43014   new_path=`$WHICH "$new_path" 2> /dev/null`
43015 
43016   if test "x$new_path" = x; then
43017     # Oops. Which didn't find the executable.
43018     # The splitting of arguments from the executable at a space might have been incorrect,
43019     # since paths with space are more likely in Windows. Give it another try with the whole
43020     # argument.
43021     path="$complete"
43022     arguments="EOL"
43023     new_path="$path"
43024 
43025   windows_path="$new_path"
43026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43027     unix_path=`$CYGPATH -u "$windows_path"`
43028     new_path="$unix_path"
43029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43030     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43031     new_path="$unix_path"
43032   fi
43033 
43034 
43035     new_path=`$WHICH "$new_path" 2> /dev/null`
43036     # bat and cmd files are not always considered executable in MSYS causing which
43037     # to not find them
43038     if test "x$new_path" = x \
43039         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43040         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43041       new_path="$path"
43042 
43043   windows_path="$new_path"
43044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43045     unix_path=`$CYGPATH -u "$windows_path"`
43046     new_path="$unix_path"
43047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43049     new_path="$unix_path"
43050   fi
43051 
43052     fi
43053 
43054     if test "x$new_path" = x; then
43055       # It's still not found. Now this is an unrecoverable error.
43056       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43057 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43058       has_space=`$ECHO "$complete" | $GREP " "`
43059       if test "x$has_space" != x; then
43060         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43061 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43062       fi
43063       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43064     fi
43065   fi
43066 
43067   # Now new_path has a complete unix path to the binary
43068   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43069     # Keep paths in /bin as-is, but remove trailing .exe if any
43070     new_path="${new_path/%.exe/}"
43071     # Do not save /bin paths to all_fixpath_prefixes!
43072   else
43073     # Not in mixed or Windows style, start by that.
43074     new_path=`cmd //c echo $new_path`
43075 
43076   input_path="$new_path"
43077   # Check if we need to convert this using DOS-style short mode. If the path
43078   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43079   # take no chances and rewrite it.
43080   # Note: m4 eats our [], so we need to use [ and ] instead.
43081   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43082   if test "x$has_forbidden_chars" != x; then
43083     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43084     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43085   fi
43086 
43087     # Output is in $new_path
43088 
43089   windows_path="$new_path"
43090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43091     unix_path=`$CYGPATH -u "$windows_path"`
43092     new_path="$unix_path"
43093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43095     new_path="$unix_path"
43096   fi
43097 
43098     # remove trailing .exe if any
43099     new_path="${new_path/%.exe/}"
43100 
43101     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43102     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43103   fi
43104 
43105     else
43106       # We're on a unix platform. Hooray! :)
43107       # First separate the path from the arguments. This will split at the first
43108       # space.
43109       complete="$OBJCOPY"
43110       path="${complete%% *}"
43111       tmp="$complete EOL"
43112       arguments="${tmp#* }"
43113 
43114       # Cannot rely on the command "which" here since it doesn't always work.
43115       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43116       if test -z "$is_absolute_path"; then
43117         # Path to executable is not absolute. Find it.
43118         IFS_save="$IFS"
43119         IFS=:
43120         for p in $PATH; do
43121           if test -f "$p/$path" && test -x "$p/$path"; then
43122             new_path="$p/$path"
43123             break
43124           fi
43125         done
43126         IFS="$IFS_save"
43127       else
43128         # This is an absolute path, we can use it without further modifications.
43129         new_path="$path"
43130       fi
43131 
43132       if test "x$new_path" = x; then
43133         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43134 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43135         has_space=`$ECHO "$complete" | $GREP " "`
43136         if test "x$has_space" != x; then
43137           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43138 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43139         fi
43140         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43141       fi
43142     fi
43143 
43144     # Now join together the path and the arguments once again
43145     if test "x$arguments" != xEOL; then
43146       new_complete="$new_path ${arguments% *}"
43147     else
43148       new_complete="$new_path"
43149     fi
43150 
43151     if test "x$complete" != "x$new_complete"; then
43152       OBJCOPY="$new_complete"
43153       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43154 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43155     fi
43156   fi
43157 
43158       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43159         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43160         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43161         # - version number is last blank separate word on first line
43162         # - version number formats that have been seen:
43163         #   - <major>.<minor>
43164         #   - <major>.<minor>.<micro>
43165         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43166         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43167          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43168               -e 's/.* //' \
43169               -e '/^[01]\./b bad' \
43170               -e '/^2\./{' \
43171               -e '  s/^2\.//' \
43172               -e '  /^[0-9]$/b bad' \
43173               -e '  /^[0-9]\./b bad' \
43174               -e '  /^1[0-9]$/b bad' \
43175               -e '  /^1[0-9]\./b bad' \
43176               -e '  /^20\./b bad' \
43177               -e '  /^21\.0$/b bad' \
43178               -e '  /^21\.0\./b bad' \
43179               -e '}' \
43180               -e ':good' \
43181               -e 's/.*/VALID_VERSION/p' \
43182               -e 'q' \
43183               -e ':bad' \
43184               -e 's/.*/BAD_VERSION/p' \
43185               -e 'q'`
43186         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43187           OBJCOPY=
43188           { $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
43189 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43190           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43191 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43192           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43193 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43194           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43195 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43196           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43197 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43198         fi
43199       fi
43200     fi
43201   fi
43202 
43203 
43204 
43205   # Publish this variable in the help.
43206 
43207 
43208   if [ -z "${OBJDUMP+x}" ]; then
43209     # The variable is not set by user, try to locate tool using the code snippet
43210     if test -n "$ac_tool_prefix"; then
43211   for ac_prog in gobjdump objdump
43212   do
43213     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43214 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43216 $as_echo_n "checking for $ac_word... " >&6; }
43217 if ${ac_cv_prog_OBJDUMP+:} false; then :
43218   $as_echo_n "(cached) " >&6
43219 else
43220   if test -n "$OBJDUMP"; then
43221   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43222 else
43223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43224 for as_dir in $PATH
43225 do
43226   IFS=$as_save_IFS
43227   test -z "$as_dir" && as_dir=.
43228     for ac_exec_ext in '' $ac_executable_extensions; do
43229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43230     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43232     break 2
43233   fi
43234 done
43235   done
43236 IFS=$as_save_IFS
43237 
43238 fi
43239 fi
43240 OBJDUMP=$ac_cv_prog_OBJDUMP
43241 if test -n "$OBJDUMP"; then
43242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43243 $as_echo "$OBJDUMP" >&6; }
43244 else
43245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43246 $as_echo "no" >&6; }
43247 fi
43248 
43249 
43250     test -n "$OBJDUMP" && break
43251   done
43252 fi
43253 if test -z "$OBJDUMP"; then
43254   ac_ct_OBJDUMP=$OBJDUMP
43255   for ac_prog in gobjdump objdump
43256 do
43257   # Extract the first word of "$ac_prog", so it can be a program name with args.
43258 set dummy $ac_prog; ac_word=$2
43259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43260 $as_echo_n "checking for $ac_word... " >&6; }
43261 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43262   $as_echo_n "(cached) " >&6
43263 else
43264   if test -n "$ac_ct_OBJDUMP"; then
43265   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43266 else
43267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43268 for as_dir in $PATH
43269 do
43270   IFS=$as_save_IFS
43271   test -z "$as_dir" && as_dir=.
43272     for ac_exec_ext in '' $ac_executable_extensions; do
43273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43274     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43276     break 2
43277   fi
43278 done
43279   done
43280 IFS=$as_save_IFS
43281 
43282 fi
43283 fi
43284 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43285 if test -n "$ac_ct_OBJDUMP"; then
43286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43287 $as_echo "$ac_ct_OBJDUMP" >&6; }
43288 else
43289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43290 $as_echo "no" >&6; }
43291 fi
43292 
43293 
43294   test -n "$ac_ct_OBJDUMP" && break
43295 done
43296 
43297   if test "x$ac_ct_OBJDUMP" = x; then
43298     OBJDUMP=""
43299   else
43300     case $cross_compiling:$ac_tool_warned in
43301 yes:)
43302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43303 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43304 ac_tool_warned=yes ;;
43305 esac
43306     OBJDUMP=$ac_ct_OBJDUMP
43307   fi
43308 fi
43309 
43310   else
43311     # The variable is set, but is it from the command line or the environment?
43312 
43313     # Try to remove the string !OBJDUMP! from our list.
43314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43316       # If it failed, the variable was not from the command line. Ignore it,
43317       # but warn the user (except for BASH, which is always set by the calling BASH).
43318       if test "xOBJDUMP" != xBASH; then
43319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43320 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43321       fi
43322       # Try to locate tool using the code snippet
43323       if test -n "$ac_tool_prefix"; then
43324   for ac_prog in gobjdump objdump
43325   do
43326     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43327 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43329 $as_echo_n "checking for $ac_word... " >&6; }
43330 if ${ac_cv_prog_OBJDUMP+:} false; then :
43331   $as_echo_n "(cached) " >&6
43332 else
43333   if test -n "$OBJDUMP"; then
43334   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43335 else
43336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43337 for as_dir in $PATH
43338 do
43339   IFS=$as_save_IFS
43340   test -z "$as_dir" && as_dir=.
43341     for ac_exec_ext in '' $ac_executable_extensions; do
43342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43343     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43345     break 2
43346   fi
43347 done
43348   done
43349 IFS=$as_save_IFS
43350 
43351 fi
43352 fi
43353 OBJDUMP=$ac_cv_prog_OBJDUMP
43354 if test -n "$OBJDUMP"; then
43355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43356 $as_echo "$OBJDUMP" >&6; }
43357 else
43358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43359 $as_echo "no" >&6; }
43360 fi
43361 
43362 
43363     test -n "$OBJDUMP" && break
43364   done
43365 fi
43366 if test -z "$OBJDUMP"; then
43367   ac_ct_OBJDUMP=$OBJDUMP
43368   for ac_prog in gobjdump objdump
43369 do
43370   # Extract the first word of "$ac_prog", so it can be a program name with args.
43371 set dummy $ac_prog; ac_word=$2
43372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43373 $as_echo_n "checking for $ac_word... " >&6; }
43374 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43375   $as_echo_n "(cached) " >&6
43376 else
43377   if test -n "$ac_ct_OBJDUMP"; then
43378   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43379 else
43380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43381 for as_dir in $PATH
43382 do
43383   IFS=$as_save_IFS
43384   test -z "$as_dir" && as_dir=.
43385     for ac_exec_ext in '' $ac_executable_extensions; do
43386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43387     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43389     break 2
43390   fi
43391 done
43392   done
43393 IFS=$as_save_IFS
43394 
43395 fi
43396 fi
43397 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43398 if test -n "$ac_ct_OBJDUMP"; then
43399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43400 $as_echo "$ac_ct_OBJDUMP" >&6; }
43401 else
43402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43403 $as_echo "no" >&6; }
43404 fi
43405 
43406 
43407   test -n "$ac_ct_OBJDUMP" && break
43408 done
43409 
43410   if test "x$ac_ct_OBJDUMP" = x; then
43411     OBJDUMP=""
43412   else
43413     case $cross_compiling:$ac_tool_warned in
43414 yes:)
43415 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43416 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43417 ac_tool_warned=yes ;;
43418 esac
43419     OBJDUMP=$ac_ct_OBJDUMP
43420   fi
43421 fi
43422 
43423     else
43424       # If it succeeded, then it was overridden by the user. We will use it
43425       # for the tool.
43426 
43427       # First remove it from the list of overridden variables, so we can test
43428       # for unknown variables in the end.
43429       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43430 
43431       # Check if we try to supply an empty value
43432       if test "x$OBJDUMP" = x; then
43433         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43434 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43435         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43436 $as_echo_n "checking for OBJDUMP... " >&6; }
43437         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43438 $as_echo "disabled" >&6; }
43439       else
43440         # Check if the provided tool contains a complete path.
43441         tool_specified="$OBJDUMP"
43442         tool_basename="${tool_specified##*/}"
43443         if test "x$tool_basename" = "x$tool_specified"; then
43444           # A command without a complete path is provided, search $PATH.
43445           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43446 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43447           # Extract the first word of "$tool_basename", so it can be a program name with args.
43448 set dummy $tool_basename; ac_word=$2
43449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43450 $as_echo_n "checking for $ac_word... " >&6; }
43451 if ${ac_cv_path_OBJDUMP+:} false; then :
43452   $as_echo_n "(cached) " >&6
43453 else
43454   case $OBJDUMP in
43455   [\\/]* | ?:[\\/]*)
43456   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43457   ;;
43458   *)
43459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43460 for as_dir in $PATH
43461 do
43462   IFS=$as_save_IFS
43463   test -z "$as_dir" && as_dir=.
43464     for ac_exec_ext in '' $ac_executable_extensions; do
43465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43466     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43468     break 2
43469   fi
43470 done
43471   done
43472 IFS=$as_save_IFS
43473 
43474   ;;
43475 esac
43476 fi
43477 OBJDUMP=$ac_cv_path_OBJDUMP
43478 if test -n "$OBJDUMP"; then
43479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43480 $as_echo "$OBJDUMP" >&6; }
43481 else
43482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43483 $as_echo "no" >&6; }
43484 fi
43485 
43486 
43487           if test "x$OBJDUMP" = x; then
43488             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43489           fi
43490         else
43491           # Otherwise we believe it is a complete path. Use it as it is.
43492           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43493 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43494           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43495 $as_echo_n "checking for OBJDUMP... " >&6; }
43496           if test ! -x "$tool_specified"; then
43497             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43498 $as_echo "not found" >&6; }
43499             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43500           fi
43501           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43502 $as_echo "$tool_specified" >&6; }
43503         fi
43504       fi
43505     fi
43506 
43507   fi
43508 
43509 
43510   if test "x$OBJDUMP" != x; then
43511     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43512     # bails if argument is missing.
43513 
43514   # Only process if variable expands to non-empty
43515 
43516   if test "x$OBJDUMP" != x; then
43517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43518 
43519   # First separate the path from the arguments. This will split at the first
43520   # space.
43521   complete="$OBJDUMP"
43522   path="${complete%% *}"
43523   tmp="$complete EOL"
43524   arguments="${tmp#* }"
43525 
43526   # Input might be given as Windows format, start by converting to
43527   # unix format.
43528   new_path=`$CYGPATH -u "$path"`
43529 
43530   # Now try to locate executable using which
43531   new_path=`$WHICH "$new_path" 2> /dev/null`
43532   # bat and cmd files are not always considered executable in cygwin causing which
43533   # to not find them
43534   if test "x$new_path" = x \
43535       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43536       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43537     new_path=`$CYGPATH -u "$path"`
43538   fi
43539   if test "x$new_path" = x; then
43540     # Oops. Which didn't find the executable.
43541     # The splitting of arguments from the executable at a space might have been incorrect,
43542     # since paths with space are more likely in Windows. Give it another try with the whole
43543     # argument.
43544     path="$complete"
43545     arguments="EOL"
43546     new_path=`$CYGPATH -u "$path"`
43547     new_path=`$WHICH "$new_path" 2> /dev/null`
43548     # bat and cmd files are not always considered executable in cygwin causing which
43549     # to not find them
43550     if test "x$new_path" = x \
43551         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43552         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43553       new_path=`$CYGPATH -u "$path"`
43554     fi
43555     if test "x$new_path" = x; then
43556       # It's still not found. Now this is an unrecoverable error.
43557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43558 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43559       has_space=`$ECHO "$complete" | $GREP " "`
43560       if test "x$has_space" != x; then
43561         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43562 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43563       fi
43564       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43565     fi
43566   fi
43567 
43568   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43569   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43570   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43571   # "foo.exe" is OK but "foo" is an error.
43572   #
43573   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43574   # It is also a way to make sure we got the proper file name for the real test later on.
43575   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43576   if test "x$test_shortpath" = x; then
43577     # Short path failed, file does not exist as specified.
43578     # Try adding .exe or .cmd
43579     if test -f "${new_path}.exe"; then
43580       input_to_shortpath="${new_path}.exe"
43581     elif test -f "${new_path}.cmd"; then
43582       input_to_shortpath="${new_path}.cmd"
43583     else
43584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43585 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43586       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43587 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43588       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43589     fi
43590   else
43591     input_to_shortpath="$new_path"
43592   fi
43593 
43594   # Call helper function which possibly converts this using DOS-style short mode.
43595   # If so, the updated path is stored in $new_path.
43596   new_path="$input_to_shortpath"
43597 
43598   input_path="$input_to_shortpath"
43599   # Check if we need to convert this using DOS-style short mode. If the path
43600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43601   # take no chances and rewrite it.
43602   # Note: m4 eats our [], so we need to use [ and ] instead.
43603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43604   if test "x$has_forbidden_chars" != x; then
43605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43609       # Going to short mode and back again did indeed matter. Since short mode is
43610       # case insensitive, let's make it lowercase to improve readability.
43611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43612       # Now convert it back to Unix-style (cygpath)
43613       input_path=`$CYGPATH -u "$shortmode_path"`
43614       new_path="$input_path"
43615     fi
43616   fi
43617 
43618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43619   if test "x$test_cygdrive_prefix" = x; then
43620     # As a simple fix, exclude /usr/bin since it's not a real path.
43621     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43623       # a path prefixed by /cygdrive for fixpath to work.
43624       new_path="$CYGWIN_ROOT_PATH$input_path"
43625     fi
43626   fi
43627 
43628   # remove trailing .exe if any
43629   new_path="${new_path/%.exe/}"
43630 
43631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43632 
43633   # First separate the path from the arguments. This will split at the first
43634   # space.
43635   complete="$OBJDUMP"
43636   path="${complete%% *}"
43637   tmp="$complete EOL"
43638   arguments="${tmp#* }"
43639 
43640   # Input might be given as Windows format, start by converting to
43641   # unix format.
43642   new_path="$path"
43643 
43644   windows_path="$new_path"
43645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43646     unix_path=`$CYGPATH -u "$windows_path"`
43647     new_path="$unix_path"
43648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43650     new_path="$unix_path"
43651   fi
43652 
43653 
43654   # Now try to locate executable using which
43655   new_path=`$WHICH "$new_path" 2> /dev/null`
43656 
43657   if test "x$new_path" = x; then
43658     # Oops. Which didn't find the executable.
43659     # The splitting of arguments from the executable at a space might have been incorrect,
43660     # since paths with space are more likely in Windows. Give it another try with the whole
43661     # argument.
43662     path="$complete"
43663     arguments="EOL"
43664     new_path="$path"
43665 
43666   windows_path="$new_path"
43667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43668     unix_path=`$CYGPATH -u "$windows_path"`
43669     new_path="$unix_path"
43670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43672     new_path="$unix_path"
43673   fi
43674 
43675 
43676     new_path=`$WHICH "$new_path" 2> /dev/null`
43677     # bat and cmd files are not always considered executable in MSYS causing which
43678     # to not find them
43679     if test "x$new_path" = x \
43680         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43681         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43682       new_path="$path"
43683 
43684   windows_path="$new_path"
43685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43686     unix_path=`$CYGPATH -u "$windows_path"`
43687     new_path="$unix_path"
43688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43690     new_path="$unix_path"
43691   fi
43692 
43693     fi
43694 
43695     if test "x$new_path" = x; then
43696       # It's still not found. Now this is an unrecoverable error.
43697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43698 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43699       has_space=`$ECHO "$complete" | $GREP " "`
43700       if test "x$has_space" != x; then
43701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43703       fi
43704       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43705     fi
43706   fi
43707 
43708   # Now new_path has a complete unix path to the binary
43709   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43710     # Keep paths in /bin as-is, but remove trailing .exe if any
43711     new_path="${new_path/%.exe/}"
43712     # Do not save /bin paths to all_fixpath_prefixes!
43713   else
43714     # Not in mixed or Windows style, start by that.
43715     new_path=`cmd //c echo $new_path`
43716 
43717   input_path="$new_path"
43718   # Check if we need to convert this using DOS-style short mode. If the path
43719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43720   # take no chances and rewrite it.
43721   # Note: m4 eats our [], so we need to use [ and ] instead.
43722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43723   if test "x$has_forbidden_chars" != x; then
43724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43726   fi
43727 
43728     # Output is in $new_path
43729 
43730   windows_path="$new_path"
43731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43732     unix_path=`$CYGPATH -u "$windows_path"`
43733     new_path="$unix_path"
43734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43736     new_path="$unix_path"
43737   fi
43738 
43739     # remove trailing .exe if any
43740     new_path="${new_path/%.exe/}"
43741 
43742     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43743     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43744   fi
43745 
43746     else
43747       # We're on a unix platform. Hooray! :)
43748       # First separate the path from the arguments. This will split at the first
43749       # space.
43750       complete="$OBJDUMP"
43751       path="${complete%% *}"
43752       tmp="$complete EOL"
43753       arguments="${tmp#* }"
43754 
43755       # Cannot rely on the command "which" here since it doesn't always work.
43756       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43757       if test -z "$is_absolute_path"; then
43758         # Path to executable is not absolute. Find it.
43759         IFS_save="$IFS"
43760         IFS=:
43761         for p in $PATH; do
43762           if test -f "$p/$path" && test -x "$p/$path"; then
43763             new_path="$p/$path"
43764             break
43765           fi
43766         done
43767         IFS="$IFS_save"
43768       else
43769         # This is an absolute path, we can use it without further modifications.
43770         new_path="$path"
43771       fi
43772 
43773       if test "x$new_path" = x; then
43774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43775 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43776         has_space=`$ECHO "$complete" | $GREP " "`
43777         if test "x$has_space" != x; then
43778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43780         fi
43781         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43782       fi
43783     fi
43784 
43785     # Now join together the path and the arguments once again
43786     if test "x$arguments" != xEOL; then
43787       new_complete="$new_path ${arguments% *}"
43788     else
43789       new_complete="$new_path"
43790     fi
43791 
43792     if test "x$complete" != "x$new_complete"; then
43793       OBJDUMP="$new_complete"
43794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43795 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43796     fi
43797   fi
43798 
43799   fi
43800 
43801 
43802   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43803   # to remain in place. Otherwise the compiler will not work in some siutations
43804   # in later configure checks.
43805   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43806     PATH="$OLD_PATH"
43807   fi
43808 
43809   # Restore the flags to the user specified values.
43810   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43811   CFLAGS="$ORG_CFLAGS"
43812   CXXFLAGS="$ORG_CXXFLAGS"
43813 
43814 
43815 # Finally do some processing after the detection phase
43816 
43817   if test "x$COMPILE_TYPE" = "xcross"; then
43818     # Now we need to find a C/C++ compiler that can build executables for the
43819     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43820     # used once. Also, we need to do this without adding a tools dir to the
43821     # path, otherwise we might pick up cross-compilers which don't use standard
43822     # naming.
43823 
43824     OLDPATH="$PATH"
43825 
43826 
43827 # Check whether --with-build-devkit was given.
43828 if test "${with_build_devkit+set}" = set; then :
43829   withval=$with_build_devkit;
43830 fi
43831 
43832     if test "x$with_build_devkit" = "xyes"; then
43833       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43834     elif test -n "$with_build_devkit"; then
43835       if test ! -d "$with_build_devkit"; then
43836         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43837       else
43838 
43839   # Only process if variable expands to non-empty
43840 
43841   if test "x$with_build_devkit" != x; then
43842     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43843 
43844   # Input might be given as Windows format, start by converting to
43845   # unix format.
43846   path="$with_build_devkit"
43847   new_path=`$CYGPATH -u "$path"`
43848 
43849   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43850   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43851   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43852   # "foo.exe" is OK but "foo" is an error.
43853   #
43854   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43855   # It is also a way to make sure we got the proper file name for the real test later on.
43856   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43857   if test "x$test_shortpath" = x; then
43858     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43859 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43860     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43861   fi
43862 
43863   # Call helper function which possibly converts this using DOS-style short mode.
43864   # If so, the updated path is stored in $new_path.
43865 
43866   input_path="$new_path"
43867   # Check if we need to convert this using DOS-style short mode. If the path
43868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43869   # take no chances and rewrite it.
43870   # Note: m4 eats our [], so we need to use [ and ] instead.
43871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43872   if test "x$has_forbidden_chars" != x; then
43873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43874     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43875     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43876     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43877       # Going to short mode and back again did indeed matter. Since short mode is
43878       # case insensitive, let's make it lowercase to improve readability.
43879       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43880       # Now convert it back to Unix-style (cygpath)
43881       input_path=`$CYGPATH -u "$shortmode_path"`
43882       new_path="$input_path"
43883     fi
43884   fi
43885 
43886   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43887   if test "x$test_cygdrive_prefix" = x; then
43888     # As a simple fix, exclude /usr/bin since it's not a real path.
43889     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43890       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43891       # a path prefixed by /cygdrive for fixpath to work.
43892       new_path="$CYGWIN_ROOT_PATH$input_path"
43893     fi
43894   fi
43895 
43896 
43897   if test "x$path" != "x$new_path"; then
43898     with_build_devkit="$new_path"
43899     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43900 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43901   fi
43902 
43903     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43904 
43905   path="$with_build_devkit"
43906   has_colon=`$ECHO $path | $GREP ^.:`
43907   new_path="$path"
43908   if test "x$has_colon" = x; then
43909     # Not in mixed or Windows style, start by that.
43910     new_path=`cmd //c echo $path`
43911   fi
43912 
43913 
43914   input_path="$new_path"
43915   # Check if we need to convert this using DOS-style short mode. If the path
43916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43917   # take no chances and rewrite it.
43918   # Note: m4 eats our [], so we need to use [ and ] instead.
43919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43920   if test "x$has_forbidden_chars" != x; then
43921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43922     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43923   fi
43924 
43925 
43926   windows_path="$new_path"
43927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43928     unix_path=`$CYGPATH -u "$windows_path"`
43929     new_path="$unix_path"
43930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43932     new_path="$unix_path"
43933   fi
43934 
43935   if test "x$path" != "x$new_path"; then
43936     with_build_devkit="$new_path"
43937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43938 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43939   fi
43940 
43941   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43942   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43943 
43944     else
43945       # We're on a unix platform. Hooray! :)
43946       path="$with_build_devkit"
43947       has_space=`$ECHO "$path" | $GREP " "`
43948       if test "x$has_space" != x; then
43949         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43950 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43951         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43952       fi
43953 
43954       # Use eval to expand a potential ~
43955       eval path="$path"
43956       if test ! -f "$path" && test ! -d "$path"; then
43957         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43958       fi
43959 
43960       if test -d "$path"; then
43961         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43962       else
43963         dir="`$DIRNAME "$path"`"
43964         base="`$BASENAME "$path"`"
43965         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43966       fi
43967     fi
43968   fi
43969 
43970         BUILD_DEVKIT_ROOT="$with_build_devkit"
43971         # Check for a meta data info file in the root of the devkit
43972         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43973           # Process devkit.info so that existing devkit variables are not
43974           # modified by this
43975           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43976               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43977               -e "s/\$host/\$build/g" \
43978               $BUILD_DEVKIT_ROOT/devkit.info \
43979               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43980           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43981           # This potentially sets the following:
43982           # A descriptive name of the devkit
43983 
43984   if test "x$BUILD_DEVKIT_NAME" = x; then
43985     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43986   fi
43987 
43988           # Corresponds to --with-extra-path
43989 
43990   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43991     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43992   fi
43993 
43994           # Corresponds to --with-toolchain-path
43995 
43996   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43997     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43998   fi
43999 
44000           # Corresponds to --with-sysroot
44001 
44002   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44003     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44004   fi
44005 
44006           # Skip the Window specific parts
44007         fi
44008 
44009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44010 $as_echo_n "checking for build platform devkit... " >&6; }
44011         if test "x$BUILD_DEVKIT_NAME" != x; then
44012           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44013 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44014         else
44015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44016 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44017         fi
44018 
44019         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44020 
44021   if test "x$BUILD_SYSROOT" != "x"; then
44022     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44023       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44024         # Solaris Studio does not have a concept of sysroot. Instead we must
44025         # make sure the default include and lib dirs are appended to each
44026         # compile and link command line. Must also add -I-xbuiltin to enable
44027         # inlining of system functions and intrinsics.
44028         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44029         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44030             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44031       fi
44032     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44033       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44034       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44035     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44036       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44037       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44038     fi
44039     # Propagate the sysroot args to hotspot
44040     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44041     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44042     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44043     # The global CFLAGS and LDFLAGS variables need these for configure to function
44044     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44045     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44046     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44047     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44048   fi
44049 
44050   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44051     # We also need -iframework<path>/System/Library/Frameworks
44052     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44053     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44054     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44055     # set this here so it doesn't have to be peppered throughout the forest
44056     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44057     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44058   fi
44059 
44060 
44061 
44062 
44063 
44064          # Fallback default of just /bin if DEVKIT_PATH is not defined
44065         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44066           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44067         fi
44068         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44069       fi
44070     fi
44071 
44072     # FIXME: we should list the discovered compilers as an exclude pattern!
44073     # If we do that, we can do this detection before POST_DETECTION, and still
44074     # find the build compilers in the tools dir, if needed.
44075 
44076 
44077 
44078   # Publish this variable in the help.
44079 
44080 
44081   if [ -z "${BUILD_CC+x}" ]; then
44082     # The variable is not set by user, try to locate tool using the code snippet
44083     for ac_prog in cl cc gcc
44084 do
44085   # Extract the first word of "$ac_prog", so it can be a program name with args.
44086 set dummy $ac_prog; ac_word=$2
44087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44088 $as_echo_n "checking for $ac_word... " >&6; }
44089 if ${ac_cv_path_BUILD_CC+:} false; then :
44090   $as_echo_n "(cached) " >&6
44091 else
44092   case $BUILD_CC in
44093   [\\/]* | ?:[\\/]*)
44094   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44095   ;;
44096   *)
44097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44098 for as_dir in $PATH
44099 do
44100   IFS=$as_save_IFS
44101   test -z "$as_dir" && as_dir=.
44102     for ac_exec_ext in '' $ac_executable_extensions; do
44103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44104     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44106     break 2
44107   fi
44108 done
44109   done
44110 IFS=$as_save_IFS
44111 
44112   ;;
44113 esac
44114 fi
44115 BUILD_CC=$ac_cv_path_BUILD_CC
44116 if test -n "$BUILD_CC"; then
44117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44118 $as_echo "$BUILD_CC" >&6; }
44119 else
44120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44121 $as_echo "no" >&6; }
44122 fi
44123 
44124 
44125   test -n "$BUILD_CC" && break
44126 done
44127 
44128   else
44129     # The variable is set, but is it from the command line or the environment?
44130 
44131     # Try to remove the string !BUILD_CC! from our list.
44132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44134       # If it failed, the variable was not from the command line. Ignore it,
44135       # but warn the user (except for BASH, which is always set by the calling BASH).
44136       if test "xBUILD_CC" != xBASH; then
44137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44138 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44139       fi
44140       # Try to locate tool using the code snippet
44141       for ac_prog in cl cc gcc
44142 do
44143   # Extract the first word of "$ac_prog", so it can be a program name with args.
44144 set dummy $ac_prog; ac_word=$2
44145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44146 $as_echo_n "checking for $ac_word... " >&6; }
44147 if ${ac_cv_path_BUILD_CC+:} false; then :
44148   $as_echo_n "(cached) " >&6
44149 else
44150   case $BUILD_CC in
44151   [\\/]* | ?:[\\/]*)
44152   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44153   ;;
44154   *)
44155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44156 for as_dir in $PATH
44157 do
44158   IFS=$as_save_IFS
44159   test -z "$as_dir" && as_dir=.
44160     for ac_exec_ext in '' $ac_executable_extensions; do
44161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44162     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44164     break 2
44165   fi
44166 done
44167   done
44168 IFS=$as_save_IFS
44169 
44170   ;;
44171 esac
44172 fi
44173 BUILD_CC=$ac_cv_path_BUILD_CC
44174 if test -n "$BUILD_CC"; then
44175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44176 $as_echo "$BUILD_CC" >&6; }
44177 else
44178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44179 $as_echo "no" >&6; }
44180 fi
44181 
44182 
44183   test -n "$BUILD_CC" && break
44184 done
44185 
44186     else
44187       # If it succeeded, then it was overridden by the user. We will use it
44188       # for the tool.
44189 
44190       # First remove it from the list of overridden variables, so we can test
44191       # for unknown variables in the end.
44192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44193 
44194       # Check if we try to supply an empty value
44195       if test "x$BUILD_CC" = x; then
44196         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44197 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44199 $as_echo_n "checking for BUILD_CC... " >&6; }
44200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44201 $as_echo "disabled" >&6; }
44202       else
44203         # Check if the provided tool contains a complete path.
44204         tool_specified="$BUILD_CC"
44205         tool_basename="${tool_specified##*/}"
44206         if test "x$tool_basename" = "x$tool_specified"; then
44207           # A command without a complete path is provided, search $PATH.
44208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44209 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44210           # Extract the first word of "$tool_basename", so it can be a program name with args.
44211 set dummy $tool_basename; ac_word=$2
44212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44213 $as_echo_n "checking for $ac_word... " >&6; }
44214 if ${ac_cv_path_BUILD_CC+:} false; then :
44215   $as_echo_n "(cached) " >&6
44216 else
44217   case $BUILD_CC in
44218   [\\/]* | ?:[\\/]*)
44219   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44220   ;;
44221   *)
44222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44223 for as_dir in $PATH
44224 do
44225   IFS=$as_save_IFS
44226   test -z "$as_dir" && as_dir=.
44227     for ac_exec_ext in '' $ac_executable_extensions; do
44228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44229     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44231     break 2
44232   fi
44233 done
44234   done
44235 IFS=$as_save_IFS
44236 
44237   ;;
44238 esac
44239 fi
44240 BUILD_CC=$ac_cv_path_BUILD_CC
44241 if test -n "$BUILD_CC"; then
44242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44243 $as_echo "$BUILD_CC" >&6; }
44244 else
44245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44246 $as_echo "no" >&6; }
44247 fi
44248 
44249 
44250           if test "x$BUILD_CC" = x; then
44251             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44252           fi
44253         else
44254           # Otherwise we believe it is a complete path. Use it as it is.
44255           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44256 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44257           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44258 $as_echo_n "checking for BUILD_CC... " >&6; }
44259           if test ! -x "$tool_specified"; then
44260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44261 $as_echo "not found" >&6; }
44262             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44263           fi
44264           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44265 $as_echo "$tool_specified" >&6; }
44266         fi
44267       fi
44268     fi
44269 
44270   fi
44271 
44272 
44273 
44274   if test "x$BUILD_CC" = x; then
44275     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44276   fi
44277 
44278 
44279 
44280   # Only process if variable expands to non-empty
44281 
44282   if test "x$BUILD_CC" != x; then
44283     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44284 
44285   # First separate the path from the arguments. This will split at the first
44286   # space.
44287   complete="$BUILD_CC"
44288   path="${complete%% *}"
44289   tmp="$complete EOL"
44290   arguments="${tmp#* }"
44291 
44292   # Input might be given as Windows format, start by converting to
44293   # unix format.
44294   new_path=`$CYGPATH -u "$path"`
44295 
44296   # Now try to locate executable using which
44297   new_path=`$WHICH "$new_path" 2> /dev/null`
44298   # bat and cmd files are not always considered executable in cygwin causing which
44299   # to not find them
44300   if test "x$new_path" = x \
44301       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44302       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44303     new_path=`$CYGPATH -u "$path"`
44304   fi
44305   if test "x$new_path" = x; then
44306     # Oops. Which didn't find the executable.
44307     # The splitting of arguments from the executable at a space might have been incorrect,
44308     # since paths with space are more likely in Windows. Give it another try with the whole
44309     # argument.
44310     path="$complete"
44311     arguments="EOL"
44312     new_path=`$CYGPATH -u "$path"`
44313     new_path=`$WHICH "$new_path" 2> /dev/null`
44314     # bat and cmd files are not always considered executable in cygwin causing which
44315     # to not find them
44316     if test "x$new_path" = x \
44317         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44318         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44319       new_path=`$CYGPATH -u "$path"`
44320     fi
44321     if test "x$new_path" = x; then
44322       # It's still not found. Now this is an unrecoverable error.
44323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44324 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44325       has_space=`$ECHO "$complete" | $GREP " "`
44326       if test "x$has_space" != x; then
44327         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44328 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44329       fi
44330       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44331     fi
44332   fi
44333 
44334   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44335   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44336   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44337   # "foo.exe" is OK but "foo" is an error.
44338   #
44339   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44340   # It is also a way to make sure we got the proper file name for the real test later on.
44341   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44342   if test "x$test_shortpath" = x; then
44343     # Short path failed, file does not exist as specified.
44344     # Try adding .exe or .cmd
44345     if test -f "${new_path}.exe"; then
44346       input_to_shortpath="${new_path}.exe"
44347     elif test -f "${new_path}.cmd"; then
44348       input_to_shortpath="${new_path}.cmd"
44349     else
44350       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44351 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44352       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44353 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44354       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44355     fi
44356   else
44357     input_to_shortpath="$new_path"
44358   fi
44359 
44360   # Call helper function which possibly converts this using DOS-style short mode.
44361   # If so, the updated path is stored in $new_path.
44362   new_path="$input_to_shortpath"
44363 
44364   input_path="$input_to_shortpath"
44365   # Check if we need to convert this using DOS-style short mode. If the path
44366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44367   # take no chances and rewrite it.
44368   # Note: m4 eats our [], so we need to use [ and ] instead.
44369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44370   if test "x$has_forbidden_chars" != x; then
44371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44375       # Going to short mode and back again did indeed matter. Since short mode is
44376       # case insensitive, let's make it lowercase to improve readability.
44377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44378       # Now convert it back to Unix-style (cygpath)
44379       input_path=`$CYGPATH -u "$shortmode_path"`
44380       new_path="$input_path"
44381     fi
44382   fi
44383 
44384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44385   if test "x$test_cygdrive_prefix" = x; then
44386     # As a simple fix, exclude /usr/bin since it's not a real path.
44387     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44389       # a path prefixed by /cygdrive for fixpath to work.
44390       new_path="$CYGWIN_ROOT_PATH$input_path"
44391     fi
44392   fi
44393 
44394   # remove trailing .exe if any
44395   new_path="${new_path/%.exe/}"
44396 
44397     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44398 
44399   # First separate the path from the arguments. This will split at the first
44400   # space.
44401   complete="$BUILD_CC"
44402   path="${complete%% *}"
44403   tmp="$complete EOL"
44404   arguments="${tmp#* }"
44405 
44406   # Input might be given as Windows format, start by converting to
44407   # unix format.
44408   new_path="$path"
44409 
44410   windows_path="$new_path"
44411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44412     unix_path=`$CYGPATH -u "$windows_path"`
44413     new_path="$unix_path"
44414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44416     new_path="$unix_path"
44417   fi
44418 
44419 
44420   # Now try to locate executable using which
44421   new_path=`$WHICH "$new_path" 2> /dev/null`
44422 
44423   if test "x$new_path" = x; then
44424     # Oops. Which didn't find the executable.
44425     # The splitting of arguments from the executable at a space might have been incorrect,
44426     # since paths with space are more likely in Windows. Give it another try with the whole
44427     # argument.
44428     path="$complete"
44429     arguments="EOL"
44430     new_path="$path"
44431 
44432   windows_path="$new_path"
44433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44434     unix_path=`$CYGPATH -u "$windows_path"`
44435     new_path="$unix_path"
44436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44438     new_path="$unix_path"
44439   fi
44440 
44441 
44442     new_path=`$WHICH "$new_path" 2> /dev/null`
44443     # bat and cmd files are not always considered executable in MSYS causing which
44444     # to not find them
44445     if test "x$new_path" = x \
44446         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44447         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44448       new_path="$path"
44449 
44450   windows_path="$new_path"
44451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44452     unix_path=`$CYGPATH -u "$windows_path"`
44453     new_path="$unix_path"
44454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44456     new_path="$unix_path"
44457   fi
44458 
44459     fi
44460 
44461     if test "x$new_path" = x; then
44462       # It's still not found. Now this is an unrecoverable error.
44463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44464 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44465       has_space=`$ECHO "$complete" | $GREP " "`
44466       if test "x$has_space" != x; then
44467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44469       fi
44470       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44471     fi
44472   fi
44473 
44474   # Now new_path has a complete unix path to the binary
44475   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44476     # Keep paths in /bin as-is, but remove trailing .exe if any
44477     new_path="${new_path/%.exe/}"
44478     # Do not save /bin paths to all_fixpath_prefixes!
44479   else
44480     # Not in mixed or Windows style, start by that.
44481     new_path=`cmd //c echo $new_path`
44482 
44483   input_path="$new_path"
44484   # Check if we need to convert this using DOS-style short mode. If the path
44485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44486   # take no chances and rewrite it.
44487   # Note: m4 eats our [], so we need to use [ and ] instead.
44488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44489   if test "x$has_forbidden_chars" != x; then
44490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44492   fi
44493 
44494     # Output is in $new_path
44495 
44496   windows_path="$new_path"
44497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44498     unix_path=`$CYGPATH -u "$windows_path"`
44499     new_path="$unix_path"
44500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44502     new_path="$unix_path"
44503   fi
44504 
44505     # remove trailing .exe if any
44506     new_path="${new_path/%.exe/}"
44507 
44508     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44509     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44510   fi
44511 
44512     else
44513       # We're on a unix platform. Hooray! :)
44514       # First separate the path from the arguments. This will split at the first
44515       # space.
44516       complete="$BUILD_CC"
44517       path="${complete%% *}"
44518       tmp="$complete EOL"
44519       arguments="${tmp#* }"
44520 
44521       # Cannot rely on the command "which" here since it doesn't always work.
44522       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44523       if test -z "$is_absolute_path"; then
44524         # Path to executable is not absolute. Find it.
44525         IFS_save="$IFS"
44526         IFS=:
44527         for p in $PATH; do
44528           if test -f "$p/$path" && test -x "$p/$path"; then
44529             new_path="$p/$path"
44530             break
44531           fi
44532         done
44533         IFS="$IFS_save"
44534       else
44535         # This is an absolute path, we can use it without further modifications.
44536         new_path="$path"
44537       fi
44538 
44539       if test "x$new_path" = x; then
44540         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44541 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44542         has_space=`$ECHO "$complete" | $GREP " "`
44543         if test "x$has_space" != x; then
44544           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44545 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44546         fi
44547         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44548       fi
44549     fi
44550 
44551     # Now join together the path and the arguments once again
44552     if test "x$arguments" != xEOL; then
44553       new_complete="$new_path ${arguments% *}"
44554     else
44555       new_complete="$new_path"
44556     fi
44557 
44558     if test "x$complete" != "x$new_complete"; then
44559       BUILD_CC="$new_complete"
44560       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44561 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44562     fi
44563   fi
44564 
44565 
44566 
44567 
44568   # Publish this variable in the help.
44569 
44570 
44571   if [ -z "${BUILD_CXX+x}" ]; then
44572     # The variable is not set by user, try to locate tool using the code snippet
44573     for ac_prog in cl CC g++
44574 do
44575   # Extract the first word of "$ac_prog", so it can be a program name with args.
44576 set dummy $ac_prog; ac_word=$2
44577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44578 $as_echo_n "checking for $ac_word... " >&6; }
44579 if ${ac_cv_path_BUILD_CXX+:} false; then :
44580   $as_echo_n "(cached) " >&6
44581 else
44582   case $BUILD_CXX in
44583   [\\/]* | ?:[\\/]*)
44584   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44585   ;;
44586   *)
44587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44588 for as_dir in $PATH
44589 do
44590   IFS=$as_save_IFS
44591   test -z "$as_dir" && as_dir=.
44592     for ac_exec_ext in '' $ac_executable_extensions; do
44593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44594     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44596     break 2
44597   fi
44598 done
44599   done
44600 IFS=$as_save_IFS
44601 
44602   ;;
44603 esac
44604 fi
44605 BUILD_CXX=$ac_cv_path_BUILD_CXX
44606 if test -n "$BUILD_CXX"; then
44607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44608 $as_echo "$BUILD_CXX" >&6; }
44609 else
44610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44611 $as_echo "no" >&6; }
44612 fi
44613 
44614 
44615   test -n "$BUILD_CXX" && break
44616 done
44617 
44618   else
44619     # The variable is set, but is it from the command line or the environment?
44620 
44621     # Try to remove the string !BUILD_CXX! from our list.
44622     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44623     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44624       # If it failed, the variable was not from the command line. Ignore it,
44625       # but warn the user (except for BASH, which is always set by the calling BASH).
44626       if test "xBUILD_CXX" != xBASH; then
44627         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44628 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44629       fi
44630       # Try to locate tool using the code snippet
44631       for ac_prog in cl CC g++
44632 do
44633   # Extract the first word of "$ac_prog", so it can be a program name with args.
44634 set dummy $ac_prog; ac_word=$2
44635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44636 $as_echo_n "checking for $ac_word... " >&6; }
44637 if ${ac_cv_path_BUILD_CXX+:} false; then :
44638   $as_echo_n "(cached) " >&6
44639 else
44640   case $BUILD_CXX in
44641   [\\/]* | ?:[\\/]*)
44642   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44643   ;;
44644   *)
44645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44646 for as_dir in $PATH
44647 do
44648   IFS=$as_save_IFS
44649   test -z "$as_dir" && as_dir=.
44650     for ac_exec_ext in '' $ac_executable_extensions; do
44651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44652     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44654     break 2
44655   fi
44656 done
44657   done
44658 IFS=$as_save_IFS
44659 
44660   ;;
44661 esac
44662 fi
44663 BUILD_CXX=$ac_cv_path_BUILD_CXX
44664 if test -n "$BUILD_CXX"; then
44665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44666 $as_echo "$BUILD_CXX" >&6; }
44667 else
44668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44669 $as_echo "no" >&6; }
44670 fi
44671 
44672 
44673   test -n "$BUILD_CXX" && break
44674 done
44675 
44676     else
44677       # If it succeeded, then it was overridden by the user. We will use it
44678       # for the tool.
44679 
44680       # First remove it from the list of overridden variables, so we can test
44681       # for unknown variables in the end.
44682       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44683 
44684       # Check if we try to supply an empty value
44685       if test "x$BUILD_CXX" = x; then
44686         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44687 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44688         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44689 $as_echo_n "checking for BUILD_CXX... " >&6; }
44690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44691 $as_echo "disabled" >&6; }
44692       else
44693         # Check if the provided tool contains a complete path.
44694         tool_specified="$BUILD_CXX"
44695         tool_basename="${tool_specified##*/}"
44696         if test "x$tool_basename" = "x$tool_specified"; then
44697           # A command without a complete path is provided, search $PATH.
44698           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44699 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44700           # Extract the first word of "$tool_basename", so it can be a program name with args.
44701 set dummy $tool_basename; ac_word=$2
44702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44703 $as_echo_n "checking for $ac_word... " >&6; }
44704 if ${ac_cv_path_BUILD_CXX+:} false; then :
44705   $as_echo_n "(cached) " >&6
44706 else
44707   case $BUILD_CXX in
44708   [\\/]* | ?:[\\/]*)
44709   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44710   ;;
44711   *)
44712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44713 for as_dir in $PATH
44714 do
44715   IFS=$as_save_IFS
44716   test -z "$as_dir" && as_dir=.
44717     for ac_exec_ext in '' $ac_executable_extensions; do
44718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44719     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44721     break 2
44722   fi
44723 done
44724   done
44725 IFS=$as_save_IFS
44726 
44727   ;;
44728 esac
44729 fi
44730 BUILD_CXX=$ac_cv_path_BUILD_CXX
44731 if test -n "$BUILD_CXX"; then
44732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44733 $as_echo "$BUILD_CXX" >&6; }
44734 else
44735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44736 $as_echo "no" >&6; }
44737 fi
44738 
44739 
44740           if test "x$BUILD_CXX" = x; then
44741             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44742           fi
44743         else
44744           # Otherwise we believe it is a complete path. Use it as it is.
44745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44746 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44747           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44748 $as_echo_n "checking for BUILD_CXX... " >&6; }
44749           if test ! -x "$tool_specified"; then
44750             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44751 $as_echo "not found" >&6; }
44752             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44753           fi
44754           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44755 $as_echo "$tool_specified" >&6; }
44756         fi
44757       fi
44758     fi
44759 
44760   fi
44761 
44762 
44763 
44764   if test "x$BUILD_CXX" = x; then
44765     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44766   fi
44767 
44768 
44769 
44770   # Only process if variable expands to non-empty
44771 
44772   if test "x$BUILD_CXX" != x; then
44773     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44774 
44775   # First separate the path from the arguments. This will split at the first
44776   # space.
44777   complete="$BUILD_CXX"
44778   path="${complete%% *}"
44779   tmp="$complete EOL"
44780   arguments="${tmp#* }"
44781 
44782   # Input might be given as Windows format, start by converting to
44783   # unix format.
44784   new_path=`$CYGPATH -u "$path"`
44785 
44786   # Now try to locate executable using which
44787   new_path=`$WHICH "$new_path" 2> /dev/null`
44788   # bat and cmd files are not always considered executable in cygwin causing which
44789   # to not find them
44790   if test "x$new_path" = x \
44791       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44792       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44793     new_path=`$CYGPATH -u "$path"`
44794   fi
44795   if test "x$new_path" = x; then
44796     # Oops. Which didn't find the executable.
44797     # The splitting of arguments from the executable at a space might have been incorrect,
44798     # since paths with space are more likely in Windows. Give it another try with the whole
44799     # argument.
44800     path="$complete"
44801     arguments="EOL"
44802     new_path=`$CYGPATH -u "$path"`
44803     new_path=`$WHICH "$new_path" 2> /dev/null`
44804     # bat and cmd files are not always considered executable in cygwin causing which
44805     # to not find them
44806     if test "x$new_path" = x \
44807         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44808         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44809       new_path=`$CYGPATH -u "$path"`
44810     fi
44811     if test "x$new_path" = x; then
44812       # It's still not found. Now this is an unrecoverable error.
44813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44814 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44815       has_space=`$ECHO "$complete" | $GREP " "`
44816       if test "x$has_space" != x; then
44817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44819       fi
44820       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44821     fi
44822   fi
44823 
44824   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44825   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44826   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44827   # "foo.exe" is OK but "foo" is an error.
44828   #
44829   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44830   # It is also a way to make sure we got the proper file name for the real test later on.
44831   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44832   if test "x$test_shortpath" = x; then
44833     # Short path failed, file does not exist as specified.
44834     # Try adding .exe or .cmd
44835     if test -f "${new_path}.exe"; then
44836       input_to_shortpath="${new_path}.exe"
44837     elif test -f "${new_path}.cmd"; then
44838       input_to_shortpath="${new_path}.cmd"
44839     else
44840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44841 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44842       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44843 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44844       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44845     fi
44846   else
44847     input_to_shortpath="$new_path"
44848   fi
44849 
44850   # Call helper function which possibly converts this using DOS-style short mode.
44851   # If so, the updated path is stored in $new_path.
44852   new_path="$input_to_shortpath"
44853 
44854   input_path="$input_to_shortpath"
44855   # Check if we need to convert this using DOS-style short mode. If the path
44856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44857   # take no chances and rewrite it.
44858   # Note: m4 eats our [], so we need to use [ and ] instead.
44859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44860   if test "x$has_forbidden_chars" != x; then
44861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44865       # Going to short mode and back again did indeed matter. Since short mode is
44866       # case insensitive, let's make it lowercase to improve readability.
44867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44868       # Now convert it back to Unix-style (cygpath)
44869       input_path=`$CYGPATH -u "$shortmode_path"`
44870       new_path="$input_path"
44871     fi
44872   fi
44873 
44874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44875   if test "x$test_cygdrive_prefix" = x; then
44876     # As a simple fix, exclude /usr/bin since it's not a real path.
44877     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44879       # a path prefixed by /cygdrive for fixpath to work.
44880       new_path="$CYGWIN_ROOT_PATH$input_path"
44881     fi
44882   fi
44883 
44884   # remove trailing .exe if any
44885   new_path="${new_path/%.exe/}"
44886 
44887     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44888 
44889   # First separate the path from the arguments. This will split at the first
44890   # space.
44891   complete="$BUILD_CXX"
44892   path="${complete%% *}"
44893   tmp="$complete EOL"
44894   arguments="${tmp#* }"
44895 
44896   # Input might be given as Windows format, start by converting to
44897   # unix format.
44898   new_path="$path"
44899 
44900   windows_path="$new_path"
44901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44902     unix_path=`$CYGPATH -u "$windows_path"`
44903     new_path="$unix_path"
44904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44906     new_path="$unix_path"
44907   fi
44908 
44909 
44910   # Now try to locate executable using which
44911   new_path=`$WHICH "$new_path" 2> /dev/null`
44912 
44913   if test "x$new_path" = x; then
44914     # Oops. Which didn't find the executable.
44915     # The splitting of arguments from the executable at a space might have been incorrect,
44916     # since paths with space are more likely in Windows. Give it another try with the whole
44917     # argument.
44918     path="$complete"
44919     arguments="EOL"
44920     new_path="$path"
44921 
44922   windows_path="$new_path"
44923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44924     unix_path=`$CYGPATH -u "$windows_path"`
44925     new_path="$unix_path"
44926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44928     new_path="$unix_path"
44929   fi
44930 
44931 
44932     new_path=`$WHICH "$new_path" 2> /dev/null`
44933     # bat and cmd files are not always considered executable in MSYS causing which
44934     # to not find them
44935     if test "x$new_path" = x \
44936         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44937         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44938       new_path="$path"
44939 
44940   windows_path="$new_path"
44941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44942     unix_path=`$CYGPATH -u "$windows_path"`
44943     new_path="$unix_path"
44944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44946     new_path="$unix_path"
44947   fi
44948 
44949     fi
44950 
44951     if test "x$new_path" = x; then
44952       # It's still not found. Now this is an unrecoverable error.
44953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44954 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44955       has_space=`$ECHO "$complete" | $GREP " "`
44956       if test "x$has_space" != x; then
44957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44959       fi
44960       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44961     fi
44962   fi
44963 
44964   # Now new_path has a complete unix path to the binary
44965   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44966     # Keep paths in /bin as-is, but remove trailing .exe if any
44967     new_path="${new_path/%.exe/}"
44968     # Do not save /bin paths to all_fixpath_prefixes!
44969   else
44970     # Not in mixed or Windows style, start by that.
44971     new_path=`cmd //c echo $new_path`
44972 
44973   input_path="$new_path"
44974   # Check if we need to convert this using DOS-style short mode. If the path
44975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44976   # take no chances and rewrite it.
44977   # Note: m4 eats our [], so we need to use [ and ] instead.
44978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44979   if test "x$has_forbidden_chars" != x; then
44980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44982   fi
44983 
44984     # Output is in $new_path
44985 
44986   windows_path="$new_path"
44987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44988     unix_path=`$CYGPATH -u "$windows_path"`
44989     new_path="$unix_path"
44990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44992     new_path="$unix_path"
44993   fi
44994 
44995     # remove trailing .exe if any
44996     new_path="${new_path/%.exe/}"
44997 
44998     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44999     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45000   fi
45001 
45002     else
45003       # We're on a unix platform. Hooray! :)
45004       # First separate the path from the arguments. This will split at the first
45005       # space.
45006       complete="$BUILD_CXX"
45007       path="${complete%% *}"
45008       tmp="$complete EOL"
45009       arguments="${tmp#* }"
45010 
45011       # Cannot rely on the command "which" here since it doesn't always work.
45012       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45013       if test -z "$is_absolute_path"; then
45014         # Path to executable is not absolute. Find it.
45015         IFS_save="$IFS"
45016         IFS=:
45017         for p in $PATH; do
45018           if test -f "$p/$path" && test -x "$p/$path"; then
45019             new_path="$p/$path"
45020             break
45021           fi
45022         done
45023         IFS="$IFS_save"
45024       else
45025         # This is an absolute path, we can use it without further modifications.
45026         new_path="$path"
45027       fi
45028 
45029       if test "x$new_path" = x; then
45030         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45031 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45032         has_space=`$ECHO "$complete" | $GREP " "`
45033         if test "x$has_space" != x; then
45034           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45035 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45036         fi
45037         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45038       fi
45039     fi
45040 
45041     # Now join together the path and the arguments once again
45042     if test "x$arguments" != xEOL; then
45043       new_complete="$new_path ${arguments% *}"
45044     else
45045       new_complete="$new_path"
45046     fi
45047 
45048     if test "x$complete" != "x$new_complete"; then
45049       BUILD_CXX="$new_complete"
45050       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45051 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45052     fi
45053   fi
45054 
45055 
45056 
45057   # Publish this variable in the help.
45058 
45059 
45060   if [ -z "${BUILD_NM+x}" ]; then
45061     # The variable is not set by user, try to locate tool using the code snippet
45062     for ac_prog in nm gcc-nm
45063 do
45064   # Extract the first word of "$ac_prog", so it can be a program name with args.
45065 set dummy $ac_prog; ac_word=$2
45066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45067 $as_echo_n "checking for $ac_word... " >&6; }
45068 if ${ac_cv_path_BUILD_NM+:} false; then :
45069   $as_echo_n "(cached) " >&6
45070 else
45071   case $BUILD_NM in
45072   [\\/]* | ?:[\\/]*)
45073   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45074   ;;
45075   *)
45076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45077 for as_dir in $PATH
45078 do
45079   IFS=$as_save_IFS
45080   test -z "$as_dir" && as_dir=.
45081     for ac_exec_ext in '' $ac_executable_extensions; do
45082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45083     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45085     break 2
45086   fi
45087 done
45088   done
45089 IFS=$as_save_IFS
45090 
45091   ;;
45092 esac
45093 fi
45094 BUILD_NM=$ac_cv_path_BUILD_NM
45095 if test -n "$BUILD_NM"; then
45096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45097 $as_echo "$BUILD_NM" >&6; }
45098 else
45099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45100 $as_echo "no" >&6; }
45101 fi
45102 
45103 
45104   test -n "$BUILD_NM" && break
45105 done
45106 
45107   else
45108     # The variable is set, but is it from the command line or the environment?
45109 
45110     # Try to remove the string !BUILD_NM! from our list.
45111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45113       # If it failed, the variable was not from the command line. Ignore it,
45114       # but warn the user (except for BASH, which is always set by the calling BASH).
45115       if test "xBUILD_NM" != xBASH; then
45116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45117 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45118       fi
45119       # Try to locate tool using the code snippet
45120       for ac_prog in nm gcc-nm
45121 do
45122   # Extract the first word of "$ac_prog", so it can be a program name with args.
45123 set dummy $ac_prog; ac_word=$2
45124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45125 $as_echo_n "checking for $ac_word... " >&6; }
45126 if ${ac_cv_path_BUILD_NM+:} false; then :
45127   $as_echo_n "(cached) " >&6
45128 else
45129   case $BUILD_NM in
45130   [\\/]* | ?:[\\/]*)
45131   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45132   ;;
45133   *)
45134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45135 for as_dir in $PATH
45136 do
45137   IFS=$as_save_IFS
45138   test -z "$as_dir" && as_dir=.
45139     for ac_exec_ext in '' $ac_executable_extensions; do
45140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45141     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45143     break 2
45144   fi
45145 done
45146   done
45147 IFS=$as_save_IFS
45148 
45149   ;;
45150 esac
45151 fi
45152 BUILD_NM=$ac_cv_path_BUILD_NM
45153 if test -n "$BUILD_NM"; then
45154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45155 $as_echo "$BUILD_NM" >&6; }
45156 else
45157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45158 $as_echo "no" >&6; }
45159 fi
45160 
45161 
45162   test -n "$BUILD_NM" && break
45163 done
45164 
45165     else
45166       # If it succeeded, then it was overridden by the user. We will use it
45167       # for the tool.
45168 
45169       # First remove it from the list of overridden variables, so we can test
45170       # for unknown variables in the end.
45171       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45172 
45173       # Check if we try to supply an empty value
45174       if test "x$BUILD_NM" = x; then
45175         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45176 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45178 $as_echo_n "checking for BUILD_NM... " >&6; }
45179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45180 $as_echo "disabled" >&6; }
45181       else
45182         # Check if the provided tool contains a complete path.
45183         tool_specified="$BUILD_NM"
45184         tool_basename="${tool_specified##*/}"
45185         if test "x$tool_basename" = "x$tool_specified"; then
45186           # A command without a complete path is provided, search $PATH.
45187           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45188 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45189           # Extract the first word of "$tool_basename", so it can be a program name with args.
45190 set dummy $tool_basename; ac_word=$2
45191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45192 $as_echo_n "checking for $ac_word... " >&6; }
45193 if ${ac_cv_path_BUILD_NM+:} false; then :
45194   $as_echo_n "(cached) " >&6
45195 else
45196   case $BUILD_NM in
45197   [\\/]* | ?:[\\/]*)
45198   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45199   ;;
45200   *)
45201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45202 for as_dir in $PATH
45203 do
45204   IFS=$as_save_IFS
45205   test -z "$as_dir" && as_dir=.
45206     for ac_exec_ext in '' $ac_executable_extensions; do
45207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45208     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45210     break 2
45211   fi
45212 done
45213   done
45214 IFS=$as_save_IFS
45215 
45216   ;;
45217 esac
45218 fi
45219 BUILD_NM=$ac_cv_path_BUILD_NM
45220 if test -n "$BUILD_NM"; then
45221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45222 $as_echo "$BUILD_NM" >&6; }
45223 else
45224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45225 $as_echo "no" >&6; }
45226 fi
45227 
45228 
45229           if test "x$BUILD_NM" = x; then
45230             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45231           fi
45232         else
45233           # Otherwise we believe it is a complete path. Use it as it is.
45234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45235 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45236           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45237 $as_echo_n "checking for BUILD_NM... " >&6; }
45238           if test ! -x "$tool_specified"; then
45239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45240 $as_echo "not found" >&6; }
45241             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45242           fi
45243           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45244 $as_echo "$tool_specified" >&6; }
45245         fi
45246       fi
45247     fi
45248 
45249   fi
45250 
45251 
45252 
45253   # Only process if variable expands to non-empty
45254 
45255   if test "x$BUILD_NM" != x; then
45256     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45257 
45258   # First separate the path from the arguments. This will split at the first
45259   # space.
45260   complete="$BUILD_NM"
45261   path="${complete%% *}"
45262   tmp="$complete EOL"
45263   arguments="${tmp#* }"
45264 
45265   # Input might be given as Windows format, start by converting to
45266   # unix format.
45267   new_path=`$CYGPATH -u "$path"`
45268 
45269   # Now try to locate executable using which
45270   new_path=`$WHICH "$new_path" 2> /dev/null`
45271   # bat and cmd files are not always considered executable in cygwin causing which
45272   # to not find them
45273   if test "x$new_path" = x \
45274       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45275       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45276     new_path=`$CYGPATH -u "$path"`
45277   fi
45278   if test "x$new_path" = x; then
45279     # Oops. Which didn't find the executable.
45280     # The splitting of arguments from the executable at a space might have been incorrect,
45281     # since paths with space are more likely in Windows. Give it another try with the whole
45282     # argument.
45283     path="$complete"
45284     arguments="EOL"
45285     new_path=`$CYGPATH -u "$path"`
45286     new_path=`$WHICH "$new_path" 2> /dev/null`
45287     # bat and cmd files are not always considered executable in cygwin causing which
45288     # to not find them
45289     if test "x$new_path" = x \
45290         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45291         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45292       new_path=`$CYGPATH -u "$path"`
45293     fi
45294     if test "x$new_path" = x; then
45295       # It's still not found. Now this is an unrecoverable error.
45296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45297 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45298       has_space=`$ECHO "$complete" | $GREP " "`
45299       if test "x$has_space" != x; then
45300         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45301 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45302       fi
45303       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45304     fi
45305   fi
45306 
45307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45310   # "foo.exe" is OK but "foo" is an error.
45311   #
45312   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45313   # It is also a way to make sure we got the proper file name for the real test later on.
45314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45315   if test "x$test_shortpath" = x; then
45316     # Short path failed, file does not exist as specified.
45317     # Try adding .exe or .cmd
45318     if test -f "${new_path}.exe"; then
45319       input_to_shortpath="${new_path}.exe"
45320     elif test -f "${new_path}.cmd"; then
45321       input_to_shortpath="${new_path}.cmd"
45322     else
45323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45324 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45325       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45326 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45327       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45328     fi
45329   else
45330     input_to_shortpath="$new_path"
45331   fi
45332 
45333   # Call helper function which possibly converts this using DOS-style short mode.
45334   # If so, the updated path is stored in $new_path.
45335   new_path="$input_to_shortpath"
45336 
45337   input_path="$input_to_shortpath"
45338   # Check if we need to convert this using DOS-style short mode. If the path
45339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45340   # take no chances and rewrite it.
45341   # Note: m4 eats our [], so we need to use [ and ] instead.
45342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45343   if test "x$has_forbidden_chars" != x; then
45344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45348       # Going to short mode and back again did indeed matter. Since short mode is
45349       # case insensitive, let's make it lowercase to improve readability.
45350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45351       # Now convert it back to Unix-style (cygpath)
45352       input_path=`$CYGPATH -u "$shortmode_path"`
45353       new_path="$input_path"
45354     fi
45355   fi
45356 
45357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45358   if test "x$test_cygdrive_prefix" = x; then
45359     # As a simple fix, exclude /usr/bin since it's not a real path.
45360     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45362       # a path prefixed by /cygdrive for fixpath to work.
45363       new_path="$CYGWIN_ROOT_PATH$input_path"
45364     fi
45365   fi
45366 
45367   # remove trailing .exe if any
45368   new_path="${new_path/%.exe/}"
45369 
45370     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45371 
45372   # First separate the path from the arguments. This will split at the first
45373   # space.
45374   complete="$BUILD_NM"
45375   path="${complete%% *}"
45376   tmp="$complete EOL"
45377   arguments="${tmp#* }"
45378 
45379   # Input might be given as Windows format, start by converting to
45380   # unix format.
45381   new_path="$path"
45382 
45383   windows_path="$new_path"
45384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45385     unix_path=`$CYGPATH -u "$windows_path"`
45386     new_path="$unix_path"
45387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45389     new_path="$unix_path"
45390   fi
45391 
45392 
45393   # Now try to locate executable using which
45394   new_path=`$WHICH "$new_path" 2> /dev/null`
45395 
45396   if test "x$new_path" = x; then
45397     # Oops. Which didn't find the executable.
45398     # The splitting of arguments from the executable at a space might have been incorrect,
45399     # since paths with space are more likely in Windows. Give it another try with the whole
45400     # argument.
45401     path="$complete"
45402     arguments="EOL"
45403     new_path="$path"
45404 
45405   windows_path="$new_path"
45406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45407     unix_path=`$CYGPATH -u "$windows_path"`
45408     new_path="$unix_path"
45409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45411     new_path="$unix_path"
45412   fi
45413 
45414 
45415     new_path=`$WHICH "$new_path" 2> /dev/null`
45416     # bat and cmd files are not always considered executable in MSYS causing which
45417     # to not find them
45418     if test "x$new_path" = x \
45419         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45420         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45421       new_path="$path"
45422 
45423   windows_path="$new_path"
45424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45425     unix_path=`$CYGPATH -u "$windows_path"`
45426     new_path="$unix_path"
45427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45429     new_path="$unix_path"
45430   fi
45431 
45432     fi
45433 
45434     if test "x$new_path" = x; then
45435       # It's still not found. Now this is an unrecoverable error.
45436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45437 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45438       has_space=`$ECHO "$complete" | $GREP " "`
45439       if test "x$has_space" != x; then
45440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45442       fi
45443       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45444     fi
45445   fi
45446 
45447   # Now new_path has a complete unix path to the binary
45448   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45449     # Keep paths in /bin as-is, but remove trailing .exe if any
45450     new_path="${new_path/%.exe/}"
45451     # Do not save /bin paths to all_fixpath_prefixes!
45452   else
45453     # Not in mixed or Windows style, start by that.
45454     new_path=`cmd //c echo $new_path`
45455 
45456   input_path="$new_path"
45457   # Check if we need to convert this using DOS-style short mode. If the path
45458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45459   # take no chances and rewrite it.
45460   # Note: m4 eats our [], so we need to use [ and ] instead.
45461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45462   if test "x$has_forbidden_chars" != x; then
45463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45464     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45465   fi
45466 
45467     # Output is in $new_path
45468 
45469   windows_path="$new_path"
45470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45471     unix_path=`$CYGPATH -u "$windows_path"`
45472     new_path="$unix_path"
45473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45475     new_path="$unix_path"
45476   fi
45477 
45478     # remove trailing .exe if any
45479     new_path="${new_path/%.exe/}"
45480 
45481     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45482     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45483   fi
45484 
45485     else
45486       # We're on a unix platform. Hooray! :)
45487       # First separate the path from the arguments. This will split at the first
45488       # space.
45489       complete="$BUILD_NM"
45490       path="${complete%% *}"
45491       tmp="$complete EOL"
45492       arguments="${tmp#* }"
45493 
45494       # Cannot rely on the command "which" here since it doesn't always work.
45495       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45496       if test -z "$is_absolute_path"; then
45497         # Path to executable is not absolute. Find it.
45498         IFS_save="$IFS"
45499         IFS=:
45500         for p in $PATH; do
45501           if test -f "$p/$path" && test -x "$p/$path"; then
45502             new_path="$p/$path"
45503             break
45504           fi
45505         done
45506         IFS="$IFS_save"
45507       else
45508         # This is an absolute path, we can use it without further modifications.
45509         new_path="$path"
45510       fi
45511 
45512       if test "x$new_path" = x; then
45513         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45514 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45515         has_space=`$ECHO "$complete" | $GREP " "`
45516         if test "x$has_space" != x; then
45517           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45518 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45519         fi
45520         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45521       fi
45522     fi
45523 
45524     # Now join together the path and the arguments once again
45525     if test "x$arguments" != xEOL; then
45526       new_complete="$new_path ${arguments% *}"
45527     else
45528       new_complete="$new_path"
45529     fi
45530 
45531     if test "x$complete" != "x$new_complete"; then
45532       BUILD_NM="$new_complete"
45533       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45534 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45535     fi
45536   fi
45537 
45538 
45539 
45540   # Publish this variable in the help.
45541 
45542 
45543   if [ -z "${BUILD_AR+x}" ]; then
45544     # The variable is not set by user, try to locate tool using the code snippet
45545     for ac_prog in ar gcc-ar
45546 do
45547   # Extract the first word of "$ac_prog", so it can be a program name with args.
45548 set dummy $ac_prog; ac_word=$2
45549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45550 $as_echo_n "checking for $ac_word... " >&6; }
45551 if ${ac_cv_path_BUILD_AR+:} false; then :
45552   $as_echo_n "(cached) " >&6
45553 else
45554   case $BUILD_AR in
45555   [\\/]* | ?:[\\/]*)
45556   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45557   ;;
45558   *)
45559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45560 for as_dir in $PATH
45561 do
45562   IFS=$as_save_IFS
45563   test -z "$as_dir" && as_dir=.
45564     for ac_exec_ext in '' $ac_executable_extensions; do
45565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45566     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45568     break 2
45569   fi
45570 done
45571   done
45572 IFS=$as_save_IFS
45573 
45574   ;;
45575 esac
45576 fi
45577 BUILD_AR=$ac_cv_path_BUILD_AR
45578 if test -n "$BUILD_AR"; then
45579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45580 $as_echo "$BUILD_AR" >&6; }
45581 else
45582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45583 $as_echo "no" >&6; }
45584 fi
45585 
45586 
45587   test -n "$BUILD_AR" && break
45588 done
45589 
45590   else
45591     # The variable is set, but is it from the command line or the environment?
45592 
45593     # Try to remove the string !BUILD_AR! from our list.
45594     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45595     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45596       # If it failed, the variable was not from the command line. Ignore it,
45597       # but warn the user (except for BASH, which is always set by the calling BASH).
45598       if test "xBUILD_AR" != xBASH; then
45599         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45600 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45601       fi
45602       # Try to locate tool using the code snippet
45603       for ac_prog in ar gcc-ar
45604 do
45605   # Extract the first word of "$ac_prog", so it can be a program name with args.
45606 set dummy $ac_prog; ac_word=$2
45607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45608 $as_echo_n "checking for $ac_word... " >&6; }
45609 if ${ac_cv_path_BUILD_AR+:} false; then :
45610   $as_echo_n "(cached) " >&6
45611 else
45612   case $BUILD_AR in
45613   [\\/]* | ?:[\\/]*)
45614   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45615   ;;
45616   *)
45617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45618 for as_dir in $PATH
45619 do
45620   IFS=$as_save_IFS
45621   test -z "$as_dir" && as_dir=.
45622     for ac_exec_ext in '' $ac_executable_extensions; do
45623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45624     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45626     break 2
45627   fi
45628 done
45629   done
45630 IFS=$as_save_IFS
45631 
45632   ;;
45633 esac
45634 fi
45635 BUILD_AR=$ac_cv_path_BUILD_AR
45636 if test -n "$BUILD_AR"; then
45637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45638 $as_echo "$BUILD_AR" >&6; }
45639 else
45640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45641 $as_echo "no" >&6; }
45642 fi
45643 
45644 
45645   test -n "$BUILD_AR" && break
45646 done
45647 
45648     else
45649       # If it succeeded, then it was overridden by the user. We will use it
45650       # for the tool.
45651 
45652       # First remove it from the list of overridden variables, so we can test
45653       # for unknown variables in the end.
45654       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45655 
45656       # Check if we try to supply an empty value
45657       if test "x$BUILD_AR" = x; then
45658         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45659 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45661 $as_echo_n "checking for BUILD_AR... " >&6; }
45662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45663 $as_echo "disabled" >&6; }
45664       else
45665         # Check if the provided tool contains a complete path.
45666         tool_specified="$BUILD_AR"
45667         tool_basename="${tool_specified##*/}"
45668         if test "x$tool_basename" = "x$tool_specified"; then
45669           # A command without a complete path is provided, search $PATH.
45670           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45671 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45672           # Extract the first word of "$tool_basename", so it can be a program name with args.
45673 set dummy $tool_basename; ac_word=$2
45674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45675 $as_echo_n "checking for $ac_word... " >&6; }
45676 if ${ac_cv_path_BUILD_AR+:} false; then :
45677   $as_echo_n "(cached) " >&6
45678 else
45679   case $BUILD_AR in
45680   [\\/]* | ?:[\\/]*)
45681   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45682   ;;
45683   *)
45684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45685 for as_dir in $PATH
45686 do
45687   IFS=$as_save_IFS
45688   test -z "$as_dir" && as_dir=.
45689     for ac_exec_ext in '' $ac_executable_extensions; do
45690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45691     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45693     break 2
45694   fi
45695 done
45696   done
45697 IFS=$as_save_IFS
45698 
45699   ;;
45700 esac
45701 fi
45702 BUILD_AR=$ac_cv_path_BUILD_AR
45703 if test -n "$BUILD_AR"; then
45704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45705 $as_echo "$BUILD_AR" >&6; }
45706 else
45707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45708 $as_echo "no" >&6; }
45709 fi
45710 
45711 
45712           if test "x$BUILD_AR" = x; then
45713             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45714           fi
45715         else
45716           # Otherwise we believe it is a complete path. Use it as it is.
45717           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45718 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45719           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45720 $as_echo_n "checking for BUILD_AR... " >&6; }
45721           if test ! -x "$tool_specified"; then
45722             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45723 $as_echo "not found" >&6; }
45724             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45725           fi
45726           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45727 $as_echo "$tool_specified" >&6; }
45728         fi
45729       fi
45730     fi
45731 
45732   fi
45733 
45734 
45735 
45736   # Only process if variable expands to non-empty
45737 
45738   if test "x$BUILD_AR" != x; then
45739     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45740 
45741   # First separate the path from the arguments. This will split at the first
45742   # space.
45743   complete="$BUILD_AR"
45744   path="${complete%% *}"
45745   tmp="$complete EOL"
45746   arguments="${tmp#* }"
45747 
45748   # Input might be given as Windows format, start by converting to
45749   # unix format.
45750   new_path=`$CYGPATH -u "$path"`
45751 
45752   # Now try to locate executable using which
45753   new_path=`$WHICH "$new_path" 2> /dev/null`
45754   # bat and cmd files are not always considered executable in cygwin causing which
45755   # to not find them
45756   if test "x$new_path" = x \
45757       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45758       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45759     new_path=`$CYGPATH -u "$path"`
45760   fi
45761   if test "x$new_path" = x; then
45762     # Oops. Which didn't find the executable.
45763     # The splitting of arguments from the executable at a space might have been incorrect,
45764     # since paths with space are more likely in Windows. Give it another try with the whole
45765     # argument.
45766     path="$complete"
45767     arguments="EOL"
45768     new_path=`$CYGPATH -u "$path"`
45769     new_path=`$WHICH "$new_path" 2> /dev/null`
45770     # bat and cmd files are not always considered executable in cygwin causing which
45771     # to not find them
45772     if test "x$new_path" = x \
45773         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45774         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45775       new_path=`$CYGPATH -u "$path"`
45776     fi
45777     if test "x$new_path" = x; then
45778       # It's still not found. Now this is an unrecoverable error.
45779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45780 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45781       has_space=`$ECHO "$complete" | $GREP " "`
45782       if test "x$has_space" != x; then
45783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45785       fi
45786       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45787     fi
45788   fi
45789 
45790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45793   # "foo.exe" is OK but "foo" is an error.
45794   #
45795   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45796   # It is also a way to make sure we got the proper file name for the real test later on.
45797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45798   if test "x$test_shortpath" = x; then
45799     # Short path failed, file does not exist as specified.
45800     # Try adding .exe or .cmd
45801     if test -f "${new_path}.exe"; then
45802       input_to_shortpath="${new_path}.exe"
45803     elif test -f "${new_path}.cmd"; then
45804       input_to_shortpath="${new_path}.cmd"
45805     else
45806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45807 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45808       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45809 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45810       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45811     fi
45812   else
45813     input_to_shortpath="$new_path"
45814   fi
45815 
45816   # Call helper function which possibly converts this using DOS-style short mode.
45817   # If so, the updated path is stored in $new_path.
45818   new_path="$input_to_shortpath"
45819 
45820   input_path="$input_to_shortpath"
45821   # Check if we need to convert this using DOS-style short mode. If the path
45822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45823   # take no chances and rewrite it.
45824   # Note: m4 eats our [], so we need to use [ and ] instead.
45825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45826   if test "x$has_forbidden_chars" != x; then
45827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45831       # Going to short mode and back again did indeed matter. Since short mode is
45832       # case insensitive, let's make it lowercase to improve readability.
45833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45834       # Now convert it back to Unix-style (cygpath)
45835       input_path=`$CYGPATH -u "$shortmode_path"`
45836       new_path="$input_path"
45837     fi
45838   fi
45839 
45840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45841   if test "x$test_cygdrive_prefix" = x; then
45842     # As a simple fix, exclude /usr/bin since it's not a real path.
45843     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45845       # a path prefixed by /cygdrive for fixpath to work.
45846       new_path="$CYGWIN_ROOT_PATH$input_path"
45847     fi
45848   fi
45849 
45850   # remove trailing .exe if any
45851   new_path="${new_path/%.exe/}"
45852 
45853     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854 
45855   # First separate the path from the arguments. This will split at the first
45856   # space.
45857   complete="$BUILD_AR"
45858   path="${complete%% *}"
45859   tmp="$complete EOL"
45860   arguments="${tmp#* }"
45861 
45862   # Input might be given as Windows format, start by converting to
45863   # unix format.
45864   new_path="$path"
45865 
45866   windows_path="$new_path"
45867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45868     unix_path=`$CYGPATH -u "$windows_path"`
45869     new_path="$unix_path"
45870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45872     new_path="$unix_path"
45873   fi
45874 
45875 
45876   # Now try to locate executable using which
45877   new_path=`$WHICH "$new_path" 2> /dev/null`
45878 
45879   if test "x$new_path" = x; then
45880     # Oops. Which didn't find the executable.
45881     # The splitting of arguments from the executable at a space might have been incorrect,
45882     # since paths with space are more likely in Windows. Give it another try with the whole
45883     # argument.
45884     path="$complete"
45885     arguments="EOL"
45886     new_path="$path"
45887 
45888   windows_path="$new_path"
45889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45890     unix_path=`$CYGPATH -u "$windows_path"`
45891     new_path="$unix_path"
45892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45894     new_path="$unix_path"
45895   fi
45896 
45897 
45898     new_path=`$WHICH "$new_path" 2> /dev/null`
45899     # bat and cmd files are not always considered executable in MSYS causing which
45900     # to not find them
45901     if test "x$new_path" = x \
45902         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45903         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45904       new_path="$path"
45905 
45906   windows_path="$new_path"
45907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45908     unix_path=`$CYGPATH -u "$windows_path"`
45909     new_path="$unix_path"
45910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45912     new_path="$unix_path"
45913   fi
45914 
45915     fi
45916 
45917     if test "x$new_path" = x; then
45918       # It's still not found. Now this is an unrecoverable error.
45919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45920 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45921       has_space=`$ECHO "$complete" | $GREP " "`
45922       if test "x$has_space" != x; then
45923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45925       fi
45926       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45927     fi
45928   fi
45929 
45930   # Now new_path has a complete unix path to the binary
45931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45932     # Keep paths in /bin as-is, but remove trailing .exe if any
45933     new_path="${new_path/%.exe/}"
45934     # Do not save /bin paths to all_fixpath_prefixes!
45935   else
45936     # Not in mixed or Windows style, start by that.
45937     new_path=`cmd //c echo $new_path`
45938 
45939   input_path="$new_path"
45940   # Check if we need to convert this using DOS-style short mode. If the path
45941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45942   # take no chances and rewrite it.
45943   # Note: m4 eats our [], so we need to use [ and ] instead.
45944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45945   if test "x$has_forbidden_chars" != x; then
45946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45948   fi
45949 
45950     # Output is in $new_path
45951 
45952   windows_path="$new_path"
45953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45954     unix_path=`$CYGPATH -u "$windows_path"`
45955     new_path="$unix_path"
45956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45958     new_path="$unix_path"
45959   fi
45960 
45961     # remove trailing .exe if any
45962     new_path="${new_path/%.exe/}"
45963 
45964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45966   fi
45967 
45968     else
45969       # We're on a unix platform. Hooray! :)
45970       # First separate the path from the arguments. This will split at the first
45971       # space.
45972       complete="$BUILD_AR"
45973       path="${complete%% *}"
45974       tmp="$complete EOL"
45975       arguments="${tmp#* }"
45976 
45977       # Cannot rely on the command "which" here since it doesn't always work.
45978       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45979       if test -z "$is_absolute_path"; then
45980         # Path to executable is not absolute. Find it.
45981         IFS_save="$IFS"
45982         IFS=:
45983         for p in $PATH; do
45984           if test -f "$p/$path" && test -x "$p/$path"; then
45985             new_path="$p/$path"
45986             break
45987           fi
45988         done
45989         IFS="$IFS_save"
45990       else
45991         # This is an absolute path, we can use it without further modifications.
45992         new_path="$path"
45993       fi
45994 
45995       if test "x$new_path" = x; then
45996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45997 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45998         has_space=`$ECHO "$complete" | $GREP " "`
45999         if test "x$has_space" != x; then
46000           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46001 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46002         fi
46003         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46004       fi
46005     fi
46006 
46007     # Now join together the path and the arguments once again
46008     if test "x$arguments" != xEOL; then
46009       new_complete="$new_path ${arguments% *}"
46010     else
46011       new_complete="$new_path"
46012     fi
46013 
46014     if test "x$complete" != "x$new_complete"; then
46015       BUILD_AR="$new_complete"
46016       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46017 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46018     fi
46019   fi
46020 
46021 
46022 
46023   # Publish this variable in the help.
46024 
46025 
46026   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46027     # The variable is not set by user, try to locate tool using the code snippet
46028     for ac_prog in objcopy
46029 do
46030   # Extract the first word of "$ac_prog", so it can be a program name with args.
46031 set dummy $ac_prog; ac_word=$2
46032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46033 $as_echo_n "checking for $ac_word... " >&6; }
46034 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46035   $as_echo_n "(cached) " >&6
46036 else
46037   case $BUILD_OBJCOPY in
46038   [\\/]* | ?:[\\/]*)
46039   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46040   ;;
46041   *)
46042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46043 for as_dir in $PATH
46044 do
46045   IFS=$as_save_IFS
46046   test -z "$as_dir" && as_dir=.
46047     for ac_exec_ext in '' $ac_executable_extensions; do
46048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46049     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46051     break 2
46052   fi
46053 done
46054   done
46055 IFS=$as_save_IFS
46056 
46057   ;;
46058 esac
46059 fi
46060 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46061 if test -n "$BUILD_OBJCOPY"; then
46062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46063 $as_echo "$BUILD_OBJCOPY" >&6; }
46064 else
46065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46066 $as_echo "no" >&6; }
46067 fi
46068 
46069 
46070   test -n "$BUILD_OBJCOPY" && break
46071 done
46072 
46073   else
46074     # The variable is set, but is it from the command line or the environment?
46075 
46076     # Try to remove the string !BUILD_OBJCOPY! from our list.
46077     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46078     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46079       # If it failed, the variable was not from the command line. Ignore it,
46080       # but warn the user (except for BASH, which is always set by the calling BASH).
46081       if test "xBUILD_OBJCOPY" != xBASH; then
46082         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46083 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46084       fi
46085       # Try to locate tool using the code snippet
46086       for ac_prog in objcopy
46087 do
46088   # Extract the first word of "$ac_prog", so it can be a program name with args.
46089 set dummy $ac_prog; ac_word=$2
46090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46091 $as_echo_n "checking for $ac_word... " >&6; }
46092 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46093   $as_echo_n "(cached) " >&6
46094 else
46095   case $BUILD_OBJCOPY in
46096   [\\/]* | ?:[\\/]*)
46097   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46098   ;;
46099   *)
46100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46101 for as_dir in $PATH
46102 do
46103   IFS=$as_save_IFS
46104   test -z "$as_dir" && as_dir=.
46105     for ac_exec_ext in '' $ac_executable_extensions; do
46106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46107     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46109     break 2
46110   fi
46111 done
46112   done
46113 IFS=$as_save_IFS
46114 
46115   ;;
46116 esac
46117 fi
46118 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46119 if test -n "$BUILD_OBJCOPY"; then
46120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46121 $as_echo "$BUILD_OBJCOPY" >&6; }
46122 else
46123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46124 $as_echo "no" >&6; }
46125 fi
46126 
46127 
46128   test -n "$BUILD_OBJCOPY" && break
46129 done
46130 
46131     else
46132       # If it succeeded, then it was overridden by the user. We will use it
46133       # for the tool.
46134 
46135       # First remove it from the list of overridden variables, so we can test
46136       # for unknown variables in the end.
46137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46138 
46139       # Check if we try to supply an empty value
46140       if test "x$BUILD_OBJCOPY" = x; then
46141         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46142 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46143         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46144 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46146 $as_echo "disabled" >&6; }
46147       else
46148         # Check if the provided tool contains a complete path.
46149         tool_specified="$BUILD_OBJCOPY"
46150         tool_basename="${tool_specified##*/}"
46151         if test "x$tool_basename" = "x$tool_specified"; then
46152           # A command without a complete path is provided, search $PATH.
46153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46154 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46155           # Extract the first word of "$tool_basename", so it can be a program name with args.
46156 set dummy $tool_basename; ac_word=$2
46157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46158 $as_echo_n "checking for $ac_word... " >&6; }
46159 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46160   $as_echo_n "(cached) " >&6
46161 else
46162   case $BUILD_OBJCOPY in
46163   [\\/]* | ?:[\\/]*)
46164   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46165   ;;
46166   *)
46167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46168 for as_dir in $PATH
46169 do
46170   IFS=$as_save_IFS
46171   test -z "$as_dir" && as_dir=.
46172     for ac_exec_ext in '' $ac_executable_extensions; do
46173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46174     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46176     break 2
46177   fi
46178 done
46179   done
46180 IFS=$as_save_IFS
46181 
46182   ;;
46183 esac
46184 fi
46185 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46186 if test -n "$BUILD_OBJCOPY"; then
46187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46188 $as_echo "$BUILD_OBJCOPY" >&6; }
46189 else
46190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46191 $as_echo "no" >&6; }
46192 fi
46193 
46194 
46195           if test "x$BUILD_OBJCOPY" = x; then
46196             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46197           fi
46198         else
46199           # Otherwise we believe it is a complete path. Use it as it is.
46200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46201 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46202           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46203 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46204           if test ! -x "$tool_specified"; then
46205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46206 $as_echo "not found" >&6; }
46207             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46208           fi
46209           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46210 $as_echo "$tool_specified" >&6; }
46211         fi
46212       fi
46213     fi
46214 
46215   fi
46216 
46217 
46218 
46219   # Only process if variable expands to non-empty
46220 
46221   if test "x$BUILD_OBJCOPY" != x; then
46222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46223 
46224   # First separate the path from the arguments. This will split at the first
46225   # space.
46226   complete="$BUILD_OBJCOPY"
46227   path="${complete%% *}"
46228   tmp="$complete EOL"
46229   arguments="${tmp#* }"
46230 
46231   # Input might be given as Windows format, start by converting to
46232   # unix format.
46233   new_path=`$CYGPATH -u "$path"`
46234 
46235   # Now try to locate executable using which
46236   new_path=`$WHICH "$new_path" 2> /dev/null`
46237   # bat and cmd files are not always considered executable in cygwin causing which
46238   # to not find them
46239   if test "x$new_path" = x \
46240       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46241       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46242     new_path=`$CYGPATH -u "$path"`
46243   fi
46244   if test "x$new_path" = x; then
46245     # Oops. Which didn't find the executable.
46246     # The splitting of arguments from the executable at a space might have been incorrect,
46247     # since paths with space are more likely in Windows. Give it another try with the whole
46248     # argument.
46249     path="$complete"
46250     arguments="EOL"
46251     new_path=`$CYGPATH -u "$path"`
46252     new_path=`$WHICH "$new_path" 2> /dev/null`
46253     # bat and cmd files are not always considered executable in cygwin causing which
46254     # to not find them
46255     if test "x$new_path" = x \
46256         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46257         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46258       new_path=`$CYGPATH -u "$path"`
46259     fi
46260     if test "x$new_path" = x; then
46261       # It's still not found. Now this is an unrecoverable error.
46262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46263 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46264       has_space=`$ECHO "$complete" | $GREP " "`
46265       if test "x$has_space" != x; then
46266         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46267 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46268       fi
46269       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46270     fi
46271   fi
46272 
46273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46276   # "foo.exe" is OK but "foo" is an error.
46277   #
46278   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46279   # It is also a way to make sure we got the proper file name for the real test later on.
46280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46281   if test "x$test_shortpath" = x; then
46282     # Short path failed, file does not exist as specified.
46283     # Try adding .exe or .cmd
46284     if test -f "${new_path}.exe"; then
46285       input_to_shortpath="${new_path}.exe"
46286     elif test -f "${new_path}.cmd"; then
46287       input_to_shortpath="${new_path}.cmd"
46288     else
46289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46290 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46291       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46292 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46293       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46294     fi
46295   else
46296     input_to_shortpath="$new_path"
46297   fi
46298 
46299   # Call helper function which possibly converts this using DOS-style short mode.
46300   # If so, the updated path is stored in $new_path.
46301   new_path="$input_to_shortpath"
46302 
46303   input_path="$input_to_shortpath"
46304   # Check if we need to convert this using DOS-style short mode. If the path
46305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46306   # take no chances and rewrite it.
46307   # Note: m4 eats our [], so we need to use [ and ] instead.
46308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46309   if test "x$has_forbidden_chars" != x; then
46310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46314       # Going to short mode and back again did indeed matter. Since short mode is
46315       # case insensitive, let's make it lowercase to improve readability.
46316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46317       # Now convert it back to Unix-style (cygpath)
46318       input_path=`$CYGPATH -u "$shortmode_path"`
46319       new_path="$input_path"
46320     fi
46321   fi
46322 
46323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46324   if test "x$test_cygdrive_prefix" = x; then
46325     # As a simple fix, exclude /usr/bin since it's not a real path.
46326     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46328       # a path prefixed by /cygdrive for fixpath to work.
46329       new_path="$CYGWIN_ROOT_PATH$input_path"
46330     fi
46331   fi
46332 
46333   # remove trailing .exe if any
46334   new_path="${new_path/%.exe/}"
46335 
46336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337 
46338   # First separate the path from the arguments. This will split at the first
46339   # space.
46340   complete="$BUILD_OBJCOPY"
46341   path="${complete%% *}"
46342   tmp="$complete EOL"
46343   arguments="${tmp#* }"
46344 
46345   # Input might be given as Windows format, start by converting to
46346   # unix format.
46347   new_path="$path"
46348 
46349   windows_path="$new_path"
46350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46351     unix_path=`$CYGPATH -u "$windows_path"`
46352     new_path="$unix_path"
46353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46355     new_path="$unix_path"
46356   fi
46357 
46358 
46359   # Now try to locate executable using which
46360   new_path=`$WHICH "$new_path" 2> /dev/null`
46361 
46362   if test "x$new_path" = x; then
46363     # Oops. Which didn't find the executable.
46364     # The splitting of arguments from the executable at a space might have been incorrect,
46365     # since paths with space are more likely in Windows. Give it another try with the whole
46366     # argument.
46367     path="$complete"
46368     arguments="EOL"
46369     new_path="$path"
46370 
46371   windows_path="$new_path"
46372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46373     unix_path=`$CYGPATH -u "$windows_path"`
46374     new_path="$unix_path"
46375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46377     new_path="$unix_path"
46378   fi
46379 
46380 
46381     new_path=`$WHICH "$new_path" 2> /dev/null`
46382     # bat and cmd files are not always considered executable in MSYS causing which
46383     # to not find them
46384     if test "x$new_path" = x \
46385         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46386         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46387       new_path="$path"
46388 
46389   windows_path="$new_path"
46390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46391     unix_path=`$CYGPATH -u "$windows_path"`
46392     new_path="$unix_path"
46393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46395     new_path="$unix_path"
46396   fi
46397 
46398     fi
46399 
46400     if test "x$new_path" = x; then
46401       # It's still not found. Now this is an unrecoverable error.
46402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46403 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46404       has_space=`$ECHO "$complete" | $GREP " "`
46405       if test "x$has_space" != x; then
46406         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46407 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46408       fi
46409       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46410     fi
46411   fi
46412 
46413   # Now new_path has a complete unix path to the binary
46414   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46415     # Keep paths in /bin as-is, but remove trailing .exe if any
46416     new_path="${new_path/%.exe/}"
46417     # Do not save /bin paths to all_fixpath_prefixes!
46418   else
46419     # Not in mixed or Windows style, start by that.
46420     new_path=`cmd //c echo $new_path`
46421 
46422   input_path="$new_path"
46423   # Check if we need to convert this using DOS-style short mode. If the path
46424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46425   # take no chances and rewrite it.
46426   # Note: m4 eats our [], so we need to use [ and ] instead.
46427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46428   if test "x$has_forbidden_chars" != x; then
46429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46431   fi
46432 
46433     # Output is in $new_path
46434 
46435   windows_path="$new_path"
46436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46437     unix_path=`$CYGPATH -u "$windows_path"`
46438     new_path="$unix_path"
46439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46441     new_path="$unix_path"
46442   fi
46443 
46444     # remove trailing .exe if any
46445     new_path="${new_path/%.exe/}"
46446 
46447     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46448     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46449   fi
46450 
46451     else
46452       # We're on a unix platform. Hooray! :)
46453       # First separate the path from the arguments. This will split at the first
46454       # space.
46455       complete="$BUILD_OBJCOPY"
46456       path="${complete%% *}"
46457       tmp="$complete EOL"
46458       arguments="${tmp#* }"
46459 
46460       # Cannot rely on the command "which" here since it doesn't always work.
46461       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46462       if test -z "$is_absolute_path"; then
46463         # Path to executable is not absolute. Find it.
46464         IFS_save="$IFS"
46465         IFS=:
46466         for p in $PATH; do
46467           if test -f "$p/$path" && test -x "$p/$path"; then
46468             new_path="$p/$path"
46469             break
46470           fi
46471         done
46472         IFS="$IFS_save"
46473       else
46474         # This is an absolute path, we can use it without further modifications.
46475         new_path="$path"
46476       fi
46477 
46478       if test "x$new_path" = x; then
46479         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46480 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46481         has_space=`$ECHO "$complete" | $GREP " "`
46482         if test "x$has_space" != x; then
46483           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46484 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46485         fi
46486         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46487       fi
46488     fi
46489 
46490     # Now join together the path and the arguments once again
46491     if test "x$arguments" != xEOL; then
46492       new_complete="$new_path ${arguments% *}"
46493     else
46494       new_complete="$new_path"
46495     fi
46496 
46497     if test "x$complete" != "x$new_complete"; then
46498       BUILD_OBJCOPY="$new_complete"
46499       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46500 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46501     fi
46502   fi
46503 
46504 
46505 
46506   # Publish this variable in the help.
46507 
46508 
46509   if [ -z "${BUILD_STRIP+x}" ]; then
46510     # The variable is not set by user, try to locate tool using the code snippet
46511     for ac_prog in strip
46512 do
46513   # Extract the first word of "$ac_prog", so it can be a program name with args.
46514 set dummy $ac_prog; ac_word=$2
46515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46516 $as_echo_n "checking for $ac_word... " >&6; }
46517 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46518   $as_echo_n "(cached) " >&6
46519 else
46520   case $BUILD_STRIP in
46521   [\\/]* | ?:[\\/]*)
46522   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46523   ;;
46524   *)
46525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46526 for as_dir in $PATH
46527 do
46528   IFS=$as_save_IFS
46529   test -z "$as_dir" && as_dir=.
46530     for ac_exec_ext in '' $ac_executable_extensions; do
46531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46532     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46534     break 2
46535   fi
46536 done
46537   done
46538 IFS=$as_save_IFS
46539 
46540   ;;
46541 esac
46542 fi
46543 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46544 if test -n "$BUILD_STRIP"; then
46545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46546 $as_echo "$BUILD_STRIP" >&6; }
46547 else
46548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46549 $as_echo "no" >&6; }
46550 fi
46551 
46552 
46553   test -n "$BUILD_STRIP" && break
46554 done
46555 
46556   else
46557     # The variable is set, but is it from the command line or the environment?
46558 
46559     # Try to remove the string !BUILD_STRIP! from our list.
46560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46562       # If it failed, the variable was not from the command line. Ignore it,
46563       # but warn the user (except for BASH, which is always set by the calling BASH).
46564       if test "xBUILD_STRIP" != xBASH; then
46565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46566 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46567       fi
46568       # Try to locate tool using the code snippet
46569       for ac_prog in strip
46570 do
46571   # Extract the first word of "$ac_prog", so it can be a program name with args.
46572 set dummy $ac_prog; ac_word=$2
46573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46574 $as_echo_n "checking for $ac_word... " >&6; }
46575 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46576   $as_echo_n "(cached) " >&6
46577 else
46578   case $BUILD_STRIP in
46579   [\\/]* | ?:[\\/]*)
46580   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46581   ;;
46582   *)
46583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46584 for as_dir in $PATH
46585 do
46586   IFS=$as_save_IFS
46587   test -z "$as_dir" && as_dir=.
46588     for ac_exec_ext in '' $ac_executable_extensions; do
46589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46590     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46592     break 2
46593   fi
46594 done
46595   done
46596 IFS=$as_save_IFS
46597 
46598   ;;
46599 esac
46600 fi
46601 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46602 if test -n "$BUILD_STRIP"; then
46603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46604 $as_echo "$BUILD_STRIP" >&6; }
46605 else
46606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46607 $as_echo "no" >&6; }
46608 fi
46609 
46610 
46611   test -n "$BUILD_STRIP" && break
46612 done
46613 
46614     else
46615       # If it succeeded, then it was overridden by the user. We will use it
46616       # for the tool.
46617 
46618       # First remove it from the list of overridden variables, so we can test
46619       # for unknown variables in the end.
46620       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46621 
46622       # Check if we try to supply an empty value
46623       if test "x$BUILD_STRIP" = x; then
46624         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46625 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46626         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46627 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46629 $as_echo "disabled" >&6; }
46630       else
46631         # Check if the provided tool contains a complete path.
46632         tool_specified="$BUILD_STRIP"
46633         tool_basename="${tool_specified##*/}"
46634         if test "x$tool_basename" = "x$tool_specified"; then
46635           # A command without a complete path is provided, search $PATH.
46636           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46637 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46638           # Extract the first word of "$tool_basename", so it can be a program name with args.
46639 set dummy $tool_basename; ac_word=$2
46640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46641 $as_echo_n "checking for $ac_word... " >&6; }
46642 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46643   $as_echo_n "(cached) " >&6
46644 else
46645   case $BUILD_STRIP in
46646   [\\/]* | ?:[\\/]*)
46647   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46648   ;;
46649   *)
46650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46651 for as_dir in $PATH
46652 do
46653   IFS=$as_save_IFS
46654   test -z "$as_dir" && as_dir=.
46655     for ac_exec_ext in '' $ac_executable_extensions; do
46656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46657     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46659     break 2
46660   fi
46661 done
46662   done
46663 IFS=$as_save_IFS
46664 
46665   ;;
46666 esac
46667 fi
46668 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46669 if test -n "$BUILD_STRIP"; then
46670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46671 $as_echo "$BUILD_STRIP" >&6; }
46672 else
46673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46674 $as_echo "no" >&6; }
46675 fi
46676 
46677 
46678           if test "x$BUILD_STRIP" = x; then
46679             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46680           fi
46681         else
46682           # Otherwise we believe it is a complete path. Use it as it is.
46683           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46684 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46685           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46686 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46687           if test ! -x "$tool_specified"; then
46688             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46689 $as_echo "not found" >&6; }
46690             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46691           fi
46692           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46693 $as_echo "$tool_specified" >&6; }
46694         fi
46695       fi
46696     fi
46697 
46698   fi
46699 
46700 
46701 
46702   # Only process if variable expands to non-empty
46703 
46704   if test "x$BUILD_STRIP" != x; then
46705     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46706 
46707   # First separate the path from the arguments. This will split at the first
46708   # space.
46709   complete="$BUILD_STRIP"
46710   path="${complete%% *}"
46711   tmp="$complete EOL"
46712   arguments="${tmp#* }"
46713 
46714   # Input might be given as Windows format, start by converting to
46715   # unix format.
46716   new_path=`$CYGPATH -u "$path"`
46717 
46718   # Now try to locate executable using which
46719   new_path=`$WHICH "$new_path" 2> /dev/null`
46720   # bat and cmd files are not always considered executable in cygwin causing which
46721   # to not find them
46722   if test "x$new_path" = x \
46723       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46724       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46725     new_path=`$CYGPATH -u "$path"`
46726   fi
46727   if test "x$new_path" = x; then
46728     # Oops. Which didn't find the executable.
46729     # The splitting of arguments from the executable at a space might have been incorrect,
46730     # since paths with space are more likely in Windows. Give it another try with the whole
46731     # argument.
46732     path="$complete"
46733     arguments="EOL"
46734     new_path=`$CYGPATH -u "$path"`
46735     new_path=`$WHICH "$new_path" 2> /dev/null`
46736     # bat and cmd files are not always considered executable in cygwin causing which
46737     # to not find them
46738     if test "x$new_path" = x \
46739         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46740         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46741       new_path=`$CYGPATH -u "$path"`
46742     fi
46743     if test "x$new_path" = x; then
46744       # It's still not found. Now this is an unrecoverable error.
46745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46746 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46747       has_space=`$ECHO "$complete" | $GREP " "`
46748       if test "x$has_space" != x; then
46749         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46751       fi
46752       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46753     fi
46754   fi
46755 
46756   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46757   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46758   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46759   # "foo.exe" is OK but "foo" is an error.
46760   #
46761   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46762   # It is also a way to make sure we got the proper file name for the real test later on.
46763   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46764   if test "x$test_shortpath" = x; then
46765     # Short path failed, file does not exist as specified.
46766     # Try adding .exe or .cmd
46767     if test -f "${new_path}.exe"; then
46768       input_to_shortpath="${new_path}.exe"
46769     elif test -f "${new_path}.cmd"; then
46770       input_to_shortpath="${new_path}.cmd"
46771     else
46772       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46773 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46774       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46775 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46776       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46777     fi
46778   else
46779     input_to_shortpath="$new_path"
46780   fi
46781 
46782   # Call helper function which possibly converts this using DOS-style short mode.
46783   # If so, the updated path is stored in $new_path.
46784   new_path="$input_to_shortpath"
46785 
46786   input_path="$input_to_shortpath"
46787   # Check if we need to convert this using DOS-style short mode. If the path
46788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46789   # take no chances and rewrite it.
46790   # Note: m4 eats our [], so we need to use [ and ] instead.
46791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46792   if test "x$has_forbidden_chars" != x; then
46793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46794     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46795     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46796     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46797       # Going to short mode and back again did indeed matter. Since short mode is
46798       # case insensitive, let's make it lowercase to improve readability.
46799       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46800       # Now convert it back to Unix-style (cygpath)
46801       input_path=`$CYGPATH -u "$shortmode_path"`
46802       new_path="$input_path"
46803     fi
46804   fi
46805 
46806   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46807   if test "x$test_cygdrive_prefix" = x; then
46808     # As a simple fix, exclude /usr/bin since it's not a real path.
46809     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46810       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46811       # a path prefixed by /cygdrive for fixpath to work.
46812       new_path="$CYGWIN_ROOT_PATH$input_path"
46813     fi
46814   fi
46815 
46816   # remove trailing .exe if any
46817   new_path="${new_path/%.exe/}"
46818 
46819     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46820 
46821   # First separate the path from the arguments. This will split at the first
46822   # space.
46823   complete="$BUILD_STRIP"
46824   path="${complete%% *}"
46825   tmp="$complete EOL"
46826   arguments="${tmp#* }"
46827 
46828   # Input might be given as Windows format, start by converting to
46829   # unix format.
46830   new_path="$path"
46831 
46832   windows_path="$new_path"
46833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46834     unix_path=`$CYGPATH -u "$windows_path"`
46835     new_path="$unix_path"
46836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46838     new_path="$unix_path"
46839   fi
46840 
46841 
46842   # Now try to locate executable using which
46843   new_path=`$WHICH "$new_path" 2> /dev/null`
46844 
46845   if test "x$new_path" = x; then
46846     # Oops. Which didn't find the executable.
46847     # The splitting of arguments from the executable at a space might have been incorrect,
46848     # since paths with space are more likely in Windows. Give it another try with the whole
46849     # argument.
46850     path="$complete"
46851     arguments="EOL"
46852     new_path="$path"
46853 
46854   windows_path="$new_path"
46855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46856     unix_path=`$CYGPATH -u "$windows_path"`
46857     new_path="$unix_path"
46858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46860     new_path="$unix_path"
46861   fi
46862 
46863 
46864     new_path=`$WHICH "$new_path" 2> /dev/null`
46865     # bat and cmd files are not always considered executable in MSYS causing which
46866     # to not find them
46867     if test "x$new_path" = x \
46868         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46869         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46870       new_path="$path"
46871 
46872   windows_path="$new_path"
46873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46874     unix_path=`$CYGPATH -u "$windows_path"`
46875     new_path="$unix_path"
46876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46878     new_path="$unix_path"
46879   fi
46880 
46881     fi
46882 
46883     if test "x$new_path" = x; then
46884       # It's still not found. Now this is an unrecoverable error.
46885       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46886 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46887       has_space=`$ECHO "$complete" | $GREP " "`
46888       if test "x$has_space" != x; then
46889         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46890 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46891       fi
46892       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46893     fi
46894   fi
46895 
46896   # Now new_path has a complete unix path to the binary
46897   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46898     # Keep paths in /bin as-is, but remove trailing .exe if any
46899     new_path="${new_path/%.exe/}"
46900     # Do not save /bin paths to all_fixpath_prefixes!
46901   else
46902     # Not in mixed or Windows style, start by that.
46903     new_path=`cmd //c echo $new_path`
46904 
46905   input_path="$new_path"
46906   # Check if we need to convert this using DOS-style short mode. If the path
46907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46908   # take no chances and rewrite it.
46909   # Note: m4 eats our [], so we need to use [ and ] instead.
46910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46911   if test "x$has_forbidden_chars" != x; then
46912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46913     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46914   fi
46915 
46916     # Output is in $new_path
46917 
46918   windows_path="$new_path"
46919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46920     unix_path=`$CYGPATH -u "$windows_path"`
46921     new_path="$unix_path"
46922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46924     new_path="$unix_path"
46925   fi
46926 
46927     # remove trailing .exe if any
46928     new_path="${new_path/%.exe/}"
46929 
46930     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46931     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46932   fi
46933 
46934     else
46935       # We're on a unix platform. Hooray! :)
46936       # First separate the path from the arguments. This will split at the first
46937       # space.
46938       complete="$BUILD_STRIP"
46939       path="${complete%% *}"
46940       tmp="$complete EOL"
46941       arguments="${tmp#* }"
46942 
46943       # Cannot rely on the command "which" here since it doesn't always work.
46944       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46945       if test -z "$is_absolute_path"; then
46946         # Path to executable is not absolute. Find it.
46947         IFS_save="$IFS"
46948         IFS=:
46949         for p in $PATH; do
46950           if test -f "$p/$path" && test -x "$p/$path"; then
46951             new_path="$p/$path"
46952             break
46953           fi
46954         done
46955         IFS="$IFS_save"
46956       else
46957         # This is an absolute path, we can use it without further modifications.
46958         new_path="$path"
46959       fi
46960 
46961       if test "x$new_path" = x; then
46962         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46963 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46964         has_space=`$ECHO "$complete" | $GREP " "`
46965         if test "x$has_space" != x; then
46966           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46967 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46968         fi
46969         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46970       fi
46971     fi
46972 
46973     # Now join together the path and the arguments once again
46974     if test "x$arguments" != xEOL; then
46975       new_complete="$new_path ${arguments% *}"
46976     else
46977       new_complete="$new_path"
46978     fi
46979 
46980     if test "x$complete" != "x$new_complete"; then
46981       BUILD_STRIP="$new_complete"
46982       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46983 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46984     fi
46985   fi
46986 
46987     # Assume the C compiler is the assembler
46988     BUILD_AS="$BUILD_CC -c"
46989     # Just like for the target compiler, use the compiler as linker
46990     BUILD_LD="$BUILD_CC"
46991     BUILD_LDCXX="$BUILD_CXX"
46992 
46993     PATH="$OLDPATH"
46994 
46995 
46996   COMPILER=$BUILD_CC
46997   COMPILER_NAME=BuildC
46998 
46999   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47000     # cc -V output typically looks like
47001     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47002     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47003     # Check that this is likely to be the Solaris Studio cc.
47004     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47005     if test $? -ne 0; then
47006       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47007       { $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
47008 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47012 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47013       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47014     fi
47015     # Remove usage instructions (if present), and
47016     # collapse compiler output into a single line
47017     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47018         $SED -e 's/ *[Uu]sage:.*//'`
47019     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47020         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47021   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47022     # xlc -qversion output typically looks like
47023     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47024     #     Version: 11.01.0000.0015
47025     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47026     # Check that this is likely to be the IBM XL C compiler.
47027     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47028     if test $? -ne 0; then
47029       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47030       { $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
47031 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47032       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47033 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47034       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47035 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47036       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47037     fi
47038     # Collapse compiler output into a single line
47039     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47040     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47041         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47042   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47043     # There is no specific version flag, but all output starts with a version string.
47044     # First line typically looks something like:
47045     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47046     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47047     # Check that this is likely to be Microsoft CL.EXE.
47048     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47049     if test $? -ne 0; then
47050       { $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
47051 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47052       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47053 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47054       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47055     fi
47056     # Collapse compiler output into a single line
47057     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47058     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47059         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47060   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47061     # gcc --version output typically looks like
47062     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47063     #     Copyright (C) 2013 Free Software Foundation, Inc.
47064     #     This is free software; see the source for copying conditions.  There is NO
47065     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47066     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47067     # Check that this is likely to be GCC.
47068     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47069     if test $? -ne 0; then
47070       { $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
47071 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47072       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47073 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47074       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47075     fi
47076     # Remove Copyright and legalese from version string, and
47077     # collapse into a single line
47078     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47079         $SED -e 's/ *Copyright .*//'`
47080     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47081         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47082   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47083     # clang --version output typically looks like
47084     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47085     #    clang version 3.3 (tags/RELEASE_33/final)
47086     # or
47087     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47088     #    Target: x86_64-pc-linux-gnu
47089     #    Thread model: posix
47090     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47091     # Check that this is likely to be clang
47092     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47093     if test $? -ne 0; then
47094       { $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
47095 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47096       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47097 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47098       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47099     fi
47100     # Collapse compiler output into a single line
47101     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47102     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47103         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47104   else
47105       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47106   fi
47107   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47108   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47109   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47110   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47111 
47112   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47113 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47114 
47115 
47116   COMPILER=$BUILD_CXX
47117   COMPILER_NAME=BuildC++
47118 
47119   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47120     # cc -V output typically looks like
47121     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47122     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47123     # Check that this is likely to be the Solaris Studio cc.
47124     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47125     if test $? -ne 0; then
47126       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47127       { $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
47128 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47129       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47130 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47131       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47132 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47133       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47134     fi
47135     # Remove usage instructions (if present), and
47136     # collapse compiler output into a single line
47137     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47138         $SED -e 's/ *[Uu]sage:.*//'`
47139     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47140         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47141   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47142     # xlc -qversion output typically looks like
47143     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47144     #     Version: 11.01.0000.0015
47145     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47146     # Check that this is likely to be the IBM XL C compiler.
47147     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47148     if test $? -ne 0; then
47149       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47150       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47151 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47152       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47153 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47154       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47155 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47156       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47157     fi
47158     # Collapse compiler output into a single line
47159     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47160     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47161         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47162   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47163     # There is no specific version flag, but all output starts with a version string.
47164     # First line typically looks something like:
47165     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47166     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47167     # Check that this is likely to be Microsoft CL.EXE.
47168     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47169     if test $? -ne 0; then
47170       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47171 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47172       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47173 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47174       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47175     fi
47176     # Collapse compiler output into a single line
47177     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47178     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47179         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47180   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47181     # gcc --version output typically looks like
47182     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47183     #     Copyright (C) 2013 Free Software Foundation, Inc.
47184     #     This is free software; see the source for copying conditions.  There is NO
47185     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47186     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47187     # Check that this is likely to be GCC.
47188     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47189     if test $? -ne 0; then
47190       { $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
47191 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47193 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47194       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47195     fi
47196     # Remove Copyright and legalese from version string, and
47197     # collapse into a single line
47198     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47199         $SED -e 's/ *Copyright .*//'`
47200     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47201         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47202   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47203     # clang --version output typically looks like
47204     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47205     #    clang version 3.3 (tags/RELEASE_33/final)
47206     # or
47207     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47208     #    Target: x86_64-pc-linux-gnu
47209     #    Thread model: posix
47210     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47211     # Check that this is likely to be clang
47212     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47213     if test $? -ne 0; then
47214       { $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
47215 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47216       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47217 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47218       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47219     fi
47220     # Collapse compiler output into a single line
47221     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47222     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47223         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47224   else
47225       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47226   fi
47227   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47228   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47229   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47230   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47231 
47232   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47233 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47234 
47235 
47236   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47237     { $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
47238 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47239     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47240 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47241   fi
47242 
47243   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47244   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47245     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47246 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47247   fi
47248 
47249   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47250     { $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
47251 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47252   fi
47253 
47254   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47255 
47256   else
47257     # If we are not cross compiling, use the normal target compilers for
47258     # building the build platform executables.
47259     BUILD_CC="$CC"
47260     BUILD_CXX="$CXX"
47261     BUILD_LD="$LD"
47262     BUILD_LDCXX="$LDCXX"
47263     BUILD_NM="$NM"
47264     BUILD_AS="$AS"
47265     BUILD_OBJCOPY="$OBJCOPY"
47266     BUILD_STRIP="$STRIP"
47267     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47268     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47269     BUILD_AR="$AR"
47270 
47271 
47272   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47273     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47274 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47275     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47276 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47277   fi
47278 
47279   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47280   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47281     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47282 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47283   fi
47284 
47285   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47286     { $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
47287 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47288   fi
47289 
47290   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47291 
47292   fi
47293 
47294 
47295 
47296 
47297 
47298 
47299 
47300 
47301 
47302 
47303 
47304 
47305   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47306     # For hotspot, we need these in Windows mixed path,
47307     # so rewrite them all. Need added .exe suffix.
47308     HOTSPOT_CXX="$CXX.exe"
47309     HOTSPOT_LD="$LD.exe"
47310     HOTSPOT_MT="$MT.exe"
47311     HOTSPOT_RC="$RC.exe"
47312 
47313   unix_path="$HOTSPOT_CXX"
47314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47315     windows_path=`$CYGPATH -m "$unix_path"`
47316     HOTSPOT_CXX="$windows_path"
47317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47318     windows_path=`cmd //c echo $unix_path`
47319     HOTSPOT_CXX="$windows_path"
47320   fi
47321 
47322 
47323   unix_path="$HOTSPOT_LD"
47324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47325     windows_path=`$CYGPATH -m "$unix_path"`
47326     HOTSPOT_LD="$windows_path"
47327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47328     windows_path=`cmd //c echo $unix_path`
47329     HOTSPOT_LD="$windows_path"
47330   fi
47331 
47332 
47333   unix_path="$HOTSPOT_MT"
47334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47335     windows_path=`$CYGPATH -m "$unix_path"`
47336     HOTSPOT_MT="$windows_path"
47337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47338     windows_path=`cmd //c echo $unix_path`
47339     HOTSPOT_MT="$windows_path"
47340   fi
47341 
47342 
47343   unix_path="$HOTSPOT_RC"
47344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47345     windows_path=`$CYGPATH -m "$unix_path"`
47346     HOTSPOT_RC="$windows_path"
47347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47348     windows_path=`cmd //c echo $unix_path`
47349     HOTSPOT_RC="$windows_path"
47350   fi
47351 
47352 
47353 
47354   else
47355     HOTSPOT_CXX="$CXX"
47356     HOTSPOT_LD="$LD"
47357   fi
47358 
47359 
47360 
47361   if test  "x$TOOLCHAIN_TYPE" = xclang; then
47362     USE_CLANG=true
47363   fi
47364 
47365 
47366 
47367 
47368 
47369   # The package path is used only on macosx?
47370   # FIXME: clean this up, and/or move it elsewhere.
47371   PACKAGE_PATH=/opt/local
47372 
47373 
47374   # Check for extra potential brokenness.
47375   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47376     # On Windows, double-check that we got the right compiler.
47377     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47378     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47379     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47380       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47381         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
47382       fi
47383     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47384       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47385         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47386       fi
47387     fi
47388   fi
47389 
47390   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47391     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47392     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47393     # This is later checked when setting flags.
47394 
47395     # "-Og" suppported for GCC 4.8 and later
47396     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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 
47431 
47432 
47433 
47434 
47435 
47436 
47437 
47438 
47439 
47440 
47441 
47442 
47443 
47444     # Execute function body
47445 
47446 
47447 
47448 
47449 
47450 
47451 
47452 
47453 
47454 
47455 
47456 
47457 
47458 
47459 
47460 
47461 
47462 
47463 
47464 
47465 
47466 
47467 
47468 
47469 
47470 
47471 
47472 
47473 
47474 
47475 
47476 
47477 
47478 
47479 
47480 
47481 
47482 
47483 
47484 
47485 
47486 
47487 
47488 
47489 
47490 
47491 
47492 
47493     # Execute function body
47494 
47495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47496 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47497   supports=yes
47498 
47499   saved_cflags="$CFLAGS"
47500   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47501   ac_ext=c
47502 ac_cpp='$CPP $CPPFLAGS'
47503 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47504 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47506 
47507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47508 /* end confdefs.h.  */
47509 int i;
47510 _ACEOF
47511 if ac_fn_c_try_compile "$LINENO"; then :
47512 
47513 else
47514   supports=no
47515 fi
47516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47517   ac_ext=cpp
47518 ac_cpp='$CXXCPP $CPPFLAGS'
47519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47522 
47523   CFLAGS="$saved_cflags"
47524 
47525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47526 $as_echo "$supports" >&6; }
47527   if test "x$supports" = "xyes" ; then
47528     :
47529     C_COMP_SUPPORTS="yes"
47530   else
47531     :
47532     C_COMP_SUPPORTS="no"
47533   fi
47534 
47535 
47536 
47537 
47538 
47539 
47540 
47541 
47542 
47543 
47544 
47545 
47546 
47547 
47548 
47549 
47550 
47551 
47552 
47553 
47554 
47555 
47556 
47557 
47558 
47559 
47560 
47561 
47562 
47563 
47564 
47565 
47566 
47567 
47568 
47569 
47570 
47571 
47572 
47573 
47574 
47575 
47576 
47577 
47578 
47579 
47580 
47581 
47582 
47583 
47584 
47585 
47586 
47587 
47588 
47589 
47590 
47591 
47592 
47593     # Execute function body
47594 
47595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47596 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47597   supports=yes
47598 
47599   saved_cxxflags="$CXXFLAGS"
47600   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47601   ac_ext=cpp
47602 ac_cpp='$CXXCPP $CPPFLAGS'
47603 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47604 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47605 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47606 
47607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47608 /* end confdefs.h.  */
47609 int i;
47610 _ACEOF
47611 if ac_fn_cxx_try_compile "$LINENO"; then :
47612 
47613 else
47614   supports=no
47615 fi
47616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47617   ac_ext=cpp
47618 ac_cpp='$CXXCPP $CPPFLAGS'
47619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47622 
47623   CXXFLAGS="$saved_cxxflags"
47624 
47625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47626 $as_echo "$supports" >&6; }
47627   if test "x$supports" = "xyes" ; then
47628     :
47629     CXX_COMP_SUPPORTS="yes"
47630   else
47631     :
47632     CXX_COMP_SUPPORTS="no"
47633   fi
47634 
47635 
47636 
47637 
47638 
47639 
47640 
47641 
47642 
47643 
47644 
47645 
47646 
47647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47648 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47649   supports=no
47650   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47651 
47652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47653 $as_echo "$supports" >&6; }
47654   if test "x$supports" = "xyes" ; then
47655     :
47656     HAS_CFLAG_OPTIMIZE_DEBUG=true
47657   else
47658     :
47659     HAS_CFLAG_OPTIMIZE_DEBUG=false
47660   fi
47661 
47662 
47663 
47664 
47665 
47666 
47667 
47668     # "-z relro" supported in GNU binutils 2.17 and later
47669     LINKER_RELRO_FLAG="-Wl,-z,relro"
47670 
47671 
47672 
47673 
47674 
47675 
47676 
47677 
47678 
47679 
47680 
47681 
47682 
47683 
47684 
47685 
47686 
47687 
47688 
47689 
47690 
47691 
47692 
47693 
47694 
47695 
47696 
47697 
47698 
47699 
47700 
47701 
47702 
47703 
47704 
47705 
47706 
47707 
47708 
47709 
47710 
47711 
47712 
47713 
47714 
47715 
47716 
47717     # Execute function body
47718 
47719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47720 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47721   supports=yes
47722 
47723   saved_ldflags="$LDFLAGS"
47724   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47725   ac_ext=c
47726 ac_cpp='$CPP $CPPFLAGS'
47727 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47728 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47729 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47730 
47731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47732 /* end confdefs.h.  */
47733 
47734 int
47735 main ()
47736 {
47737 
47738   ;
47739   return 0;
47740 }
47741 _ACEOF
47742 if ac_fn_c_try_link "$LINENO"; then :
47743 
47744 else
47745   supports=no
47746 fi
47747 rm -f core conftest.err conftest.$ac_objext \
47748     conftest$ac_exeext conftest.$ac_ext
47749   ac_ext=cpp
47750 ac_cpp='$CXXCPP $CPPFLAGS'
47751 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47752 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47753 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47754 
47755   LDFLAGS="$saved_ldflags"
47756 
47757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47758 $as_echo "$supports" >&6; }
47759   if test "x$supports" = "xyes" ; then
47760     :
47761     HAS_LINKER_RELRO=true
47762   else
47763     :
47764     HAS_LINKER_RELRO=false
47765   fi
47766 
47767 
47768 
47769 
47770 
47771 
47772 
47773 
47774 
47775 
47776 
47777 
47778 
47779     # "-z now" supported in GNU binutils 2.11 and later
47780     LINKER_NOW_FLAG="-Wl,-z,now"
47781 
47782 
47783 
47784 
47785 
47786 
47787 
47788 
47789 
47790 
47791 
47792 
47793 
47794 
47795 
47796 
47797 
47798 
47799 
47800 
47801 
47802 
47803 
47804 
47805 
47806 
47807 
47808 
47809 
47810 
47811 
47812 
47813 
47814 
47815 
47816 
47817 
47818 
47819 
47820 
47821 
47822 
47823 
47824 
47825 
47826 
47827 
47828     # Execute function body
47829 
47830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47831 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47832   supports=yes
47833 
47834   saved_ldflags="$LDFLAGS"
47835   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47836   ac_ext=c
47837 ac_cpp='$CPP $CPPFLAGS'
47838 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47839 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47840 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47841 
47842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47843 /* end confdefs.h.  */
47844 
47845 int
47846 main ()
47847 {
47848 
47849   ;
47850   return 0;
47851 }
47852 _ACEOF
47853 if ac_fn_c_try_link "$LINENO"; then :
47854 
47855 else
47856   supports=no
47857 fi
47858 rm -f core conftest.err conftest.$ac_objext \
47859     conftest$ac_exeext conftest.$ac_ext
47860   ac_ext=cpp
47861 ac_cpp='$CXXCPP $CPPFLAGS'
47862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47865 
47866   LDFLAGS="$saved_ldflags"
47867 
47868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47869 $as_echo "$supports" >&6; }
47870   if test "x$supports" = "xyes" ; then
47871     :
47872     HAS_LINKER_NOW=true
47873   else
47874     :
47875     HAS_LINKER_NOW=false
47876   fi
47877 
47878 
47879 
47880 
47881 
47882 
47883 
47884 
47885 
47886 
47887 
47888 
47889   fi
47890 
47891   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47892   # in executable.'
47893   USING_BROKEN_SUSE_LD=no
47894   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47895     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47896 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47897     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47898     $ECHO "int main() { }" > main.c
47899     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47900       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901 $as_echo "no" >&6; }
47902       USING_BROKEN_SUSE_LD=no
47903     else
47904       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47905 $as_echo "yes" >&6; }
47906       USING_BROKEN_SUSE_LD=yes
47907     fi
47908     $RM version-script.map main.c a.out
47909   fi
47910 
47911 
47912   # Setup hotspot lecagy names for toolchains
47913   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47914   if test "x$TOOLCHAIN_TYPE" = xclang; then
47915     HOTSPOT_TOOLCHAIN_TYPE=gcc
47916   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47917     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47918   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47919     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47920   fi
47921 
47922 
47923 
47924 # Setup the JTReg Regression Test Harness.
47925 
47926 
47927 # Check whether --with-jtreg was given.
47928 if test "${with_jtreg+set}" = set; then :
47929   withval=$with_jtreg;
47930 else
47931   with_jtreg=no
47932 fi
47933 
47934 
47935   if test "x$with_jtreg" = xno; then
47936     # jtreg disabled
47937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47938 $as_echo_n "checking for jtreg... " >&6; }
47939     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47940 $as_echo "no" >&6; }
47941   else
47942     if test "x$with_jtreg" != xyes; then
47943       # with path specified.
47944       JT_HOME="$with_jtreg"
47945     fi
47946 
47947     if test "x$JT_HOME" != x; then
47948       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47949 $as_echo_n "checking for jtreg... " >&6; }
47950 
47951       # use JT_HOME enviroment var.
47952 
47953   # Only process if variable expands to non-empty
47954 
47955   if test "x$JT_HOME" != x; then
47956     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47957 
47958   # Input might be given as Windows format, start by converting to
47959   # unix format.
47960   path="$JT_HOME"
47961   new_path=`$CYGPATH -u "$path"`
47962 
47963   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47964   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47965   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47966   # "foo.exe" is OK but "foo" is an error.
47967   #
47968   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47969   # It is also a way to make sure we got the proper file name for the real test later on.
47970   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47971   if test "x$test_shortpath" = x; then
47972     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47973 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47974     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47975   fi
47976 
47977   # Call helper function which possibly converts this using DOS-style short mode.
47978   # If so, the updated path is stored in $new_path.
47979 
47980   input_path="$new_path"
47981   # Check if we need to convert this using DOS-style short mode. If the path
47982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47983   # take no chances and rewrite it.
47984   # Note: m4 eats our [], so we need to use [ and ] instead.
47985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47986   if test "x$has_forbidden_chars" != x; then
47987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47988     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47989     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47990     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47991       # Going to short mode and back again did indeed matter. Since short mode is
47992       # case insensitive, let's make it lowercase to improve readability.
47993       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47994       # Now convert it back to Unix-style (cygpath)
47995       input_path=`$CYGPATH -u "$shortmode_path"`
47996       new_path="$input_path"
47997     fi
47998   fi
47999 
48000   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48001   if test "x$test_cygdrive_prefix" = x; then
48002     # As a simple fix, exclude /usr/bin since it's not a real path.
48003     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48004       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48005       # a path prefixed by /cygdrive for fixpath to work.
48006       new_path="$CYGWIN_ROOT_PATH$input_path"
48007     fi
48008   fi
48009 
48010 
48011   if test "x$path" != "x$new_path"; then
48012     JT_HOME="$new_path"
48013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48014 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48015   fi
48016 
48017     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48018 
48019   path="$JT_HOME"
48020   has_colon=`$ECHO $path | $GREP ^.:`
48021   new_path="$path"
48022   if test "x$has_colon" = x; then
48023     # Not in mixed or Windows style, start by that.
48024     new_path=`cmd //c echo $path`
48025   fi
48026 
48027 
48028   input_path="$new_path"
48029   # Check if we need to convert this using DOS-style short mode. If the path
48030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48031   # take no chances and rewrite it.
48032   # Note: m4 eats our [], so we need to use [ and ] instead.
48033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48034   if test "x$has_forbidden_chars" != x; then
48035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48036     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48037   fi
48038 
48039 
48040   windows_path="$new_path"
48041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48042     unix_path=`$CYGPATH -u "$windows_path"`
48043     new_path="$unix_path"
48044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48046     new_path="$unix_path"
48047   fi
48048 
48049   if test "x$path" != "x$new_path"; then
48050     JT_HOME="$new_path"
48051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48052 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48053   fi
48054 
48055   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48056   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48057 
48058     else
48059       # We're on a unix platform. Hooray! :)
48060       path="$JT_HOME"
48061       has_space=`$ECHO "$path" | $GREP " "`
48062       if test "x$has_space" != x; then
48063         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48064 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48065         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48066       fi
48067 
48068       # Use eval to expand a potential ~
48069       eval path="$path"
48070       if test ! -f "$path" && test ! -d "$path"; then
48071         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48072       fi
48073 
48074       if test -d "$path"; then
48075         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48076       else
48077         dir="`$DIRNAME "$path"`"
48078         base="`$BASENAME "$path"`"
48079         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48080       fi
48081     fi
48082   fi
48083 
48084 
48085       # jtreg win32 script works for everybody
48086       JTREGEXE="$JT_HOME/bin/jtreg"
48087 
48088       if test ! -f "$JTREGEXE"; then
48089         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48090       fi
48091 
48092       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48093 $as_echo "$JTREGEXE" >&6; }
48094     else
48095       # try to find jtreg on path
48096 
48097 
48098 
48099   # Publish this variable in the help.
48100 
48101 
48102   if [ -z "${JTREGEXE+x}" ]; then
48103     # The variable is not set by user, try to locate tool using the code snippet
48104     for ac_prog in jtreg
48105 do
48106   # Extract the first word of "$ac_prog", so it can be a program name with args.
48107 set dummy $ac_prog; ac_word=$2
48108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48109 $as_echo_n "checking for $ac_word... " >&6; }
48110 if ${ac_cv_path_JTREGEXE+:} false; then :
48111   $as_echo_n "(cached) " >&6
48112 else
48113   case $JTREGEXE in
48114   [\\/]* | ?:[\\/]*)
48115   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48116   ;;
48117   *)
48118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48119 for as_dir in $PATH
48120 do
48121   IFS=$as_save_IFS
48122   test -z "$as_dir" && as_dir=.
48123     for ac_exec_ext in '' $ac_executable_extensions; do
48124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48125     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48127     break 2
48128   fi
48129 done
48130   done
48131 IFS=$as_save_IFS
48132 
48133   ;;
48134 esac
48135 fi
48136 JTREGEXE=$ac_cv_path_JTREGEXE
48137 if test -n "$JTREGEXE"; then
48138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48139 $as_echo "$JTREGEXE" >&6; }
48140 else
48141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48142 $as_echo "no" >&6; }
48143 fi
48144 
48145 
48146   test -n "$JTREGEXE" && break
48147 done
48148 
48149   else
48150     # The variable is set, but is it from the command line or the environment?
48151 
48152     # Try to remove the string !JTREGEXE! from our list.
48153     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48154     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48155       # If it failed, the variable was not from the command line. Ignore it,
48156       # but warn the user (except for BASH, which is always set by the calling BASH).
48157       if test "xJTREGEXE" != xBASH; then
48158         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48159 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48160       fi
48161       # Try to locate tool using the code snippet
48162       for ac_prog in jtreg
48163 do
48164   # Extract the first word of "$ac_prog", so it can be a program name with args.
48165 set dummy $ac_prog; ac_word=$2
48166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48167 $as_echo_n "checking for $ac_word... " >&6; }
48168 if ${ac_cv_path_JTREGEXE+:} false; then :
48169   $as_echo_n "(cached) " >&6
48170 else
48171   case $JTREGEXE in
48172   [\\/]* | ?:[\\/]*)
48173   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48174   ;;
48175   *)
48176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48177 for as_dir in $PATH
48178 do
48179   IFS=$as_save_IFS
48180   test -z "$as_dir" && as_dir=.
48181     for ac_exec_ext in '' $ac_executable_extensions; do
48182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48183     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48185     break 2
48186   fi
48187 done
48188   done
48189 IFS=$as_save_IFS
48190 
48191   ;;
48192 esac
48193 fi
48194 JTREGEXE=$ac_cv_path_JTREGEXE
48195 if test -n "$JTREGEXE"; then
48196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48197 $as_echo "$JTREGEXE" >&6; }
48198 else
48199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48200 $as_echo "no" >&6; }
48201 fi
48202 
48203 
48204   test -n "$JTREGEXE" && break
48205 done
48206 
48207     else
48208       # If it succeeded, then it was overridden by the user. We will use it
48209       # for the tool.
48210 
48211       # First remove it from the list of overridden variables, so we can test
48212       # for unknown variables in the end.
48213       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48214 
48215       # Check if we try to supply an empty value
48216       if test "x$JTREGEXE" = x; then
48217         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48218 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48220 $as_echo_n "checking for JTREGEXE... " >&6; }
48221         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48222 $as_echo "disabled" >&6; }
48223       else
48224         # Check if the provided tool contains a complete path.
48225         tool_specified="$JTREGEXE"
48226         tool_basename="${tool_specified##*/}"
48227         if test "x$tool_basename" = "x$tool_specified"; then
48228           # A command without a complete path is provided, search $PATH.
48229           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48230 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48231           # Extract the first word of "$tool_basename", so it can be a program name with args.
48232 set dummy $tool_basename; ac_word=$2
48233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48234 $as_echo_n "checking for $ac_word... " >&6; }
48235 if ${ac_cv_path_JTREGEXE+:} false; then :
48236   $as_echo_n "(cached) " >&6
48237 else
48238   case $JTREGEXE in
48239   [\\/]* | ?:[\\/]*)
48240   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48241   ;;
48242   *)
48243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48244 for as_dir in $PATH
48245 do
48246   IFS=$as_save_IFS
48247   test -z "$as_dir" && as_dir=.
48248     for ac_exec_ext in '' $ac_executable_extensions; do
48249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48250     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48252     break 2
48253   fi
48254 done
48255   done
48256 IFS=$as_save_IFS
48257 
48258   ;;
48259 esac
48260 fi
48261 JTREGEXE=$ac_cv_path_JTREGEXE
48262 if test -n "$JTREGEXE"; then
48263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48264 $as_echo "$JTREGEXE" >&6; }
48265 else
48266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48267 $as_echo "no" >&6; }
48268 fi
48269 
48270 
48271           if test "x$JTREGEXE" = x; then
48272             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48273           fi
48274         else
48275           # Otherwise we believe it is a complete path. Use it as it is.
48276           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48277 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48278           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48279 $as_echo_n "checking for JTREGEXE... " >&6; }
48280           if test ! -x "$tool_specified"; then
48281             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48282 $as_echo "not found" >&6; }
48283             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48284           fi
48285           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48286 $as_echo "$tool_specified" >&6; }
48287         fi
48288       fi
48289     fi
48290 
48291   fi
48292 
48293 
48294 
48295   if test "x$JTREGEXE" = x; then
48296     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48297   fi
48298 
48299 
48300       JT_HOME="`$DIRNAME $JTREGEXE`"
48301     fi
48302   fi
48303 
48304 
48305 
48306 
48307 
48308 
48309   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48310   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48311   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48312   #                              commands produced by the link step (currently AIX only)
48313   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48314     COMPILER_TARGET_BITS_FLAG="-q"
48315     COMPILER_COMMAND_FILE_FLAG="-f"
48316     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48317   else
48318     COMPILER_TARGET_BITS_FLAG="-m"
48319     COMPILER_COMMAND_FILE_FLAG="@"
48320     COMPILER_BINDCMD_FILE_FLAG=""
48321 
48322     # The solstudio linker does not support @-files.
48323     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48324       COMPILER_COMMAND_FILE_FLAG=
48325     fi
48326 
48327     # Check if @file is supported by gcc
48328     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48329       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48330 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48331       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48332       $ECHO "" "--version" > command.file
48333       if $CXX @command.file 2>&5 >&5; then
48334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48335 $as_echo "yes" >&6; }
48336         COMPILER_COMMAND_FILE_FLAG="@"
48337       else
48338         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48339 $as_echo "no" >&6; }
48340         COMPILER_COMMAND_FILE_FLAG=
48341       fi
48342       $RM command.file
48343     fi
48344   fi
48345 
48346 
48347 
48348 
48349   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48350   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48351     ARFLAGS="-r"
48352   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48353     ARFLAGS="-X64"
48354   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48355     # lib.exe is used as AR to create static libraries.
48356     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48357   else
48358     ARFLAGS=""
48359   fi
48360 
48361 
48362   ## Setup strip.
48363   # FIXME: should this really be per platform, or should it be per toolchain type?
48364   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48365   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48366   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48367     STRIPFLAGS="-g"
48368   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48369     STRIPFLAGS="-x"
48370   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48371     STRIPFLAGS="-S"
48372   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48373     STRIPFLAGS="-X32_64"
48374   fi
48375 
48376 
48377 
48378   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48379     CC_OUT_OPTION=-Fo
48380     EXE_OUT_OPTION=-out:
48381     LD_OUT_OPTION=-out:
48382     AR_OUT_OPTION=-out:
48383   else
48384     # The option used to specify the target .o,.a or .so file.
48385     # When compiling, how to specify the to be created object file.
48386     CC_OUT_OPTION='-o$(SPACE)'
48387     # When linking, how to specify the to be created executable.
48388     EXE_OUT_OPTION='-o$(SPACE)'
48389     # When linking, how to specify the to be created dynamically linkable library.
48390     LD_OUT_OPTION='-o$(SPACE)'
48391     # When archiving, how to specify the to be create static archive for object files.
48392     AR_OUT_OPTION='rcs$(SPACE)'
48393   fi
48394 
48395 
48396 
48397 
48398 
48399   # On Windows, we need to set RC flags.
48400   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48401     RC_FLAGS="-nologo -l0x409"
48402     JVM_RCFLAGS="-nologo"
48403     if test "x$DEBUG_LEVEL" = xrelease; then
48404       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48405       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48406     fi
48407 
48408     # The version variables used to create RC_FLAGS may be overridden
48409     # in a custom configure script, or possibly the command line.
48410     # Let those variables be expanded at make time in spec.gmk.
48411     # The \$ are escaped to the shell, and the $(...) variables
48412     # are evaluated by make.
48413     RC_FLAGS="$RC_FLAGS \
48414         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48415         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48416         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48417         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48418         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48419         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48420         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48421 
48422     JVM_RCFLAGS="$JVM_RCFLAGS \
48423         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48424         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48425         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48426         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48427         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48428         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48429         -D\"HS_FNAME=jvm.dll\" \
48430         -D\"HS_INTERNAL_NAME=jvm\""
48431   fi
48432 
48433 
48434 
48435   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48436     # silence copyright notice and other headers.
48437     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48438   fi
48439 
48440 
48441 # Now we can test some aspects on the target using configure macros.
48442 
48443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48444 $as_echo_n "checking for ANSI C header files... " >&6; }
48445 if ${ac_cv_header_stdc+:} false; then :
48446   $as_echo_n "(cached) " >&6
48447 else
48448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48449 /* end confdefs.h.  */
48450 #include <stdlib.h>
48451 #include <stdarg.h>
48452 #include <string.h>
48453 #include <float.h>
48454 
48455 int
48456 main ()
48457 {
48458 
48459   ;
48460   return 0;
48461 }
48462 _ACEOF
48463 if ac_fn_cxx_try_compile "$LINENO"; then :
48464   ac_cv_header_stdc=yes
48465 else
48466   ac_cv_header_stdc=no
48467 fi
48468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48469 
48470 if test $ac_cv_header_stdc = yes; then
48471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48473 /* end confdefs.h.  */
48474 #include <string.h>
48475 
48476 _ACEOF
48477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48478   $EGREP "memchr" >/dev/null 2>&1; then :
48479 
48480 else
48481   ac_cv_header_stdc=no
48482 fi
48483 rm -f conftest*
48484 
48485 fi
48486 
48487 if test $ac_cv_header_stdc = yes; then
48488   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48490 /* end confdefs.h.  */
48491 #include <stdlib.h>
48492 
48493 _ACEOF
48494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48495   $EGREP "free" >/dev/null 2>&1; then :
48496 
48497 else
48498   ac_cv_header_stdc=no
48499 fi
48500 rm -f conftest*
48501 
48502 fi
48503 
48504 if test $ac_cv_header_stdc = yes; then
48505   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48506   if test "$cross_compiling" = yes; then :
48507   :
48508 else
48509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48510 /* end confdefs.h.  */
48511 #include <ctype.h>
48512 #include <stdlib.h>
48513 #if ((' ' & 0x0FF) == 0x020)
48514 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48515 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48516 #else
48517 # define ISLOWER(c) \
48518                    (('a' <= (c) && (c) <= 'i') \
48519                      || ('j' <= (c) && (c) <= 'r') \
48520                      || ('s' <= (c) && (c) <= 'z'))
48521 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48522 #endif
48523 
48524 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48525 int
48526 main ()
48527 {
48528   int i;
48529   for (i = 0; i < 256; i++)
48530     if (XOR (islower (i), ISLOWER (i))
48531         || toupper (i) != TOUPPER (i))
48532       return 2;
48533   return 0;
48534 }
48535 _ACEOF
48536 if ac_fn_cxx_try_run "$LINENO"; then :
48537 
48538 else
48539   ac_cv_header_stdc=no
48540 fi
48541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48542   conftest.$ac_objext conftest.beam conftest.$ac_ext
48543 fi
48544 
48545 fi
48546 fi
48547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48548 $as_echo "$ac_cv_header_stdc" >&6; }
48549 if test $ac_cv_header_stdc = yes; then
48550 
48551 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48552 
48553 fi
48554 
48555 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48556 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48557                   inttypes.h stdint.h unistd.h
48558 do :
48559   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48560 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48561 "
48562 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48563   cat >>confdefs.h <<_ACEOF
48564 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48565 _ACEOF
48566 
48567 fi
48568 
48569 done
48570 
48571 
48572 
48573   ###############################################################################
48574   #
48575   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48576   # (The JVM can use 32 or 64 bit Java pointers but that decision
48577   # is made at runtime.)
48578   #
48579 
48580   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48581     # Always specify -m flag on Solaris
48582     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48583 
48584   # When we add flags to the "official" CFLAGS etc, we need to
48585   # keep track of these additions in ADDED_CFLAGS etc. These
48586   # will later be checked to make sure only controlled additions
48587   # have been made to CFLAGS etc.
48588   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48590   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48591 
48592   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48593   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48594   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48595 
48596   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48597   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48598   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48599 
48600   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48601   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48602   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48603 
48604   elif test "x$COMPILE_TYPE" = xreduced; then
48605     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48606       # Specify -m if running reduced on unix platforms
48607 
48608   # When we add flags to the "official" CFLAGS etc, we need to
48609   # keep track of these additions in ADDED_CFLAGS etc. These
48610   # will later be checked to make sure only controlled additions
48611   # have been made to CFLAGS etc.
48612   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48613   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48614   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48615 
48616   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48617   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48618   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48619 
48620   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48621   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48622   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48623 
48624   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48625   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48626   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48627 
48628     fi
48629   fi
48630   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48631     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48632     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48633     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48634   fi
48635 
48636   # Make compilation sanity check
48637   for ac_header in stdio.h
48638 do :
48639   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48640 if test "x$ac_cv_header_stdio_h" = xyes; then :
48641   cat >>confdefs.h <<_ACEOF
48642 #define HAVE_STDIO_H 1
48643 _ACEOF
48644 
48645 else
48646 
48647     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48648 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48649     if test "x$COMPILE_TYPE" = xreduced; then
48650 
48651   # Print a helpful message on how to acquire the necessary build dependency.
48652   # reduced is the help tag: freetype, cups, alsa etc
48653   MISSING_DEPENDENCY=reduced
48654 
48655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48656     cygwin_help $MISSING_DEPENDENCY
48657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48658     msys_help $MISSING_DEPENDENCY
48659   else
48660     PKGHANDLER_COMMAND=
48661 
48662     case $PKGHANDLER in
48663       apt-get)
48664         apt_help     $MISSING_DEPENDENCY ;;
48665       yum)
48666         yum_help     $MISSING_DEPENDENCY ;;
48667       port)
48668         port_help    $MISSING_DEPENDENCY ;;
48669       pkgutil)
48670         pkgutil_help $MISSING_DEPENDENCY ;;
48671       pkgadd)
48672         pkgadd_help  $MISSING_DEPENDENCY ;;
48673     esac
48674 
48675     if test "x$PKGHANDLER_COMMAND" != x; then
48676       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48677     fi
48678   fi
48679 
48680       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48681 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48682     elif test "x$COMPILE_TYPE" = xcross; then
48683       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48684 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48685     fi
48686     as_fn_error $? "Cannot continue." "$LINENO" 5
48687 
48688 fi
48689 
48690 done
48691 
48692 
48693   # The cast to long int works around a bug in the HP C Compiler
48694 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48695 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48696 # This bug is HP SR number 8606223364.
48697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48698 $as_echo_n "checking size of int *... " >&6; }
48699 if ${ac_cv_sizeof_int_p+:} false; then :
48700   $as_echo_n "(cached) " >&6
48701 else
48702   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48703 
48704 else
48705   if test "$ac_cv_type_int_p" = yes; then
48706      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48708 as_fn_error 77 "cannot compute sizeof (int *)
48709 See \`config.log' for more details" "$LINENO" 5; }
48710    else
48711      ac_cv_sizeof_int_p=0
48712    fi
48713 fi
48714 
48715 fi
48716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48717 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48718 
48719 
48720 
48721 cat >>confdefs.h <<_ACEOF
48722 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48723 _ACEOF
48724 
48725 
48726 
48727   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48728   if test "x$ac_cv_sizeof_int_p" = x; then
48729     # The test failed, lets stick to the assumed value.
48730     { $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
48731 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48732   else
48733     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48734 
48735     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48736       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48737       # Let's try to implicitely set the compilers target architecture and retry the test
48738       { $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
48739 $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;}
48740       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48741 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48742 
48743   # When we add flags to the "official" CFLAGS etc, we need to
48744   # keep track of these additions in ADDED_CFLAGS etc. These
48745   # will later be checked to make sure only controlled additions
48746   # have been made to CFLAGS etc.
48747   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48748   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48749   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48750 
48751   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48752   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48753   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48754 
48755   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48756   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48757   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48758 
48759   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48760   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48761   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48762 
48763 
48764       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48765       unset ac_cv_sizeof_int_p
48766       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48767       cat >>confdefs.h <<_ACEOF
48768 #undef SIZEOF_INT_P
48769 _ACEOF
48770 
48771       # The cast to long int works around a bug in the HP C Compiler
48772 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48773 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48774 # This bug is HP SR number 8606223364.
48775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48776 $as_echo_n "checking size of int *... " >&6; }
48777 if ${ac_cv_sizeof_int_p+:} false; then :
48778   $as_echo_n "(cached) " >&6
48779 else
48780   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48781 
48782 else
48783   if test "$ac_cv_type_int_p" = yes; then
48784      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48785 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48786 as_fn_error 77 "cannot compute sizeof (int *)
48787 See \`config.log' for more details" "$LINENO" 5; }
48788    else
48789      ac_cv_sizeof_int_p=0
48790    fi
48791 fi
48792 
48793 fi
48794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48795 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48796 
48797 
48798 
48799 cat >>confdefs.h <<_ACEOF
48800 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48801 _ACEOF
48802 
48803 
48804 
48805       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48806 
48807       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48808         { $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
48809 $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;}
48810         if test "x$COMPILE_TYPE" = xreduced; then
48811 
48812   # Print a helpful message on how to acquire the necessary build dependency.
48813   # reduced is the help tag: freetype, cups, alsa etc
48814   MISSING_DEPENDENCY=reduced
48815 
48816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48817     cygwin_help $MISSING_DEPENDENCY
48818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48819     msys_help $MISSING_DEPENDENCY
48820   else
48821     PKGHANDLER_COMMAND=
48822 
48823     case $PKGHANDLER in
48824       apt-get)
48825         apt_help     $MISSING_DEPENDENCY ;;
48826       yum)
48827         yum_help     $MISSING_DEPENDENCY ;;
48828       port)
48829         port_help    $MISSING_DEPENDENCY ;;
48830       pkgutil)
48831         pkgutil_help $MISSING_DEPENDENCY ;;
48832       pkgadd)
48833         pkgadd_help  $MISSING_DEPENDENCY ;;
48834     esac
48835 
48836     if test "x$PKGHANDLER_COMMAND" != x; then
48837       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48838     fi
48839   fi
48840 
48841           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48842 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48843         elif test "x$COMPILE_TYPE" = xcross; then
48844           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48845 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48846         fi
48847         as_fn_error $? "Cannot continue." "$LINENO" 5
48848       fi
48849     fi
48850   fi
48851 
48852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48853 $as_echo_n "checking for target address size... " >&6; }
48854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48855 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48856 
48857 
48858   ###############################################################################
48859   #
48860   # Is the target little of big endian?
48861   #
48862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48863 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48864 if ${ac_cv_c_bigendian+:} false; then :
48865   $as_echo_n "(cached) " >&6
48866 else
48867   ac_cv_c_bigendian=unknown
48868     # See if we're dealing with a universal compiler.
48869     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48870 /* end confdefs.h.  */
48871 #ifndef __APPLE_CC__
48872                not a universal capable compiler
48873              #endif
48874              typedef int dummy;
48875 
48876 _ACEOF
48877 if ac_fn_cxx_try_compile "$LINENO"; then :
48878 
48879         # Check for potential -arch flags.  It is not universal unless
48880         # there are at least two -arch flags with different values.
48881         ac_arch=
48882         ac_prev=
48883         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48884          if test -n "$ac_prev"; then
48885            case $ac_word in
48886              i?86 | x86_64 | ppc | ppc64)
48887                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48888                  ac_arch=$ac_word
48889                else
48890                  ac_cv_c_bigendian=universal
48891                  break
48892                fi
48893                ;;
48894            esac
48895            ac_prev=
48896          elif test "x$ac_word" = "x-arch"; then
48897            ac_prev=arch
48898          fi
48899        done
48900 fi
48901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48902     if test $ac_cv_c_bigendian = unknown; then
48903       # See if sys/param.h defines the BYTE_ORDER macro.
48904       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48905 /* end confdefs.h.  */
48906 #include <sys/types.h>
48907              #include <sys/param.h>
48908 
48909 int
48910 main ()
48911 {
48912 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48913                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48914                      && LITTLE_ENDIAN)
48915               bogus endian macros
48916              #endif
48917 
48918   ;
48919   return 0;
48920 }
48921 _ACEOF
48922 if ac_fn_cxx_try_compile "$LINENO"; then :
48923   # It does; now see whether it defined to BIG_ENDIAN or not.
48924          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48925 /* end confdefs.h.  */
48926 #include <sys/types.h>
48927                 #include <sys/param.h>
48928 
48929 int
48930 main ()
48931 {
48932 #if BYTE_ORDER != BIG_ENDIAN
48933                  not big endian
48934                 #endif
48935 
48936   ;
48937   return 0;
48938 }
48939 _ACEOF
48940 if ac_fn_cxx_try_compile "$LINENO"; then :
48941   ac_cv_c_bigendian=yes
48942 else
48943   ac_cv_c_bigendian=no
48944 fi
48945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946 fi
48947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948     fi
48949     if test $ac_cv_c_bigendian = unknown; then
48950       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48951       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48952 /* end confdefs.h.  */
48953 #include <limits.h>
48954 
48955 int
48956 main ()
48957 {
48958 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48959               bogus endian macros
48960              #endif
48961 
48962   ;
48963   return 0;
48964 }
48965 _ACEOF
48966 if ac_fn_cxx_try_compile "$LINENO"; then :
48967   # It does; now see whether it defined to _BIG_ENDIAN or not.
48968          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48969 /* end confdefs.h.  */
48970 #include <limits.h>
48971 
48972 int
48973 main ()
48974 {
48975 #ifndef _BIG_ENDIAN
48976                  not big endian
48977                 #endif
48978 
48979   ;
48980   return 0;
48981 }
48982 _ACEOF
48983 if ac_fn_cxx_try_compile "$LINENO"; then :
48984   ac_cv_c_bigendian=yes
48985 else
48986   ac_cv_c_bigendian=no
48987 fi
48988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48989 fi
48990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48991     fi
48992     if test $ac_cv_c_bigendian = unknown; then
48993       # Compile a test program.
48994       if test "$cross_compiling" = yes; then :
48995   # Try to guess by grepping values from an object file.
48996          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48997 /* end confdefs.h.  */
48998 short int ascii_mm[] =
48999                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49000                 short int ascii_ii[] =
49001                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49002                 int use_ascii (int i) {
49003                   return ascii_mm[i] + ascii_ii[i];
49004                 }
49005                 short int ebcdic_ii[] =
49006                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49007                 short int ebcdic_mm[] =
49008                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49009                 int use_ebcdic (int i) {
49010                   return ebcdic_mm[i] + ebcdic_ii[i];
49011                 }
49012                 extern int foo;
49013 
49014 int
49015 main ()
49016 {
49017 return use_ascii (foo) == use_ebcdic (foo);
49018   ;
49019   return 0;
49020 }
49021 _ACEOF
49022 if ac_fn_cxx_try_compile "$LINENO"; then :
49023   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49024               ac_cv_c_bigendian=yes
49025             fi
49026             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49027               if test "$ac_cv_c_bigendian" = unknown; then
49028                 ac_cv_c_bigendian=no
49029               else
49030                 # finding both strings is unlikely to happen, but who knows?
49031                 ac_cv_c_bigendian=unknown
49032               fi
49033             fi
49034 fi
49035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49036 else
49037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49038 /* end confdefs.h.  */
49039 $ac_includes_default
49040 int
49041 main ()
49042 {
49043 
49044              /* Are we little or big endian?  From Harbison&Steele.  */
49045              union
49046              {
49047                long int l;
49048                char c[sizeof (long int)];
49049              } u;
49050              u.l = 1;
49051              return u.c[sizeof (long int) - 1] == 1;
49052 
49053   ;
49054   return 0;
49055 }
49056 _ACEOF
49057 if ac_fn_cxx_try_run "$LINENO"; then :
49058   ac_cv_c_bigendian=no
49059 else
49060   ac_cv_c_bigendian=yes
49061 fi
49062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49063   conftest.$ac_objext conftest.beam conftest.$ac_ext
49064 fi
49065 
49066     fi
49067 fi
49068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49069 $as_echo "$ac_cv_c_bigendian" >&6; }
49070  case $ac_cv_c_bigendian in #(
49071    yes)
49072      ENDIAN="big";; #(
49073    no)
49074      ENDIAN="little" ;; #(
49075    universal)
49076      ENDIAN="universal_endianness"
49077      ;; #(
49078    *)
49079      ENDIAN="unknown" ;;
49080  esac
49081 
49082 
49083   if test "x$ENDIAN" = xuniversal_endianness; then
49084     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49085   fi
49086   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49087     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
49088   fi
49089 
49090 
49091 # Configure flags for the tools
49092 
49093   ###############################################################################
49094   #
49095   # How to compile shared libraries.
49096   #
49097 
49098   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49099     PICFLAG="-fPIC"
49100     C_FLAG_REORDER=''
49101     CXX_FLAG_REORDER=''
49102 
49103     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49104       # Linking is different on MacOSX
49105       if test "x$STATIC_BUILD" = xtrue; then
49106         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49107       else
49108         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49109         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49110       fi
49111       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49112       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49113       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49114       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49115     else
49116       # Default works for linux, might work on other platforms as well.
49117       SHARED_LIBRARY_FLAGS='-shared'
49118       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49119       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49120       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49121       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49122     fi
49123   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49124     C_FLAG_REORDER=''
49125     CXX_FLAG_REORDER=''
49126 
49127     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49128       # Linking is different on MacOSX
49129       PICFLAG=''
49130       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49131       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49132       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49133       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49134       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49135 
49136       if test "x$STATIC_BUILD" = xfalse; then
49137         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49138       fi
49139     else
49140       # Default works for linux, might work on other platforms as well.
49141       PICFLAG='-fPIC'
49142       SHARED_LIBRARY_FLAGS='-shared'
49143       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49144       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49145       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49146 
49147       # arm specific settings
49148       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xarm"; then
49149         # '-Wl,-z,origin' isn't used on arm.
49150         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49151       else
49152         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49153       fi
49154 
49155     fi
49156   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49157     PICFLAG="-KPIC"
49158     C_FLAG_REORDER='-xF'
49159     CXX_FLAG_REORDER='-xF'
49160     SHARED_LIBRARY_FLAGS="-G"
49161     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49162     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49163     SET_SHARED_LIBRARY_NAME='-h $1'
49164     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49165   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49166     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49167     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49168     # will have to patch this single instruction with a call to some out-of-order code which
49169     # does the load from the TOC. This is of course slow. But in that case we also would have
49170     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49171     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49172     # can be patched directly by the linker and does not require a jump to out-of-order code.
49173     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49174     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49175     # loads for accessing a global variable). But there are rumors that this may be seen as a
49176     # 'performance feature' because of improved code locality of the symbols used in a
49177     # compilation unit.
49178     PICFLAG="-qpic"
49179     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49180     C_FLAG_REORDER=''
49181     CXX_FLAG_REORDER=''
49182     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49183     SET_EXECUTABLE_ORIGIN=""
49184     SET_SHARED_LIBRARY_ORIGIN=''
49185     SET_SHARED_LIBRARY_NAME=''
49186     SET_SHARED_LIBRARY_MAPFILE=''
49187   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49188     PICFLAG=""
49189     C_FLAG_REORDER=''
49190     CXX_FLAG_REORDER=''
49191     SHARED_LIBRARY_FLAGS="-dll"
49192     SET_EXECUTABLE_ORIGIN=''
49193     SET_SHARED_LIBRARY_ORIGIN=''
49194     SET_SHARED_LIBRARY_NAME=''
49195     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49196   fi
49197 
49198 
49199 
49200 
49201 
49202 
49203 
49204 
49205 
49206   # The (cross) compiler is now configured, we can now test capabilities
49207   # of the target platform.
49208 
49209 
49210 
49211   ###############################################################################
49212   #
49213   # Setup the opt flags for different compilers
49214   # and different operating systems.
49215   #
49216 
49217   # FIXME: this was indirectly the old default, but just inherited.
49218   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49219   #   C_FLAG_DEPS="-MMD -MF"
49220   # fi
49221 
49222   # Generate make dependency files
49223   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49224     C_FLAG_DEPS="-MMD -MF"
49225   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49226     C_FLAG_DEPS="-MMD -MF"
49227   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49228     C_FLAG_DEPS="-xMMD -xMF"
49229   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49230     C_FLAG_DEPS="-qmakedep=gcc -MF"
49231   fi
49232   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49233 
49234 
49235 
49236   # Debug symbols
49237   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49238     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49239       # reduce from default "-g2" option to save space
49240       CFLAGS_DEBUG_SYMBOLS="-g1"
49241       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49242     else
49243       CFLAGS_DEBUG_SYMBOLS="-g"
49244       CXXFLAGS_DEBUG_SYMBOLS="-g"
49245     fi
49246   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49247     CFLAGS_DEBUG_SYMBOLS="-g"
49248     CXXFLAGS_DEBUG_SYMBOLS="-g"
49249   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49250     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49251     # -g0 enables debug symbols without disabling inlining.
49252     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49253   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49254     CFLAGS_DEBUG_SYMBOLS="-g"
49255     CXXFLAGS_DEBUG_SYMBOLS="-g"
49256   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49257     CFLAGS_DEBUG_SYMBOLS="-Zi"
49258     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49259   fi
49260 
49261 
49262 
49263   # Debug symbols for JVM_CFLAGS
49264   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49265     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49266     if test "x$DEBUG_LEVEL" = xslowdebug; then
49267       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49268     else
49269       # -g0 does not disable inlining, which -g does.
49270       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49271     fi
49272   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49273     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49274   else
49275     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49276   fi
49277 
49278 
49279   # bounds, memory and behavior checking options
49280   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49281     case $DEBUG_LEVEL in
49282     release )
49283       # no adjustment
49284       ;;
49285     fastdebug )
49286       # no adjustment
49287       ;;
49288     slowdebug )
49289       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49290       # get's added conditionally on whether we produce debug symbols or not.
49291       # This is most likely not really correct.
49292 
49293       # Add runtime stack smashing and undefined behavior checks.
49294       # Not all versions of gcc support -fstack-protector
49295       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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 
49329 
49330 
49331 
49332 
49333 
49334 
49335 
49336 
49337 
49338     # Execute function body
49339 
49340 
49341 
49342 
49343 
49344 
49345 
49346 
49347 
49348 
49349 
49350 
49351 
49352 
49353 
49354 
49355 
49356 
49357 
49358 
49359 
49360 
49361 
49362 
49363 
49364 
49365 
49366 
49367 
49368 
49369 
49370 
49371 
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387     # Execute function body
49388 
49389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49390 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49391   supports=yes
49392 
49393   saved_cflags="$CFLAGS"
49394   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49395   ac_ext=c
49396 ac_cpp='$CPP $CPPFLAGS'
49397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49400 
49401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49402 /* end confdefs.h.  */
49403 int i;
49404 _ACEOF
49405 if ac_fn_c_try_compile "$LINENO"; then :
49406 
49407 else
49408   supports=no
49409 fi
49410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49411   ac_ext=cpp
49412 ac_cpp='$CXXCPP $CPPFLAGS'
49413 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49414 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49415 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49416 
49417   CFLAGS="$saved_cflags"
49418 
49419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49420 $as_echo "$supports" >&6; }
49421   if test "x$supports" = "xyes" ; then
49422     :
49423     C_COMP_SUPPORTS="yes"
49424   else
49425     :
49426     C_COMP_SUPPORTS="no"
49427   fi
49428 
49429 
49430 
49431 
49432 
49433 
49434 
49435 
49436 
49437 
49438 
49439 
49440 
49441 
49442 
49443 
49444 
49445 
49446 
49447 
49448 
49449 
49450 
49451 
49452 
49453 
49454 
49455 
49456 
49457 
49458 
49459 
49460 
49461 
49462 
49463 
49464 
49465 
49466 
49467 
49468 
49469 
49470 
49471 
49472 
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485 
49486 
49487     # Execute function body
49488 
49489   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49490 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49491   supports=yes
49492 
49493   saved_cxxflags="$CXXFLAGS"
49494   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49495   ac_ext=cpp
49496 ac_cpp='$CXXCPP $CPPFLAGS'
49497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49498 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49500 
49501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49502 /* end confdefs.h.  */
49503 int i;
49504 _ACEOF
49505 if ac_fn_cxx_try_compile "$LINENO"; then :
49506 
49507 else
49508   supports=no
49509 fi
49510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49511   ac_ext=cpp
49512 ac_cpp='$CXXCPP $CPPFLAGS'
49513 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49514 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49515 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49516 
49517   CXXFLAGS="$saved_cxxflags"
49518 
49519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49520 $as_echo "$supports" >&6; }
49521   if test "x$supports" = "xyes" ; then
49522     :
49523     CXX_COMP_SUPPORTS="yes"
49524   else
49525     :
49526     CXX_COMP_SUPPORTS="no"
49527   fi
49528 
49529 
49530 
49531 
49532 
49533 
49534 
49535 
49536 
49537 
49538 
49539 
49540 
49541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49542 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49543   supports=no
49544   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49545 
49546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49547 $as_echo "$supports" >&6; }
49548   if test "x$supports" = "xyes" ; then
49549     :
49550 
49551   else
49552     :
49553     STACK_PROTECTOR_CFLAG=""
49554   fi
49555 
49556 
49557 
49558 
49559 
49560 
49561 
49562       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49563       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49564       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49565         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49566       fi
49567       ;;
49568     esac
49569   fi
49570 
49571   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49572     if test "x$DEBUG_LEVEL" != xrelease; then
49573       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49574         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49575       fi
49576     fi
49577   fi
49578 
49579   # Optimization levels
49580   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49581     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49582 
49583     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49584       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49585       C_O_FLAG_HIGHEST_JVM="-xO4"
49586       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49587       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49588       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49589       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49590       C_O_FLAG_DEBUG_JVM=""
49591       C_O_FLAG_NONE="-xregs=no%frameptr"
49592       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49593       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49594       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49595       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49596       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49597       CXX_O_FLAG_DEBUG_JVM=""
49598       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49599       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49600         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49601         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49602       fi
49603     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49604       C_O_FLAG_HIGHEST_JVM="-xO4"
49605       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49606       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49607       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49608       C_O_FLAG_DEBUG=""
49609       C_O_FLAG_DEBUG_JVM=""
49610       C_O_FLAG_NONE=""
49611       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49612       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49613       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49614       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49615       CXX_O_FLAG_DEBUG=""
49616       CXX_O_FLAG_DEBUG_JVM=""
49617       CXX_O_FLAG_NONE=""
49618     fi
49619   else
49620     # The remaining toolchains share opt flags between CC and CXX;
49621     # setup for C and duplicate afterwards.
49622     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49623       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49624         # On MacOSX we optimize for size, something
49625         # we should do for all platforms?
49626         C_O_FLAG_HIGHEST_JVM="-Os"
49627         C_O_FLAG_HIGHEST="-Os"
49628         C_O_FLAG_HI="-Os"
49629         C_O_FLAG_NORM="-Os"
49630         C_O_FLAG_SIZE="-Os"
49631       else
49632         C_O_FLAG_HIGHEST_JVM="-O3"
49633         C_O_FLAG_HIGHEST="-O3"
49634         C_O_FLAG_HI="-O3"
49635         C_O_FLAG_NORM="-O2"
49636         C_O_FLAG_SIZE="-Os"
49637       fi
49638       C_O_FLAG_DEBUG="-O0"
49639       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49640         C_O_FLAG_DEBUG_JVM=""
49641       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49642         C_O_FLAG_DEBUG_JVM="-O0"
49643       fi
49644       C_O_FLAG_NONE="-O0"
49645     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49646       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49647         # On MacOSX we optimize for size, something
49648         # we should do for all platforms?
49649         C_O_FLAG_HIGHEST_JVM="-Os"
49650         C_O_FLAG_HIGHEST="-Os"
49651         C_O_FLAG_HI="-Os"
49652         C_O_FLAG_NORM="-Os"
49653         C_O_FLAG_SIZE="-Os"
49654       else
49655         C_O_FLAG_HIGHEST_JVM="-O3"
49656         C_O_FLAG_HIGHEST="-O3"
49657         C_O_FLAG_HI="-O3"
49658         C_O_FLAG_NORM="-O2"
49659         C_O_FLAG_SIZE="-Os"
49660       fi
49661       C_O_FLAG_DEBUG="-O0"
49662       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49663         C_O_FLAG_DEBUG_JVM=""
49664       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49665         C_O_FLAG_DEBUG_JVM="-O0"
49666       fi
49667       C_O_FLAG_NONE="-O0"
49668     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49669       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49670       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49671       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49672       C_O_FLAG_NORM="-O2"
49673       C_O_FLAG_DEBUG="-qnoopt"
49674       # FIXME: Value below not verified.
49675       C_O_FLAG_DEBUG_JVM=""
49676       C_O_FLAG_NONE="-qnoopt"
49677     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49678       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49679       C_O_FLAG_HIGHEST="-O2"
49680       C_O_FLAG_HI="-O1"
49681       C_O_FLAG_NORM="-O1"
49682       C_O_FLAG_DEBUG="-Od"
49683       C_O_FLAG_DEBUG_JVM=""
49684       C_O_FLAG_NONE="-Od"
49685       C_O_FLAG_SIZE="-Os"
49686     fi
49687     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49688     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49689     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49690     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49691     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49692     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49693     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49694     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49695   fi
49696 
49697   # Adjust optimization flags according to debug level.
49698   case $DEBUG_LEVEL in
49699     release )
49700       # no adjustment
49701       ;;
49702     fastdebug )
49703       # Not quite so much optimization
49704       C_O_FLAG_HI="$C_O_FLAG_NORM"
49705       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49706       ;;
49707     slowdebug )
49708       # Disable optimization
49709       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49710       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49711       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49712       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49713       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49714       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49715       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49716       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49717       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49718       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49719       ;;
49720   esac
49721 
49722 
49723 
49724 
49725 
49726 
49727 
49728 
49729 
49730 
49731 
49732 
49733 
49734 
49735 
49736 
49737 
49738 
49739 
49740 
49741 # Check whether --with-abi-profile was given.
49742 if test "${with_abi_profile+set}" = set; then :
49743   withval=$with_abi_profile;
49744 fi
49745 
49746 
49747   if test "x$with_abi_profile" != x; then
49748     if test "x$OPENJDK_TARGET_CPU" != xarm && \
49749         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49750       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49751     fi
49752 
49753     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49755 $as_echo_n "checking for ABI profle... " >&6; }
49756     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49757 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49758 
49759     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49760       ARM_FLOAT_TYPE=vfp-sflt
49761       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49762     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49763       ARM_FLOAT_TYPE=vfp-hflt
49764       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49765     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49766       ARM_FLOAT_TYPE=sflt
49767       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49768     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49769       ARM_FLOAT_TYPE=vfp-sflt
49770       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49771     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49772       ARM_FLOAT_TYPE=vfp-hflt
49773       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49774     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49775       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49776       ARM_FLOAT_TYPE=
49777       ARM_ARCH_TYPE_FLAGS=
49778     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49779       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49780       ARM_FLOAT_TYPE=
49781       ARM_ARCH_TYPE_FLAGS=
49782     else
49783       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49784     fi
49785 
49786     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49787       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49788     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49789       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49790     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49791       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49792     fi
49793     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49794 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49796 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49797 
49798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49799 $as_echo_n "checking for arch type flags... " >&6; }
49800     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49801 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49802 
49803     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49804     # autoconf target triplet.
49805      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49806     # Sanity check that it is a known ABI.
49807     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49808         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49809         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49810           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49811 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49812     fi
49813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49814 $as_echo_n "checking for ABI property name... " >&6; }
49815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49816 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49817 
49818 
49819     # Pass these on to the open part of configure as if they were set using
49820     # --with-extra-c[xx]flags.
49821     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49822     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49823     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49824     # FIXME: This should not really be set using extra_cflags.
49825     if test "x$OPENJDK_TARGET_CPU" = xarm; then
49826         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49827         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49828     fi
49829     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49830     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49831     # And pass the architecture flags to the linker as well
49832     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49833   fi
49834 
49835   # When building with an abi profile, the name of that profile is appended on the
49836   # bundle platform, which is used in bundle names.
49837   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49838     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49839   fi
49840 
49841 
49842   # Special extras...
49843   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49844     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49845       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49846       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49847     fi
49848     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49849     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49850   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49851     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49852     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49853   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49854     CXXSTD_CXXFLAG="-std=gnu++98"
49855 
49856 
49857 
49858 
49859 
49860 
49861 
49862 
49863 
49864 
49865 
49866 
49867 
49868 
49869 
49870 
49871 
49872 
49873 
49874 
49875 
49876 
49877 
49878 
49879 
49880 
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893 
49894 
49895 
49896 
49897     # Execute function body
49898 
49899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49900 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49901   supports=yes
49902 
49903   saved_cxxflags="$CXXFLAGS"
49904   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49905   ac_ext=cpp
49906 ac_cpp='$CXXCPP $CPPFLAGS'
49907 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49908 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49909 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49910 
49911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49912 /* end confdefs.h.  */
49913 int i;
49914 _ACEOF
49915 if ac_fn_cxx_try_compile "$LINENO"; then :
49916 
49917 else
49918   supports=no
49919 fi
49920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49921   ac_ext=cpp
49922 ac_cpp='$CXXCPP $CPPFLAGS'
49923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49926 
49927   CXXFLAGS="$saved_cxxflags"
49928 
49929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49930 $as_echo "$supports" >&6; }
49931   if test "x$supports" = "xyes" ; then
49932     :
49933 
49934   else
49935     :
49936     CXXSTD_CXXFLAG=""
49937   fi
49938 
49939 
49940 
49941 
49942 
49943 
49944 
49945 
49946 
49947 
49948 
49949 
49950     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49951     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49952 
49953   fi
49954   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49955     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49956     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49957   fi
49958 
49959   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49960     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49961     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49962   fi
49963 
49964   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49965   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49966   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49967 
49968   ###############################################################################
49969   #
49970   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49971   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49972   #
49973 
49974   # Setup compiler/platform specific flags into
49975   #    CFLAGS_JDK    - C Compiler flags
49976   #    CXXFLAGS_JDK  - C++ Compiler flags
49977   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49978   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49979     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49980     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49981     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49982     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49983       # Force compatibility with i586 on 32 bit intel platforms.
49984       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49985       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49986     fi
49987     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49988         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49989     case $OPENJDK_TARGET_CPU_ARCH in
49990       arm )
49991         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49992         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49993         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49994         ;;
49995       ppc )
49996         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49997         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49998         ;;
49999       s390 )
50000         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50001         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50002         ;;
50003       * )
50004         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50005         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50006         ;;
50007     esac
50008 
50009 
50010 
50011 
50012 
50013 
50014 
50015 
50016 
50017 
50018 
50019 
50020 
50021 
50022 
50023 
50024 
50025 
50026 
50027 
50028 
50029 
50030 
50031 
50032 
50033 
50034 
50035 
50036 
50037 
50038 
50039 
50040 
50041 
50042 
50043 
50044 
50045 
50046 
50047 
50048 
50049 
50050 
50051 
50052 
50053 
50054 
50055 
50056 
50057 
50058 
50059 
50060 
50061 
50062     # Execute function body
50063 
50064   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50065   REFERENCE_VERSION=6
50066 
50067   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50068     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50069   fi
50070 
50071   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50072     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50073   fi
50074 
50075   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50076   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50077 
50078   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50079     :
50080 
50081   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50082   # runs afoul of the more aggressive versions of these optimisations.
50083   # Notably, value range propagation now assumes that the this pointer of C++
50084   # member functions is non-null.
50085   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50086         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50087         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50088 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50089   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50090   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50091 
50092   else
50093     :
50094 
50095   fi
50096 
50097 
50098 
50099 
50100 
50101 
50102 
50103 
50104 
50105 
50106 
50107 
50108 
50109 
50110   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50111     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50112 
50113     # Restrict the debug information created by Clang to avoid
50114     # too big object files and speed the build up a little bit
50115     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50116     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50117     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50118       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50119         # Force compatibility with i586 on 32 bit intel platforms.
50120         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50121         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50122       fi
50123       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50124       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50125           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50126       case $OPENJDK_TARGET_CPU_ARCH in
50127         ppc )
50128           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50129           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50130           ;;
50131         * )
50132           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50133           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50134           ;;
50135       esac
50136     fi
50137   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50138     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50139     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50140     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50141       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50142     fi
50143 
50144     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50145     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50146   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50147     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50148     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50149     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50150   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50151     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50152         -MD -Zc:wchar_t- -W3 -wd4800 \
50153         -DWIN32_LEAN_AND_MEAN \
50154         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50155         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50156         -DWIN32 -DIAL"
50157     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50158       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50159     else
50160       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50161     fi
50162     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50163     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50164     # studio.
50165     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50166       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50167       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50168       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50169     fi
50170   fi
50171 
50172   ###############################################################################
50173 
50174   # Adjust flags according to debug level.
50175   case $DEBUG_LEVEL in
50176     fastdebug | slowdebug )
50177       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50178       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50179       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50180       ;;
50181     release )
50182       ;;
50183     * )
50184       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50185       ;;
50186   esac
50187 
50188   # Set some common defines. These works for all compilers, but assume
50189   # -D is universally accepted.
50190 
50191   # Setup endianness
50192   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50193     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50194     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50195     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50196     #   Note: -Dmacro         is the same as    #define macro 1
50197     #         -Dmacro=        is the same as    #define macro
50198     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50199       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50200     else
50201       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50202     fi
50203   else
50204     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50205     # are defined in the system?
50206     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50207       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50208     else
50209       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50210     fi
50211   fi
50212 
50213   # Setup target OS define. Use OS target name but in upper case.
50214   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50215   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50216 
50217   # Setup target CPU
50218   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50219       $OPENJDK_TARGET_ADD_LP64 \
50220       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50221 
50222   # Setup debug/release defines
50223   if test "x$DEBUG_LEVEL" = xrelease; then
50224     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50225     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50226       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50227     fi
50228   else
50229     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50230   fi
50231 
50232   # Set some additional per-OS defines.
50233   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50234     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50235     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50236         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50237   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50238     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50239     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50240         -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50241   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50242     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50243     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50244     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50245     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50246         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50247         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50248         -fno-omit-frame-pointer"
50249   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50250     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50251     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50252     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50253         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50254         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50255   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50256     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50257   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50258     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50259     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50260   fi
50261 
50262   # Set some additional per-CPU defines.
50263   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50264     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50265   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50266     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50267   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50268     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50269       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50270       # fixes `relocation truncated to fit' error for gcc 4.1.
50271       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50272       # Use ppc64 instructions, but schedule for power5
50273       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50274     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50275       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50276     fi
50277   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50278     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50279       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50280       # Little endian machine uses ELFv2 ABI.
50281       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50282       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50283       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50284     fi
50285   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50286     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50287       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50288     fi
50289   fi
50290 
50291   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50292     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50293   fi
50294 
50295   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50296     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50297       # Solaris does not have _LP64=1 in the old build.
50298       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50299       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50300     fi
50301   fi
50302 
50303   # Set JVM_CFLAGS warning handling
50304   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50305     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50306         -Wunused-value -Woverloaded-virtual"
50307 
50308     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50309 
50310 
50311 
50312 
50313 
50314 
50315 
50316 
50317 
50318 
50319 
50320 
50321 
50322 
50323 
50324 
50325 
50326 
50327 
50328 
50329 
50330 
50331 
50332 
50333 
50334 
50335 
50336 
50337 
50338 
50339 
50340 
50341 
50342 
50343 
50344 
50345 
50346 
50347 
50348 
50349 
50350 
50351 
50352 
50353 
50354 
50355 
50356 
50357 
50358 
50359 
50360 
50361 
50362 
50363     # Execute function body
50364 
50365   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50366   REFERENCE_VERSION=4.8
50367 
50368   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50369     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50370   fi
50371 
50372   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50373     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50374   fi
50375 
50376   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50377   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50378 
50379   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50380     :
50381 
50382             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50383             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50384 
50385 
50386   else
50387     :
50388 
50389   fi
50390 
50391 
50392 
50393 
50394 
50395 
50396 
50397 
50398 
50399 
50400 
50401 
50402 
50403 
50404     fi
50405     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50406       # Non-zero builds have stricter warnings
50407       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50408     else
50409       if test "x$TOOLCHAIN_TYPE" = xclang; then
50410         # Some versions of llvm do not like -Wundef
50411         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50412       fi
50413     fi
50414   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50415     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50416         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50417   fi
50418 
50419   # Additional macosx handling
50420   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50421     # Setting these parameters makes it an error to link to macosx APIs that are
50422     # newer than the given OS version and makes the linked binaries compatible
50423     # even if built on a newer version of the OS.
50424     # The expected format is X.Y.Z
50425     MACOSX_VERSION_MIN=10.7.0
50426 
50427 
50428     # The macro takes the version with no dots, ex: 1070
50429     # Let the flags variables get resolved in make for easier override on make
50430     # command line.
50431     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50432     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50433   fi
50434 
50435   # Setup some hard coded includes
50436   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50437       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50438       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50439       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50440       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50441       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50442       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50443 
50444   # The shared libraries are compiled using the picflag.
50445   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50446       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50447   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50448       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50449 
50450   # Executable flags
50451   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50452   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50453 
50454 
50455 
50456 
50457 
50458 
50459   # Setup LDFLAGS et al.
50460   #
50461 
50462   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50463     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50464     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50465     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50466     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50467       LDFLAGS_SAFESH="-safeseh"
50468       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50469       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50470       # NOTE: Old build added -machine. Probably not needed.
50471       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50472     else
50473       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50474     fi
50475   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50476       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50477       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50478         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50479         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50480     fi
50481   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50482     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50483     # We have previously set HAS_GNU_HASH if this is the case
50484     if test -n "$HAS_GNU_HASH"; then
50485       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50486       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50487       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50488     fi
50489       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50490         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50491     fi
50492     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50493       # And since we now know that the linker is gnu, then add -z defs, to forbid
50494       # undefined symbols in object files.
50495       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50496       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50497       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50498       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50499       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50500       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50501         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50502       fi
50503       case $DEBUG_LEVEL in
50504         release )
50505           # tell linker to optimize libraries.
50506           # Should this be supplied to the OSS linker as well?
50507           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50508           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50509           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50510           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50511             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50512           fi
50513           ;;
50514         slowdebug )
50515           # Hotspot always let the linker optimize
50516           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50517           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50518             # do relocations at load
50519             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50520             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50521             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50522           fi
50523           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50524             # mark relocations read only
50525             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50526             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50527             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50528           fi
50529           ;;
50530         fastdebug )
50531           # Hotspot always let the linker optimize
50532           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50533           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50534             # mark relocations read only
50535             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50536             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50537             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50538           fi
50539           ;;
50540         * )
50541           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50542           ;;
50543         esac
50544     fi
50545   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50546     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50547     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50548     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50549     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50550     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50551     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50552       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50553     fi
50554   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50555     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50556     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50557     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50558   fi
50559 
50560   # Customize LDFLAGS for executables
50561 
50562   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50563 
50564   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50565     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50566       LDFLAGS_STACK_SIZE=1048576
50567     else
50568       LDFLAGS_STACK_SIZE=327680
50569     fi
50570     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50571   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50572     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50573   fi
50574 
50575   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50576 
50577   # Customize LDFLAGS for libs
50578   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50579 
50580   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50581   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50582     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50583         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50584     JDKLIB_LIBS=""
50585   else
50586     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50587         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50588 
50589     if test "xTARGET" = "xTARGET"; then
50590       # On some platforms (mac) the linker warns about non existing -L dirs.
50591       # For any of the variants server, client or minimal, the dir matches the
50592       # variant name. The "main" variant should be used for linking. For the
50593       # rest, the dir is just server.
50594       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50595           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50596         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50597             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
50598       else
50599         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50600             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50601       fi
50602     elif test "xTARGET" = "xBUILD"; then
50603       # When building a buildjdk, it's always only the server variant
50604       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50605           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50606     fi
50607 
50608     JDKLIB_LIBS="-ljava -ljvm"
50609     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50610       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50611     fi
50612 
50613   fi
50614 
50615 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50616 
50617   # Set JVM_LIBS (per os)
50618   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50619     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50620   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50621     # FIXME: This hard-coded path is not really proper.
50622     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50623       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50624     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50625       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50626     fi
50627     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50628         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50629   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50630     JVM_LIBS="$JVM_LIBS -lm"
50631   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50632     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50633   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50634     JVM_LIBS="$JVM_LIBS -lm"
50635   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50636     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50637         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50638         wsock32.lib winmm.lib version.lib psapi.lib"
50639     fi
50640 
50641   # Set JVM_ASFLAGS
50642   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50643     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50644       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50645     fi
50646   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50647     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50648   fi
50649 
50650   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663 
50664 
50665 
50666   # Special extras...
50667   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50668     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50669       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50670       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50671     fi
50672     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50673     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50674   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50675     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50676     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50677   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50678     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712 
50713 
50714 
50715 
50716 
50717 
50718 
50719 
50720 
50721     # Execute function body
50722 
50723   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50724 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50725   supports=yes
50726 
50727   saved_cxxflags="$CXXFLAGS"
50728   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50729   ac_ext=cpp
50730 ac_cpp='$CXXCPP $CPPFLAGS'
50731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50734 
50735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50736 /* end confdefs.h.  */
50737 int i;
50738 _ACEOF
50739 if ac_fn_cxx_try_compile "$LINENO"; then :
50740 
50741 else
50742   supports=no
50743 fi
50744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50745   ac_ext=cpp
50746 ac_cpp='$CXXCPP $CPPFLAGS'
50747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50750 
50751   CXXFLAGS="$saved_cxxflags"
50752 
50753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50754 $as_echo "$supports" >&6; }
50755   if test "x$supports" = "xyes" ; then
50756     :
50757 
50758   else
50759     :
50760     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50761   fi
50762 
50763 
50764 
50765 
50766 
50767 
50768 
50769 
50770 
50771 
50772 
50773 
50774     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50775     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50776 
50777   fi
50778   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50779     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50780     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50781   fi
50782 
50783   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50784     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50785     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50786   fi
50787 
50788   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50789   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50790   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50791 
50792   ###############################################################################
50793   #
50794   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50795   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50796   #
50797 
50798   # Setup compiler/platform specific flags into
50799   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50800   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50801   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50802   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50803     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50804     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50805     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50806     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50807       # Force compatibility with i586 on 32 bit intel platforms.
50808       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50809       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50810     fi
50811     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50812         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50813     case $OPENJDK_BUILD_CPU_ARCH in
50814       arm )
50815         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50816         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50817         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50818         ;;
50819       ppc )
50820         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50821         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50822         ;;
50823       s390 )
50824         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50825         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50826         ;;
50827       * )
50828         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50829         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50830         ;;
50831     esac
50832 
50833 
50834 
50835 
50836 
50837 
50838 
50839 
50840 
50841 
50842 
50843 
50844 
50845 
50846 
50847 
50848 
50849 
50850 
50851 
50852 
50853 
50854 
50855 
50856 
50857 
50858 
50859 
50860 
50861 
50862 
50863 
50864 
50865 
50866 
50867 
50868 
50869 
50870 
50871 
50872 
50873 
50874 
50875 
50876 
50877 
50878 
50879 
50880 
50881 
50882 
50883 
50884 
50885 
50886     # Execute function body
50887 
50888   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50889   REFERENCE_VERSION=6
50890 
50891   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50892     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50893   fi
50894 
50895   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50896     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50897   fi
50898 
50899   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50900   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50901 
50902   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50903     :
50904 
50905   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50906   # runs afoul of the more aggressive versions of these optimisations.
50907   # Notably, value range propagation now assumes that the this pointer of C++
50908   # member functions is non-null.
50909   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50910         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50911         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50912 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50913   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50914   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50915 
50916   else
50917     :
50918 
50919   fi
50920 
50921 
50922 
50923 
50924 
50925 
50926 
50927 
50928 
50929 
50930 
50931 
50932 
50933 
50934   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50935     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50936 
50937     # Restrict the debug information created by Clang to avoid
50938     # too big object files and speed the build up a little bit
50939     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50940     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50941     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50942       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50943         # Force compatibility with i586 on 32 bit intel platforms.
50944         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50945         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50946       fi
50947       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50948       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50949           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50950       case $OPENJDK_BUILD_CPU_ARCH in
50951         ppc )
50952           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50953           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50954           ;;
50955         * )
50956           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50957           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50958           ;;
50959       esac
50960     fi
50961   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50962     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50963     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50964     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50965       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50966     fi
50967 
50968     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50969     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50970   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50971     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50972     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50973     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50974   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50975     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50976         -MD -Zc:wchar_t- -W3 -wd4800 \
50977         -DWIN32_LEAN_AND_MEAN \
50978         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50979         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50980         -DWIN32 -DIAL"
50981     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50982       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50983     else
50984       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50985     fi
50986     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50987     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50988     # studio.
50989     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50990       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50991       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50992       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50993     fi
50994   fi
50995 
50996   ###############################################################################
50997 
50998   # Adjust flags according to debug level.
50999   case $DEBUG_LEVEL in
51000     fastdebug | slowdebug )
51001       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51002       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51003       JAVAC_FLAGS="$JAVAC_FLAGS -g"
51004       ;;
51005     release )
51006       ;;
51007     * )
51008       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51009       ;;
51010   esac
51011 
51012   # Set some common defines. These works for all compilers, but assume
51013   # -D is universally accepted.
51014 
51015   # Setup endianness
51016   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51017     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51018     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51019     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51020     #   Note: -Dmacro         is the same as    #define macro 1
51021     #         -Dmacro=        is the same as    #define macro
51022     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51023       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51024     else
51025       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51026     fi
51027   else
51028     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51029     # are defined in the system?
51030     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51031       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51032     else
51033       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51034     fi
51035   fi
51036 
51037   # Setup target OS define. Use OS target name but in upper case.
51038   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51039   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51040 
51041   # Setup target CPU
51042   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51043       $OPENJDK_BUILD_ADD_LP64 \
51044       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51045 
51046   # Setup debug/release defines
51047   if test "x$DEBUG_LEVEL" = xrelease; then
51048     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51049     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51050       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51051     fi
51052   else
51053     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51054   fi
51055 
51056   # Set some additional per-OS defines.
51057   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51058     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51059     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51060         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51061   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51062     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51063     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51064         -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
51065   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51066     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51067     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51068     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51069     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51070         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51071         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51072         -fno-omit-frame-pointer"
51073   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51074     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51075     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51076     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51077         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51078         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51079   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51080     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51081   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51082     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51083     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51084   fi
51085 
51086   # Set some additional per-CPU defines.
51087   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51088     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51089   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51090     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51091   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51092     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51093       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51094       # fixes `relocation truncated to fit' error for gcc 4.1.
51095       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51096       # Use ppc64 instructions, but schedule for power5
51097       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51098     elif test "x$OPENJDK_BUILD_OS" = xaix; then
51099       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51100     fi
51101   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51102     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51103       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51104       # Little endian machine uses ELFv2 ABI.
51105       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51106       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51107       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51108     fi
51109   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51110     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51111       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51112     fi
51113   fi
51114 
51115   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51116     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51117   fi
51118 
51119   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51120     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51121       # Solaris does not have _LP64=1 in the old build.
51122       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51123       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51124     fi
51125   fi
51126 
51127   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51128   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51129     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51130         -Wunused-value -Woverloaded-virtual"
51131 
51132     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51133 
51134 
51135 
51136 
51137 
51138 
51139 
51140 
51141 
51142 
51143 
51144 
51145 
51146 
51147 
51148 
51149 
51150 
51151 
51152 
51153 
51154 
51155 
51156 
51157 
51158 
51159 
51160 
51161 
51162 
51163 
51164 
51165 
51166 
51167 
51168 
51169 
51170 
51171 
51172 
51173 
51174 
51175 
51176 
51177 
51178 
51179 
51180 
51181 
51182 
51183 
51184 
51185 
51186 
51187     # Execute function body
51188 
51189   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51190   REFERENCE_VERSION=4.8
51191 
51192   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51193     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51194   fi
51195 
51196   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51197     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51198   fi
51199 
51200   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51201   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51202 
51203   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51204     :
51205 
51206             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51207             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51208 
51209 
51210   else
51211     :
51212 
51213   fi
51214 
51215 
51216 
51217 
51218 
51219 
51220 
51221 
51222 
51223 
51224 
51225 
51226 
51227 
51228     fi
51229     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51230       # Non-zero builds have stricter warnings
51231       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51232     else
51233       if test "x$TOOLCHAIN_TYPE" = xclang; then
51234         # Some versions of llvm do not like -Wundef
51235         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51236       fi
51237     fi
51238   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51239     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51240         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51241   fi
51242 
51243   # Additional macosx handling
51244   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51245     # Setting these parameters makes it an error to link to macosx APIs that are
51246     # newer than the given OS version and makes the linked binaries compatible
51247     # even if built on a newer version of the OS.
51248     # The expected format is X.Y.Z
51249     MACOSX_VERSION_MIN=10.7.0
51250 
51251 
51252     # The macro takes the version with no dots, ex: 1070
51253     # Let the flags variables get resolved in make for easier override on make
51254     # command line.
51255     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)"
51256     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51257   fi
51258 
51259   # Setup some hard coded includes
51260   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51261       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51262       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51263       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51264       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51265       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51266       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51267 
51268   # The shared libraries are compiled using the picflag.
51269   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51270       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51271   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51272       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51273 
51274   # Executable flags
51275   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51276   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51277 
51278 
51279 
51280 
51281 
51282 
51283   # Setup LDFLAGS et al.
51284   #
51285 
51286   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51287     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51288     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51289     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51290     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51291       LDFLAGS_SAFESH="-safeseh"
51292       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51293       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51294       # NOTE: Old build added -machine. Probably not needed.
51295       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51296     else
51297       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51298     fi
51299   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51300       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51301       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51302         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51303         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51304     fi
51305   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51306     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51307     # We have previously set HAS_GNU_HASH if this is the case
51308     if test -n "$HAS_GNU_HASH"; then
51309       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51310       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51311       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51312     fi
51313       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51314         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51315     fi
51316     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51317       # And since we now know that the linker is gnu, then add -z defs, to forbid
51318       # undefined symbols in object files.
51319       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51320       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51321       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51322       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51323       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51324       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51325         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51326       fi
51327       case $DEBUG_LEVEL in
51328         release )
51329           # tell linker to optimize libraries.
51330           # Should this be supplied to the OSS linker as well?
51331           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51332           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51333           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51334           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51335             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51336           fi
51337           ;;
51338         slowdebug )
51339           # Hotspot always let the linker optimize
51340           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51341           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51342             # do relocations at load
51343             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51344             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51345             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51346           fi
51347           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51348             # mark relocations read only
51349             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51350             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51351             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51352           fi
51353           ;;
51354         fastdebug )
51355           # Hotspot always let the linker optimize
51356           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51357           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51358             # mark relocations read only
51359             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51360             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51361             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51362           fi
51363           ;;
51364         * )
51365           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51366           ;;
51367         esac
51368     fi
51369   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51370     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51371     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51372     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51373     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51374     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51375     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51376       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51377     fi
51378   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51379     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51380     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51381     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51382   fi
51383 
51384   # Customize LDFLAGS for executables
51385 
51386   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51387 
51388   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51389     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51390       LDFLAGS_STACK_SIZE=1048576
51391     else
51392       LDFLAGS_STACK_SIZE=327680
51393     fi
51394     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51395   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51396     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51397   fi
51398 
51399   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51400 
51401   # Customize LDFLAGS for libs
51402   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51403 
51404   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51405   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51406     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51407         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51408     OPENJDK_BUILD_JDKLIB_LIBS=""
51409   else
51410     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51411         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51412 
51413     if test "xBUILD" = "xTARGET"; then
51414       # On some platforms (mac) the linker warns about non existing -L dirs.
51415       # For any of the variants server, client or minimal, the dir matches the
51416       # variant name. The "main" variant should be used for linking. For the
51417       # rest, the dir is just server.
51418       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51419           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51420         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51421             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
51422       else
51423         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51424             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51425       fi
51426     elif test "xBUILD" = "xBUILD"; then
51427       # When building a buildjdk, it's always only the server variant
51428       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51429           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51430     fi
51431 
51432     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51433     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51434       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51435     fi
51436 
51437   fi
51438 
51439 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51440 
51441   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51442   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51443     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51444   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51445     # FIXME: This hard-coded path is not really proper.
51446     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51447       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51448     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51449       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51450     fi
51451     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51452         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51453   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51454     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51455   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51456     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51457   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51458     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51459   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51460     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51461         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51462         wsock32.lib winmm.lib version.lib psapi.lib"
51463     fi
51464 
51465   # Set OPENJDK_BUILD_JVM_ASFLAGS
51466   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51467     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51468       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51469     fi
51470   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51471     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51472   fi
51473 
51474   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484 
51485 
51486 
51487 
51488 
51489 
51490   # Tests are only ever compiled for TARGET
51491   # Flags for compiling test libraries
51492   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51493   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51494 
51495   # Flags for compiling test executables
51496   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51497   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51498 
51499 
51500 
51501 
51502 
51503 
51504   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51505   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51506 
51507 
51508 
51509 
51510 
51511 
51512   # Some Zero and Shark settings.
51513   # ZERO_ARCHFLAG tells the compiler which mode to build for
51514   case "${OPENJDK_TARGET_CPU}" in
51515     s390)
51516       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51517       ;;
51518     *)
51519       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51520   esac
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 
51552 
51553 
51554 
51555 
51556 
51557 
51558 
51559 
51560 
51561 
51562 
51563     # Execute function body
51564 
51565 
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575 
51576 
51577 
51578 
51579 
51580 
51581 
51582 
51583 
51584 
51585 
51586 
51587 
51588 
51589 
51590 
51591 
51592 
51593 
51594 
51595 
51596 
51597 
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606 
51607 
51608 
51609 
51610 
51611 
51612     # Execute function body
51613 
51614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51615 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51616   supports=yes
51617 
51618   saved_cflags="$CFLAGS"
51619   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51620   ac_ext=c
51621 ac_cpp='$CPP $CPPFLAGS'
51622 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51623 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51624 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51625 
51626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51627 /* end confdefs.h.  */
51628 int i;
51629 _ACEOF
51630 if ac_fn_c_try_compile "$LINENO"; then :
51631 
51632 else
51633   supports=no
51634 fi
51635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51636   ac_ext=cpp
51637 ac_cpp='$CXXCPP $CPPFLAGS'
51638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51641 
51642   CFLAGS="$saved_cflags"
51643 
51644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51645 $as_echo "$supports" >&6; }
51646   if test "x$supports" = "xyes" ; then
51647     :
51648     C_COMP_SUPPORTS="yes"
51649   else
51650     :
51651     C_COMP_SUPPORTS="no"
51652   fi
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667 
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677 
51678 
51679 
51680 
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691 
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712     # Execute function body
51713 
51714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51715 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51716   supports=yes
51717 
51718   saved_cxxflags="$CXXFLAGS"
51719   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51720   ac_ext=cpp
51721 ac_cpp='$CXXCPP $CPPFLAGS'
51722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51725 
51726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51727 /* end confdefs.h.  */
51728 int i;
51729 _ACEOF
51730 if ac_fn_cxx_try_compile "$LINENO"; then :
51731 
51732 else
51733   supports=no
51734 fi
51735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51736   ac_ext=cpp
51737 ac_cpp='$CXXCPP $CPPFLAGS'
51738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51741 
51742   CXXFLAGS="$saved_cxxflags"
51743 
51744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51745 $as_echo "$supports" >&6; }
51746   if test "x$supports" = "xyes" ; then
51747     :
51748     CXX_COMP_SUPPORTS="yes"
51749   else
51750     :
51751     CXX_COMP_SUPPORTS="no"
51752   fi
51753 
51754 
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51767 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51768   supports=no
51769   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51770 
51771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51772 $as_echo "$supports" >&6; }
51773   if test "x$supports" = "xyes" ; then
51774     :
51775 
51776   else
51777     :
51778     ZERO_ARCHFLAG=""
51779   fi
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788   # Check that the compiler supports -mX (or -qX on AIX) flags
51789   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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 
51826 
51827 
51828 
51829 
51830 
51831 
51832 
51833 
51834 
51835 
51836 
51837     # Execute function body
51838 
51839 
51840 
51841 
51842 
51843 
51844 
51845 
51846 
51847 
51848 
51849 
51850 
51851 
51852 
51853 
51854 
51855 
51856 
51857 
51858 
51859 
51860 
51861 
51862 
51863 
51864 
51865 
51866 
51867 
51868 
51869 
51870 
51871 
51872 
51873 
51874 
51875 
51876 
51877 
51878 
51879 
51880 
51881 
51882 
51883 
51884 
51885 
51886     # Execute function body
51887 
51888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51889 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51890   supports=yes
51891 
51892   saved_cflags="$CFLAGS"
51893   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51894   ac_ext=c
51895 ac_cpp='$CPP $CPPFLAGS'
51896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51899 
51900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51901 /* end confdefs.h.  */
51902 int i;
51903 _ACEOF
51904 if ac_fn_c_try_compile "$LINENO"; then :
51905 
51906 else
51907   supports=no
51908 fi
51909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51910   ac_ext=cpp
51911 ac_cpp='$CXXCPP $CPPFLAGS'
51912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51915 
51916   CFLAGS="$saved_cflags"
51917 
51918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51919 $as_echo "$supports" >&6; }
51920   if test "x$supports" = "xyes" ; then
51921     :
51922     C_COMP_SUPPORTS="yes"
51923   else
51924     :
51925     C_COMP_SUPPORTS="no"
51926   fi
51927 
51928 
51929 
51930 
51931 
51932 
51933 
51934 
51935 
51936 
51937 
51938 
51939 
51940 
51941 
51942 
51943 
51944 
51945 
51946 
51947 
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986     # Execute function body
51987 
51988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51989 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51990   supports=yes
51991 
51992   saved_cxxflags="$CXXFLAGS"
51993   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51994   ac_ext=cpp
51995 ac_cpp='$CXXCPP $CPPFLAGS'
51996 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51997 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51998 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51999 
52000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52001 /* end confdefs.h.  */
52002 int i;
52003 _ACEOF
52004 if ac_fn_cxx_try_compile "$LINENO"; then :
52005 
52006 else
52007   supports=no
52008 fi
52009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52010   ac_ext=cpp
52011 ac_cpp='$CXXCPP $CPPFLAGS'
52012 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52013 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52014 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52015 
52016   CXXFLAGS="$saved_cxxflags"
52017 
52018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52019 $as_echo "$supports" >&6; }
52020   if test "x$supports" = "xyes" ; then
52021     :
52022     CXX_COMP_SUPPORTS="yes"
52023   else
52024     :
52025     CXX_COMP_SUPPORTS="no"
52026   fi
52027 
52028 
52029 
52030 
52031 
52032 
52033 
52034 
52035 
52036 
52037 
52038 
52039 
52040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52041 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52042   supports=no
52043   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52044 
52045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52046 $as_echo "$supports" >&6; }
52047   if test "x$supports" = "xyes" ; then
52048     :
52049     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52050   else
52051     :
52052     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52053   fi
52054 
52055 
52056 
52057 
52058 
52059 
52060 
52061 
52062   # Check whether --enable-warnings-as-errors was given.
52063 if test "${enable_warnings_as_errors+set}" = set; then :
52064   enableval=$enable_warnings_as_errors;
52065 fi
52066 
52067 
52068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52069 $as_echo_n "checking if native warnings are errors... " >&6; }
52070   if test "x$enable_warnings_as_errors" = "xyes"; then
52071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52072 $as_echo "yes (explicitely set)" >&6; }
52073     WARNINGS_AS_ERRORS=true
52074   elif test "x$enable_warnings_as_errors" = "xno"; then
52075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52076 $as_echo "no" >&6; }
52077     WARNINGS_AS_ERRORS=false
52078   elif test "x$enable_warnings_as_errors" = "x"; then
52079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52080 $as_echo "yes (default)" >&6; }
52081     WARNINGS_AS_ERRORS=true
52082   else
52083     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52084   fi
52085 
52086   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52087     # Set legacy hotspot variable
52088     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52089   else
52090     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52091   fi
52092 
52093 
52094 
52095 
52096   case "${TOOLCHAIN_TYPE}" in
52097     microsoft)
52098       DISABLE_WARNING_PREFIX="-wd"
52099       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52100       ;;
52101     solstudio)
52102       DISABLE_WARNING_PREFIX="-erroff="
52103       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52104       ;;
52105     gcc)
52106       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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 
52143 
52144 
52145 
52146 
52147 
52148 
52149 
52150 
52151 
52152 
52153 
52154     # Execute function body
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174 
52175 
52176 
52177 
52178 
52179 
52180 
52181 
52182 
52183 
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191 
52192 
52193 
52194 
52195 
52196 
52197 
52198 
52199 
52200 
52201 
52202 
52203     # Execute function body
52204 
52205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52206 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52207   supports=yes
52208 
52209   saved_cflags="$CFLAGS"
52210   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52211   ac_ext=c
52212 ac_cpp='$CPP $CPPFLAGS'
52213 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52214 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52215 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52216 
52217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52218 /* end confdefs.h.  */
52219 int i;
52220 _ACEOF
52221 if ac_fn_c_try_compile "$LINENO"; then :
52222 
52223 else
52224   supports=no
52225 fi
52226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52227   ac_ext=cpp
52228 ac_cpp='$CXXCPP $CPPFLAGS'
52229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52232 
52233   CFLAGS="$saved_cflags"
52234 
52235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52236 $as_echo "$supports" >&6; }
52237   if test "x$supports" = "xyes" ; then
52238     :
52239     C_COMP_SUPPORTS="yes"
52240   else
52241     :
52242     C_COMP_SUPPORTS="no"
52243   fi
52244 
52245 
52246 
52247 
52248 
52249 
52250 
52251 
52252 
52253 
52254 
52255 
52256 
52257 
52258 
52259 
52260 
52261 
52262 
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280 
52281 
52282 
52283 
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296 
52297 
52298 
52299 
52300 
52301 
52302 
52303     # Execute function body
52304 
52305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52306 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52307   supports=yes
52308 
52309   saved_cxxflags="$CXXFLAGS"
52310   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52311   ac_ext=cpp
52312 ac_cpp='$CXXCPP $CPPFLAGS'
52313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52314 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52316 
52317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52318 /* end confdefs.h.  */
52319 int i;
52320 _ACEOF
52321 if ac_fn_cxx_try_compile "$LINENO"; then :
52322 
52323 else
52324   supports=no
52325 fi
52326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52327   ac_ext=cpp
52328 ac_cpp='$CXXCPP $CPPFLAGS'
52329 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52330 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52331 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52332 
52333   CXXFLAGS="$saved_cxxflags"
52334 
52335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52336 $as_echo "$supports" >&6; }
52337   if test "x$supports" = "xyes" ; then
52338     :
52339     CXX_COMP_SUPPORTS="yes"
52340   else
52341     :
52342     CXX_COMP_SUPPORTS="no"
52343   fi
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351 
52352 
52353 
52354 
52355 
52356 
52357   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52358 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52359   supports=no
52360   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52361 
52362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52363 $as_echo "$supports" >&6; }
52364   if test "x$supports" = "xyes" ; then
52365     :
52366     GCC_CAN_DISABLE_WARNINGS=true
52367   else
52368     :
52369     GCC_CAN_DISABLE_WARNINGS=false
52370 
52371   fi
52372 
52373 
52374 
52375 
52376 
52377 
52378       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52379         DISABLE_WARNING_PREFIX="-Wno-"
52380       else
52381         DISABLE_WARNING_PREFIX=
52382       fi
52383       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52384       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52385       # CFLAGS since any target specific flags will likely not work with the
52386       # build compiler
52387       CC_OLD="$CC"
52388       CXX_OLD="$CXX"
52389       CC="$BUILD_CC"
52390       CXX="$BUILD_CXX"
52391       CFLAGS_OLD="$CFLAGS"
52392       CFLAGS=""
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 
52429 
52430 
52431 
52432 
52433 
52434 
52435 
52436 
52437 
52438 
52439 
52440     # Execute function body
52441 
52442 
52443 
52444 
52445 
52446 
52447 
52448 
52449 
52450 
52451 
52452 
52453 
52454 
52455 
52456 
52457 
52458 
52459 
52460 
52461 
52462 
52463 
52464 
52465 
52466 
52467 
52468 
52469 
52470 
52471 
52472 
52473 
52474 
52475 
52476 
52477 
52478 
52479 
52480 
52481 
52482 
52483 
52484 
52485 
52486 
52487 
52488 
52489     # Execute function body
52490 
52491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52492 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52493   supports=yes
52494 
52495   saved_cflags="$CFLAGS"
52496   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52497   ac_ext=c
52498 ac_cpp='$CPP $CPPFLAGS'
52499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52502 
52503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52504 /* end confdefs.h.  */
52505 int i;
52506 _ACEOF
52507 if ac_fn_c_try_compile "$LINENO"; then :
52508 
52509 else
52510   supports=no
52511 fi
52512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52513   ac_ext=cpp
52514 ac_cpp='$CXXCPP $CPPFLAGS'
52515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52518 
52519   CFLAGS="$saved_cflags"
52520 
52521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52522 $as_echo "$supports" >&6; }
52523   if test "x$supports" = "xyes" ; then
52524     :
52525     C_COMP_SUPPORTS="yes"
52526   else
52527     :
52528     C_COMP_SUPPORTS="no"
52529   fi
52530 
52531 
52532 
52533 
52534 
52535 
52536 
52537 
52538 
52539 
52540 
52541 
52542 
52543 
52544 
52545 
52546 
52547 
52548 
52549 
52550 
52551 
52552 
52553 
52554 
52555 
52556 
52557 
52558 
52559 
52560 
52561 
52562 
52563 
52564 
52565 
52566 
52567 
52568 
52569 
52570 
52571 
52572 
52573 
52574 
52575 
52576 
52577 
52578 
52579 
52580 
52581 
52582 
52583 
52584 
52585 
52586 
52587 
52588 
52589     # Execute function body
52590 
52591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52592 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52593   supports=yes
52594 
52595   saved_cxxflags="$CXXFLAGS"
52596   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52597   ac_ext=cpp
52598 ac_cpp='$CXXCPP $CPPFLAGS'
52599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52602 
52603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52604 /* end confdefs.h.  */
52605 int i;
52606 _ACEOF
52607 if ac_fn_cxx_try_compile "$LINENO"; then :
52608 
52609 else
52610   supports=no
52611 fi
52612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52613   ac_ext=cpp
52614 ac_cpp='$CXXCPP $CPPFLAGS'
52615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52618 
52619   CXXFLAGS="$saved_cxxflags"
52620 
52621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52622 $as_echo "$supports" >&6; }
52623   if test "x$supports" = "xyes" ; then
52624     :
52625     CXX_COMP_SUPPORTS="yes"
52626   else
52627     :
52628     CXX_COMP_SUPPORTS="no"
52629   fi
52630 
52631 
52632 
52633 
52634 
52635 
52636 
52637 
52638 
52639 
52640 
52641 
52642 
52643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52644 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52645   supports=no
52646   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52647 
52648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52649 $as_echo "$supports" >&6; }
52650   if test "x$supports" = "xyes" ; then
52651     :
52652     BUILD_CC_CAN_DISABLE_WARNINGS=true
52653   else
52654     :
52655     BUILD_CC_CAN_DISABLE_WARNINGS=false
52656 
52657   fi
52658 
52659 
52660 
52661 
52662 
52663 
52664       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52665         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52666       else
52667         BUILD_CC_DISABLE_WARNING_PREFIX=
52668       fi
52669       CC="$CC_OLD"
52670       CXX="$CXX_OLD"
52671       CFLAGS="$CFLAGS_OLD"
52672       ;;
52673     clang)
52674       DISABLE_WARNING_PREFIX="-Wno-"
52675       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52676       ;;
52677     xlc)
52678       DISABLE_WARNING_PREFIX="-qsuppress="
52679       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52680       ;;
52681   esac
52682 
52683 
52684 
52685 
52686 
52687 # Setup debug symbols (need objcopy from the toolchain for that)
52688 
52689   #
52690   # NATIVE_DEBUG_SYMBOLS
52691   # This must be done after the toolchain is setup, since we're looking at objcopy.
52692   #
52693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52694 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52695 
52696 # Check whether --with-native-debug-symbols was given.
52697 if test "${with_native_debug_symbols+set}" = set; then :
52698   withval=$with_native_debug_symbols;
52699         if test "x$OPENJDK_TARGET_OS" = xaix; then
52700           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52701             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52702           fi
52703         fi
52704 
52705 else
52706 
52707         if test "x$OPENJDK_TARGET_OS" = xaix; then
52708           # AIX doesn't support 'zipped' so use 'internal' as default
52709           with_native_debug_symbols="internal"
52710         else
52711           if test "x$STATIC_BUILD" = xtrue; then
52712             with_native_debug_symbols="none"
52713           else
52714             with_native_debug_symbols="zipped"
52715           fi
52716         fi
52717 
52718 fi
52719 
52720   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52722 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52723 
52724   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52725 
52726     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52727       if test "x$OBJCOPY" = x; then
52728         # enabling of enable-debug-symbols and can't find objcopy
52729         # this is an error
52730         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52731       fi
52732     fi
52733 
52734     COMPILE_WITH_DEBUG_SYMBOLS=true
52735     COPY_DEBUG_SYMBOLS=true
52736     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52737 
52738     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52739     DEBUG_BINARIES=false
52740     STRIP_POLICY=min_strip
52741 
52742   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52743     COMPILE_WITH_DEBUG_SYMBOLS=false
52744     COPY_DEBUG_SYMBOLS=false
52745     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52746 
52747     DEBUG_BINARIES=false
52748     STRIP_POLICY=no_strip
52749   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52750     COMPILE_WITH_DEBUG_SYMBOLS=true
52751     COPY_DEBUG_SYMBOLS=false
52752     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52753 
52754     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52755     DEBUG_BINARIES=true
52756     STRIP_POLICY=no_strip
52757     STRIP=""
52758 
52759   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52760 
52761     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52762       if test "x$OBJCOPY" = x; then
52763         # enabling of enable-debug-symbols and can't find objcopy
52764         # this is an error
52765         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52766       fi
52767     fi
52768 
52769     COMPILE_WITH_DEBUG_SYMBOLS=true
52770     COPY_DEBUG_SYMBOLS=true
52771     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52772 
52773     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52774     DEBUG_BINARIES=false
52775     STRIP_POLICY=min_strip
52776   else
52777     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52778   fi
52779 
52780   # --enable-debug-symbols is deprecated.
52781   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52782 
52783   # Check whether --enable-debug-symbols was given.
52784 if test "${enable_debug_symbols+set}" = set; then :
52785   enableval=$enable_debug_symbols;
52786 fi
52787 
52788   if test "x$enable_debug_symbols" != x; then
52789     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52790 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52791 
52792     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52793       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52794 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52795     fi
52796 
52797   fi
52798 
52799 
52800   # --enable-zip-debug-info is deprecated.
52801   # Please use --with-native-debug-symbols=zipped .
52802 
52803   # Check whether --enable-zip-debug-info was given.
52804 if test "${enable_zip_debug_info+set}" = set; then :
52805   enableval=$enable_zip_debug_info;
52806 fi
52807 
52808   if test "x$enable_zip_debug_info" != x; then
52809     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52810 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52811 
52812     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52813       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52814 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52815     fi
52816 
52817   fi
52818 
52819 
52820 
52821 
52822 
52823 
52824   # Legacy values
52825 
52826 
52827 
52828 
52829   # Check whether --enable-native-coverage was given.
52830 if test "${enable_native_coverage+set}" = set; then :
52831   enableval=$enable_native_coverage;
52832 fi
52833 
52834   GCOV_ENABLED="false"
52835   if test "x$enable_native_coverage" = "xyes"; then
52836     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52837       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52838 $as_echo_n "checking if native coverage is enabled... " >&6; }
52839       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52840 $as_echo "yes" >&6; }
52841       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52842       GCOV_LDFLAGS="-fprofile-arcs"
52843       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52844       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52845       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52846       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52847       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52848       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52849       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52850       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52851       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52852       GCOV_ENABLED="true"
52853     else
52854       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52855     fi
52856   elif test "x$enable_native_coverage" = "xno"; then
52857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52858 $as_echo_n "checking if native coverage is enabled... " >&6; }
52859     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52860 $as_echo "no" >&6; }
52861   elif test "x$enable_native_coverage" != "x"; then
52862     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52863   fi
52864 
52865 
52866 
52867 
52868 # Need toolchain to setup dtrace
52869 
52870   # Test for dtrace dependencies
52871   # Check whether --enable-dtrace was given.
52872 if test "${enable_dtrace+set}" = set; then :
52873   enableval=$enable_dtrace;
52874 fi
52875 
52876 
52877   DTRACE_DEP_MISSING=false
52878 
52879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52880 $as_echo_n "checking for dtrace tool... " >&6; }
52881   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52883 $as_echo "$DTRACE" >&6; }
52884   else
52885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52886 $as_echo "not found, cannot build dtrace" >&6; }
52887     DTRACE_DEP_MISSING=true
52888   fi
52889 
52890   for ac_header in sys/sdt.h
52891 do :
52892   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52893 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52894   cat >>confdefs.h <<_ACEOF
52895 #define HAVE_SYS_SDT_H 1
52896 _ACEOF
52897  DTRACE_HEADERS_OK=yes
52898 else
52899   DTRACE_HEADERS_OK=no
52900 fi
52901 
52902 done
52903 
52904   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52905     DTRACE_DEP_MISSING=true
52906   fi
52907 
52908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52909 $as_echo_n "checking if dtrace should be built... " >&6; }
52910   if test "x$enable_dtrace" = "xyes"; then
52911     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52912       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52913 $as_echo "no, missing dependencies" >&6; }
52914 
52915   # Print a helpful message on how to acquire the necessary build dependency.
52916   # dtrace is the help tag: freetype, cups, alsa etc
52917   MISSING_DEPENDENCY=dtrace
52918 
52919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52920     cygwin_help $MISSING_DEPENDENCY
52921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52922     msys_help $MISSING_DEPENDENCY
52923   else
52924     PKGHANDLER_COMMAND=
52925 
52926     case $PKGHANDLER in
52927       apt-get)
52928         apt_help     $MISSING_DEPENDENCY ;;
52929       yum)
52930         yum_help     $MISSING_DEPENDENCY ;;
52931       port)
52932         port_help    $MISSING_DEPENDENCY ;;
52933       pkgutil)
52934         pkgutil_help $MISSING_DEPENDENCY ;;
52935       pkgadd)
52936         pkgadd_help  $MISSING_DEPENDENCY ;;
52937     esac
52938 
52939     if test "x$PKGHANDLER_COMMAND" != x; then
52940       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52941     fi
52942   fi
52943 
52944       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52945     else
52946       INCLUDE_DTRACE=true
52947       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52948 $as_echo "yes, forced" >&6; }
52949     fi
52950   elif test "x$enable_dtrace" = "xno"; then
52951     INCLUDE_DTRACE=false
52952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52953 $as_echo "no, forced" >&6; }
52954   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52955     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52956       INCLUDE_DTRACE=false
52957       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52958 $as_echo "no, missing dependencies" >&6; }
52959     else
52960       INCLUDE_DTRACE=true
52961       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52962 $as_echo "yes, dependencies present" >&6; }
52963     fi
52964   else
52965     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52966   fi
52967 
52968 
52969 
52970   # The user can in some cases supply additional jvm features. For the custom
52971   # variant, this defines the entire variant.
52972 
52973 # Check whether --with-jvm-features was given.
52974 if test "${with_jvm_features+set}" = set; then :
52975   withval=$with_jvm_features;
52976 fi
52977 
52978   if test "x$with_jvm_features" != x; then
52979     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52980 $as_echo_n "checking additional JVM features... " >&6; }
52981     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52983 $as_echo "$JVM_FEATURES" >&6; }
52984   fi
52985 
52986   # Override hotspot cpu definitions for ARM platforms
52987   if test "x$OPENJDK_TARGET_CPU" = xarm; then
52988     HOTSPOT_TARGET_CPU=arm_32
52989     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
52990     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
52991     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
52992   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$with_cpu_port" = xarm64; then
52993     HOTSPOT_TARGET_CPU=arm_64
52994     HOTSPOT_TARGET_CPU_ARCH=arm
52995     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
52996     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
52997   fi
52998 
52999   # Verify that dependencies are met for explicitly set features.
53000   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53001     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53002   fi
53003 
53004   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53005     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53006   fi
53007 
53008   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
53009     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
53010   fi
53011 
53012   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53013     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53014   fi
53015 
53016   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53017     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53018   fi
53019 
53020   # Turn on additional features based on other parts of configure
53021   if test "x$INCLUDE_DTRACE" = "xtrue"; then
53022     JVM_FEATURES="$JVM_FEATURES dtrace"
53023   else
53024     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53025       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53026     fi
53027   fi
53028 
53029   if test "x$STATIC_BUILD" = "xtrue"; then
53030     JVM_FEATURES="$JVM_FEATURES static-build"
53031   else
53032     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53033       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53034     fi
53035   fi
53036 
53037   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53038     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53039       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53040     fi
53041   fi
53042 
53043   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53044     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53045       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53046     fi
53047   fi
53048 
53049   # Only enable jvmci on x86_64, sparcv9 and aarch64.
53050   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53051       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53052       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53053     JVM_FEATURES_jvmci="jvmci"
53054   else
53055     JVM_FEATURES_jvmci=""
53056   fi
53057 
53058   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
53059     # Default to use link time optimizations on minimal on arm
53060     JVM_FEATURES_link_time_opt="link-time-opt"
53061   else
53062     JVM_FEATURES_link_time_opt=""
53063   fi
53064 
53065   # All variants but minimal (and custom) get these features
53066   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53067 
53068   # Enable features depending on variant.
53069   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53070   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53071   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53072   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
53073   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53074   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53075   JVM_FEATURES_custom="$JVM_FEATURES"
53076 
53077 
53078 
53079 
53080 
53081 
53082 
53083 
53084 
53085   # Used for verification of Makefiles by check-jvm-feature
53086 
53087 
53088   # We don't support --with-jvm-interpreter anymore, use zero instead.
53089 
53090 
53091 # Check whether --with-jvm-interpreter was given.
53092 if test "${with_jvm_interpreter+set}" = set; then :
53093   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53094 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53095 fi
53096 
53097 
53098 
53099 
53100   # Check whether --enable-hotspot-gtest was given.
53101 if test "${enable_hotspot_gtest+set}" = set; then :
53102   enableval=$enable_hotspot_gtest;
53103 fi
53104 
53105 
53106   if test -e "$HOTSPOT_TOPDIR/test/native"; then
53107     GTEST_DIR_EXISTS="true"
53108   else
53109     GTEST_DIR_EXISTS="false"
53110   fi
53111 
53112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53113 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53114   if test "x$enable_hotspot_gtest" = "xyes"; then
53115     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53116       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53117 $as_echo "yes, forced" >&6; }
53118       BUILD_GTEST="true"
53119     else
53120       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53121     fi
53122   elif test "x$enable_hotspot_gtest" = "xno"; then
53123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53124 $as_echo "no, forced" >&6; }
53125     BUILD_GTEST="false"
53126   elif test "x$enable_hotspot_gtest" = "x"; then
53127     if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53128       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53129 $as_echo "yes" >&6; }
53130       BUILD_GTEST="true"
53131     else
53132       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53133 $as_echo "no" >&6; }
53134       BUILD_GTEST="false"
53135     fi
53136   else
53137     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53138   fi
53139 
53140 
53141 
53142 
53143 ###############################################################################
53144 #
53145 # Check dependencies for external and internal libraries.
53146 #
53147 ###############################################################################
53148 
53149 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53150 
53151   # When using cygwin or msys, we need a wrapper binary that renames
53152   # /cygdrive/c/ arguments into c:/ arguments and peeks into
53153   # @files and rewrites these too! This wrapper binary is
53154   # called fixpath.
53155   FIXPATH=
53156   if test "x$OPENJDK_BUILD_OS" = xwindows; then
53157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53158 $as_echo_n "checking if fixpath can be created... " >&6; }
53159     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53160     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53161     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53162     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53163       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53164       FIXPATH="$FIXPATH_BIN -c"
53165     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53166       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53167       # @ was chosen as separator to minimize risk of other tools messing around with it
53168       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53169           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53170       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53171       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53172     fi
53173     FIXPATH_SRC_W="$FIXPATH_SRC"
53174     FIXPATH_BIN_W="$FIXPATH_BIN"
53175 
53176   unix_path="$FIXPATH_SRC_W"
53177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53178     windows_path=`$CYGPATH -m "$unix_path"`
53179     FIXPATH_SRC_W="$windows_path"
53180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53181     windows_path=`cmd //c echo $unix_path`
53182     FIXPATH_SRC_W="$windows_path"
53183   fi
53184 
53185 
53186   unix_path="$FIXPATH_BIN_W"
53187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53188     windows_path=`$CYGPATH -m "$unix_path"`
53189     FIXPATH_BIN_W="$windows_path"
53190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53191     windows_path=`cmd //c echo $unix_path`
53192     FIXPATH_BIN_W="$windows_path"
53193   fi
53194 
53195     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53196     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53197     cd $FIXPATH_DIR
53198     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53199     cd $CURDIR
53200 
53201     if test ! -x $FIXPATH_BIN; then
53202       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53203 $as_echo "no" >&6; }
53204       cat $FIXPATH_DIR/fixpath1.log
53205       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53206     fi
53207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53208 $as_echo "yes" >&6; }
53209     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53210 $as_echo_n "checking if fixpath.exe works... " >&6; }
53211     cd $FIXPATH_DIR
53212     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53213         > $FIXPATH_DIR/fixpath2.log 2>&1
53214     cd $CURDIR
53215     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53216       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53217 $as_echo "no" >&6; }
53218       cat $FIXPATH_DIR/fixpath2.log
53219       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53220     fi
53221     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53222 $as_echo "yes" >&6; }
53223 
53224     FIXPATH_DETACH_FLAG="--detach"
53225   fi
53226 
53227 
53228 
53229 
53230 
53231 
53232   # Check if X11 is needed
53233   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53234     # No X11 support on windows or macosx
53235     NEEDS_LIB_X11=false
53236   else
53237     # All other instances need X11, even if building headless only, libawt still
53238     # needs X11 headers.
53239     NEEDS_LIB_X11=true
53240   fi
53241 
53242   # Check if cups is needed
53243   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53244     # Windows have a separate print system
53245     NEEDS_LIB_CUPS=false
53246   else
53247     NEEDS_LIB_CUPS=true
53248   fi
53249 
53250   # A custom hook may have set this already
53251   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53252     NEEDS_LIB_FREETYPE=true
53253   fi
53254 
53255   # Check if alsa is needed
53256   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53257     NEEDS_LIB_ALSA=true
53258   else
53259     NEEDS_LIB_ALSA=false
53260   fi
53261 
53262   # Check if ffi is needed
53263   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53264     NEEDS_LIB_FFI=true
53265   else
53266     NEEDS_LIB_FFI=false
53267   fi
53268 
53269 
53270   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53271   # dynamic build is configured on command line.
53272 
53273 # Check whether --with-stdc++lib was given.
53274 if test "${with_stdc__lib+set}" = set; then :
53275   withval=$with_stdc__lib;
53276         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53277                 && test "x$with_stdc__lib" != xdefault; then
53278           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53279         fi
53280 
53281 else
53282   with_stdc__lib=default
53283 
53284 fi
53285 
53286 
53287   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53288     # Test if stdc++ can be linked statically.
53289     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53290 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53291     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53292     ac_ext=cpp
53293 ac_cpp='$CXXCPP $CPPFLAGS'
53294 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53295 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53296 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53297 
53298     OLD_LIBS="$LIBS"
53299     LIBS="$STATIC_STDCXX_FLAGS"
53300     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53301 /* end confdefs.h.  */
53302 
53303 int
53304 main ()
53305 {
53306 return 0;
53307   ;
53308   return 0;
53309 }
53310 _ACEOF
53311 if ac_fn_cxx_try_link "$LINENO"; then :
53312   has_static_libstdcxx=yes
53313 else
53314   has_static_libstdcxx=no
53315 fi
53316 rm -f core conftest.err conftest.$ac_objext \
53317     conftest$ac_exeext conftest.$ac_ext
53318     LIBS="$OLD_LIBS"
53319     ac_ext=cpp
53320 ac_cpp='$CXXCPP $CPPFLAGS'
53321 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53322 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53323 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53324 
53325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53326 $as_echo "$has_static_libstdcxx" >&6; }
53327 
53328     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53329       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53330     fi
53331 
53332     # If dynamic was requested, it's available since it would fail above otherwise.
53333     # If dynamic wasn't requested, go with static unless it isn't available.
53334     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53335 $as_echo_n "checking how to link with libstdc++... " >&6; }
53336     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53337         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53339 $as_echo "dynamic" >&6; }
53340     else
53341       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53342       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53343       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53344       # just use the same setting as for the TARGET toolchain.
53345       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53346       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53347 $as_echo "static" >&6; }
53348     fi
53349   fi
53350 
53351   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53352   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53353     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53354   fi
53355 
53356 
53357 
53358   # Setup Windows runtime dlls
53359   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53360 
53361 
53362 # Check whether --with-msvcr-dll was given.
53363 if test "${with_msvcr_dll+set}" = set; then :
53364   withval=$with_msvcr_dll;
53365 fi
53366 
53367 
53368   if test "x$with_msvcr_dll" != x; then
53369     # If given explicitely by user, do not probe. If not present, fail directly.
53370 
53371   DLL_NAME="$MSVCR_NAME"
53372   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53373   METHOD="--with-msvcr-dll"
53374   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53375     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53376 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53377 
53378     # Need to check if the found msvcr is correct architecture
53379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53380 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53381     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53382     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53383       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53384       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53385       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53386         CORRECT_MSVCR_ARCH="PE32 executable"
53387       else
53388         CORRECT_MSVCR_ARCH="PE32+ executable"
53389       fi
53390     else
53391       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53392         CORRECT_MSVCR_ARCH=386
53393       else
53394         CORRECT_MSVCR_ARCH=x86-64
53395       fi
53396     fi
53397     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53398       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53399 $as_echo "ok" >&6; }
53400       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53401 
53402   # Only process if variable expands to non-empty
53403 
53404   if test "x$MSVC_DLL" != x; then
53405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53406 
53407   # Input might be given as Windows format, start by converting to
53408   # unix format.
53409   path="$MSVC_DLL"
53410   new_path=`$CYGPATH -u "$path"`
53411 
53412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53415   # "foo.exe" is OK but "foo" is an error.
53416   #
53417   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53418   # It is also a way to make sure we got the proper file name for the real test later on.
53419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53420   if test "x$test_shortpath" = x; then
53421     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53422 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53423     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53424   fi
53425 
53426   # Call helper function which possibly converts this using DOS-style short mode.
53427   # If so, the updated path is stored in $new_path.
53428 
53429   input_path="$new_path"
53430   # Check if we need to convert this using DOS-style short mode. If the path
53431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53432   # take no chances and rewrite it.
53433   # Note: m4 eats our [], so we need to use [ and ] instead.
53434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53435   if test "x$has_forbidden_chars" != x; then
53436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53440       # Going to short mode and back again did indeed matter. Since short mode is
53441       # case insensitive, let's make it lowercase to improve readability.
53442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53443       # Now convert it back to Unix-style (cygpath)
53444       input_path=`$CYGPATH -u "$shortmode_path"`
53445       new_path="$input_path"
53446     fi
53447   fi
53448 
53449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53450   if test "x$test_cygdrive_prefix" = x; then
53451     # As a simple fix, exclude /usr/bin since it's not a real path.
53452     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53454       # a path prefixed by /cygdrive for fixpath to work.
53455       new_path="$CYGWIN_ROOT_PATH$input_path"
53456     fi
53457   fi
53458 
53459 
53460   if test "x$path" != "x$new_path"; then
53461     MSVC_DLL="$new_path"
53462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53463 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53464   fi
53465 
53466     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53467 
53468   path="$MSVC_DLL"
53469   has_colon=`$ECHO $path | $GREP ^.:`
53470   new_path="$path"
53471   if test "x$has_colon" = x; then
53472     # Not in mixed or Windows style, start by that.
53473     new_path=`cmd //c echo $path`
53474   fi
53475 
53476 
53477   input_path="$new_path"
53478   # Check if we need to convert this using DOS-style short mode. If the path
53479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53480   # take no chances and rewrite it.
53481   # Note: m4 eats our [], so we need to use [ and ] instead.
53482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53483   if test "x$has_forbidden_chars" != x; then
53484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53485     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53486   fi
53487 
53488 
53489   windows_path="$new_path"
53490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53491     unix_path=`$CYGPATH -u "$windows_path"`
53492     new_path="$unix_path"
53493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53495     new_path="$unix_path"
53496   fi
53497 
53498   if test "x$path" != "x$new_path"; then
53499     MSVC_DLL="$new_path"
53500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53501 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53502   fi
53503 
53504   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53505   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53506 
53507     else
53508       # We're on a unix platform. Hooray! :)
53509       path="$MSVC_DLL"
53510       has_space=`$ECHO "$path" | $GREP " "`
53511       if test "x$has_space" != x; then
53512         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53513 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53514         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53515       fi
53516 
53517       # Use eval to expand a potential ~
53518       eval path="$path"
53519       if test ! -f "$path" && test ! -d "$path"; then
53520         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53521       fi
53522 
53523       if test -d "$path"; then
53524         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53525       else
53526         dir="`$DIRNAME "$path"`"
53527         base="`$BASENAME "$path"`"
53528         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53529       fi
53530     fi
53531   fi
53532 
53533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53534 $as_echo_n "checking for $DLL_NAME... " >&6; }
53535       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53536 $as_echo "$MSVC_DLL" >&6; }
53537     else
53538       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53539 $as_echo "incorrect, ignoring" >&6; }
53540       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53541 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53542     fi
53543   fi
53544 
53545     if test "x$MSVC_DLL" = x; then
53546       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53547     fi
53548     MSVCR_DLL="$MSVC_DLL"
53549   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53550 
53551   DLL_NAME="$MSVCR_NAME"
53552   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53553   METHOD="devkit"
53554   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53555     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53556 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53557 
53558     # Need to check if the found msvcr is correct architecture
53559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53560 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53561     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53563       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53564       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53565       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53566         CORRECT_MSVCR_ARCH="PE32 executable"
53567       else
53568         CORRECT_MSVCR_ARCH="PE32+ executable"
53569       fi
53570     else
53571       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53572         CORRECT_MSVCR_ARCH=386
53573       else
53574         CORRECT_MSVCR_ARCH=x86-64
53575       fi
53576     fi
53577     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53578       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53579 $as_echo "ok" >&6; }
53580       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53581 
53582   # Only process if variable expands to non-empty
53583 
53584   if test "x$MSVC_DLL" != x; then
53585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53586 
53587   # Input might be given as Windows format, start by converting to
53588   # unix format.
53589   path="$MSVC_DLL"
53590   new_path=`$CYGPATH -u "$path"`
53591 
53592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53595   # "foo.exe" is OK but "foo" is an error.
53596   #
53597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53598   # It is also a way to make sure we got the proper file name for the real test later on.
53599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53600   if test "x$test_shortpath" = x; then
53601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53602 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53603     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53604   fi
53605 
53606   # Call helper function which possibly converts this using DOS-style short mode.
53607   # If so, the updated path is stored in $new_path.
53608 
53609   input_path="$new_path"
53610   # Check if we need to convert this using DOS-style short mode. If the path
53611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53612   # take no chances and rewrite it.
53613   # Note: m4 eats our [], so we need to use [ and ] instead.
53614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53615   if test "x$has_forbidden_chars" != x; then
53616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53620       # Going to short mode and back again did indeed matter. Since short mode is
53621       # case insensitive, let's make it lowercase to improve readability.
53622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53623       # Now convert it back to Unix-style (cygpath)
53624       input_path=`$CYGPATH -u "$shortmode_path"`
53625       new_path="$input_path"
53626     fi
53627   fi
53628 
53629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53630   if test "x$test_cygdrive_prefix" = x; then
53631     # As a simple fix, exclude /usr/bin since it's not a real path.
53632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53634       # a path prefixed by /cygdrive for fixpath to work.
53635       new_path="$CYGWIN_ROOT_PATH$input_path"
53636     fi
53637   fi
53638 
53639 
53640   if test "x$path" != "x$new_path"; then
53641     MSVC_DLL="$new_path"
53642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53643 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53644   fi
53645 
53646     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53647 
53648   path="$MSVC_DLL"
53649   has_colon=`$ECHO $path | $GREP ^.:`
53650   new_path="$path"
53651   if test "x$has_colon" = x; then
53652     # Not in mixed or Windows style, start by that.
53653     new_path=`cmd //c echo $path`
53654   fi
53655 
53656 
53657   input_path="$new_path"
53658   # Check if we need to convert this using DOS-style short mode. If the path
53659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53660   # take no chances and rewrite it.
53661   # Note: m4 eats our [], so we need to use [ and ] instead.
53662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53663   if test "x$has_forbidden_chars" != x; then
53664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53666   fi
53667 
53668 
53669   windows_path="$new_path"
53670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53671     unix_path=`$CYGPATH -u "$windows_path"`
53672     new_path="$unix_path"
53673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53675     new_path="$unix_path"
53676   fi
53677 
53678   if test "x$path" != "x$new_path"; then
53679     MSVC_DLL="$new_path"
53680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53681 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53682   fi
53683 
53684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53686 
53687     else
53688       # We're on a unix platform. Hooray! :)
53689       path="$MSVC_DLL"
53690       has_space=`$ECHO "$path" | $GREP " "`
53691       if test "x$has_space" != x; then
53692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53693 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53694         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53695       fi
53696 
53697       # Use eval to expand a potential ~
53698       eval path="$path"
53699       if test ! -f "$path" && test ! -d "$path"; then
53700         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53701       fi
53702 
53703       if test -d "$path"; then
53704         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53705       else
53706         dir="`$DIRNAME "$path"`"
53707         base="`$BASENAME "$path"`"
53708         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53709       fi
53710     fi
53711   fi
53712 
53713       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53714 $as_echo_n "checking for $DLL_NAME... " >&6; }
53715       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53716 $as_echo "$MSVC_DLL" >&6; }
53717     else
53718       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53719 $as_echo "incorrect, ignoring" >&6; }
53720       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53721 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53722     fi
53723   fi
53724 
53725     if test "x$MSVC_DLL" = x; then
53726       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53727     fi
53728     MSVCR_DLL="$MSVC_DLL"
53729   else
53730 
53731   DLL_NAME="${MSVCR_NAME}"
53732   MSVC_DLL=
53733 
53734   if test "x$MSVC_DLL" = x; then
53735     # Probe: Using well-known location from Visual Studio 10.0
53736     if test "x$VCINSTALLDIR" != x; then
53737       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53738 
53739   windows_path="$CYGWIN_VC_INSTALL_DIR"
53740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53741     unix_path=`$CYGPATH -u "$windows_path"`
53742     CYGWIN_VC_INSTALL_DIR="$unix_path"
53743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53745     CYGWIN_VC_INSTALL_DIR="$unix_path"
53746   fi
53747 
53748       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53749         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53750       else
53751         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53752       fi
53753       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53754 
53755   DLL_NAME="$DLL_NAME"
53756   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53757   METHOD="well-known location in VCINSTALLDIR"
53758   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53759     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53760 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53761 
53762     # Need to check if the found msvcr is correct architecture
53763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53764 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53765     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53766     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53767       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53768       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53769       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53770         CORRECT_MSVCR_ARCH="PE32 executable"
53771       else
53772         CORRECT_MSVCR_ARCH="PE32+ executable"
53773       fi
53774     else
53775       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53776         CORRECT_MSVCR_ARCH=386
53777       else
53778         CORRECT_MSVCR_ARCH=x86-64
53779       fi
53780     fi
53781     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53782       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53783 $as_echo "ok" >&6; }
53784       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53785 
53786   # Only process if variable expands to non-empty
53787 
53788   if test "x$MSVC_DLL" != x; then
53789     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53790 
53791   # Input might be given as Windows format, start by converting to
53792   # unix format.
53793   path="$MSVC_DLL"
53794   new_path=`$CYGPATH -u "$path"`
53795 
53796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53799   # "foo.exe" is OK but "foo" is an error.
53800   #
53801   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53802   # It is also a way to make sure we got the proper file name for the real test later on.
53803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53804   if test "x$test_shortpath" = x; then
53805     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53806 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53807     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53808   fi
53809 
53810   # Call helper function which possibly converts this using DOS-style short mode.
53811   # If so, the updated path is stored in $new_path.
53812 
53813   input_path="$new_path"
53814   # Check if we need to convert this using DOS-style short mode. If the path
53815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53816   # take no chances and rewrite it.
53817   # Note: m4 eats our [], so we need to use [ and ] instead.
53818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53819   if test "x$has_forbidden_chars" != x; then
53820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53821     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53822     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53823     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53824       # Going to short mode and back again did indeed matter. Since short mode is
53825       # case insensitive, let's make it lowercase to improve readability.
53826       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53827       # Now convert it back to Unix-style (cygpath)
53828       input_path=`$CYGPATH -u "$shortmode_path"`
53829       new_path="$input_path"
53830     fi
53831   fi
53832 
53833   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53834   if test "x$test_cygdrive_prefix" = x; then
53835     # As a simple fix, exclude /usr/bin since it's not a real path.
53836     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53837       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53838       # a path prefixed by /cygdrive for fixpath to work.
53839       new_path="$CYGWIN_ROOT_PATH$input_path"
53840     fi
53841   fi
53842 
53843 
53844   if test "x$path" != "x$new_path"; then
53845     MSVC_DLL="$new_path"
53846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53847 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53848   fi
53849 
53850     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53851 
53852   path="$MSVC_DLL"
53853   has_colon=`$ECHO $path | $GREP ^.:`
53854   new_path="$path"
53855   if test "x$has_colon" = x; then
53856     # Not in mixed or Windows style, start by that.
53857     new_path=`cmd //c echo $path`
53858   fi
53859 
53860 
53861   input_path="$new_path"
53862   # Check if we need to convert this using DOS-style short mode. If the path
53863   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53864   # take no chances and rewrite it.
53865   # Note: m4 eats our [], so we need to use [ and ] instead.
53866   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53867   if test "x$has_forbidden_chars" != x; then
53868     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53869     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53870   fi
53871 
53872 
53873   windows_path="$new_path"
53874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53875     unix_path=`$CYGPATH -u "$windows_path"`
53876     new_path="$unix_path"
53877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53879     new_path="$unix_path"
53880   fi
53881 
53882   if test "x$path" != "x$new_path"; then
53883     MSVC_DLL="$new_path"
53884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53885 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53886   fi
53887 
53888   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53889   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53890 
53891     else
53892       # We're on a unix platform. Hooray! :)
53893       path="$MSVC_DLL"
53894       has_space=`$ECHO "$path" | $GREP " "`
53895       if test "x$has_space" != x; then
53896         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53897 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53898         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53899       fi
53900 
53901       # Use eval to expand a potential ~
53902       eval path="$path"
53903       if test ! -f "$path" && test ! -d "$path"; then
53904         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53905       fi
53906 
53907       if test -d "$path"; then
53908         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53909       else
53910         dir="`$DIRNAME "$path"`"
53911         base="`$BASENAME "$path"`"
53912         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53913       fi
53914     fi
53915   fi
53916 
53917       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53918 $as_echo_n "checking for $DLL_NAME... " >&6; }
53919       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53920 $as_echo "$MSVC_DLL" >&6; }
53921     else
53922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53923 $as_echo "incorrect, ignoring" >&6; }
53924       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53925 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53926     fi
53927   fi
53928 
53929     fi
53930   fi
53931 
53932   if test "x$MSVC_DLL" = x; then
53933     # Probe: Check in the Boot JDK directory.
53934     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53935 
53936   DLL_NAME="$DLL_NAME"
53937   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53938   METHOD="well-known location in Boot JDK"
53939   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53940     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53941 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53942 
53943     # Need to check if the found msvcr is correct architecture
53944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53945 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53946     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53947     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53948       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53949       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53950       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53951         CORRECT_MSVCR_ARCH="PE32 executable"
53952       else
53953         CORRECT_MSVCR_ARCH="PE32+ executable"
53954       fi
53955     else
53956       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53957         CORRECT_MSVCR_ARCH=386
53958       else
53959         CORRECT_MSVCR_ARCH=x86-64
53960       fi
53961     fi
53962     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53964 $as_echo "ok" >&6; }
53965       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53966 
53967   # Only process if variable expands to non-empty
53968 
53969   if test "x$MSVC_DLL" != x; then
53970     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53971 
53972   # Input might be given as Windows format, start by converting to
53973   # unix format.
53974   path="$MSVC_DLL"
53975   new_path=`$CYGPATH -u "$path"`
53976 
53977   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53978   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53979   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53980   # "foo.exe" is OK but "foo" is an error.
53981   #
53982   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53983   # It is also a way to make sure we got the proper file name for the real test later on.
53984   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53985   if test "x$test_shortpath" = x; then
53986     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53987 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53988     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53989   fi
53990 
53991   # Call helper function which possibly converts this using DOS-style short mode.
53992   # If so, the updated path is stored in $new_path.
53993 
53994   input_path="$new_path"
53995   # Check if we need to convert this using DOS-style short mode. If the path
53996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53997   # take no chances and rewrite it.
53998   # Note: m4 eats our [], so we need to use [ and ] instead.
53999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54000   if test "x$has_forbidden_chars" != x; then
54001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54002     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54003     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54004     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54005       # Going to short mode and back again did indeed matter. Since short mode is
54006       # case insensitive, let's make it lowercase to improve readability.
54007       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54008       # Now convert it back to Unix-style (cygpath)
54009       input_path=`$CYGPATH -u "$shortmode_path"`
54010       new_path="$input_path"
54011     fi
54012   fi
54013 
54014   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54015   if test "x$test_cygdrive_prefix" = x; then
54016     # As a simple fix, exclude /usr/bin since it's not a real path.
54017     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54018       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54019       # a path prefixed by /cygdrive for fixpath to work.
54020       new_path="$CYGWIN_ROOT_PATH$input_path"
54021     fi
54022   fi
54023 
54024 
54025   if test "x$path" != "x$new_path"; then
54026     MSVC_DLL="$new_path"
54027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54028 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54029   fi
54030 
54031     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54032 
54033   path="$MSVC_DLL"
54034   has_colon=`$ECHO $path | $GREP ^.:`
54035   new_path="$path"
54036   if test "x$has_colon" = x; then
54037     # Not in mixed or Windows style, start by that.
54038     new_path=`cmd //c echo $path`
54039   fi
54040 
54041 
54042   input_path="$new_path"
54043   # Check if we need to convert this using DOS-style short mode. If the path
54044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54045   # take no chances and rewrite it.
54046   # Note: m4 eats our [], so we need to use [ and ] instead.
54047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54048   if test "x$has_forbidden_chars" != x; then
54049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54051   fi
54052 
54053 
54054   windows_path="$new_path"
54055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54056     unix_path=`$CYGPATH -u "$windows_path"`
54057     new_path="$unix_path"
54058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54060     new_path="$unix_path"
54061   fi
54062 
54063   if test "x$path" != "x$new_path"; then
54064     MSVC_DLL="$new_path"
54065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54066 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54067   fi
54068 
54069   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54070   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54071 
54072     else
54073       # We're on a unix platform. Hooray! :)
54074       path="$MSVC_DLL"
54075       has_space=`$ECHO "$path" | $GREP " "`
54076       if test "x$has_space" != x; then
54077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54078 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54079         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54080       fi
54081 
54082       # Use eval to expand a potential ~
54083       eval path="$path"
54084       if test ! -f "$path" && test ! -d "$path"; then
54085         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54086       fi
54087 
54088       if test -d "$path"; then
54089         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54090       else
54091         dir="`$DIRNAME "$path"`"
54092         base="`$BASENAME "$path"`"
54093         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54094       fi
54095     fi
54096   fi
54097 
54098       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54099 $as_echo_n "checking for $DLL_NAME... " >&6; }
54100       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54101 $as_echo "$MSVC_DLL" >&6; }
54102     else
54103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54104 $as_echo "incorrect, ignoring" >&6; }
54105       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54106 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54107     fi
54108   fi
54109 
54110   fi
54111 
54112   if test "x$MSVC_DLL" = x; then
54113     # Probe: Look in the Windows system32 directory
54114     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54115 
54116   windows_path="$CYGWIN_SYSTEMROOT"
54117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54118     unix_path=`$CYGPATH -u "$windows_path"`
54119     CYGWIN_SYSTEMROOT="$unix_path"
54120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54122     CYGWIN_SYSTEMROOT="$unix_path"
54123   fi
54124 
54125     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54126 
54127   DLL_NAME="$DLL_NAME"
54128   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54129   METHOD="well-known location in SYSTEMROOT"
54130   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54131     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54132 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54133 
54134     # Need to check if the found msvcr is correct architecture
54135     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54136 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54137     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54138     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54139       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54140       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54141       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54142         CORRECT_MSVCR_ARCH="PE32 executable"
54143       else
54144         CORRECT_MSVCR_ARCH="PE32+ executable"
54145       fi
54146     else
54147       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54148         CORRECT_MSVCR_ARCH=386
54149       else
54150         CORRECT_MSVCR_ARCH=x86-64
54151       fi
54152     fi
54153     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54155 $as_echo "ok" >&6; }
54156       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54157 
54158   # Only process if variable expands to non-empty
54159 
54160   if test "x$MSVC_DLL" != x; then
54161     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54162 
54163   # Input might be given as Windows format, start by converting to
54164   # unix format.
54165   path="$MSVC_DLL"
54166   new_path=`$CYGPATH -u "$path"`
54167 
54168   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54169   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54170   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54171   # "foo.exe" is OK but "foo" is an error.
54172   #
54173   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54174   # It is also a way to make sure we got the proper file name for the real test later on.
54175   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54176   if test "x$test_shortpath" = x; then
54177     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54178 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54179     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54180   fi
54181 
54182   # Call helper function which possibly converts this using DOS-style short mode.
54183   # If so, the updated path is stored in $new_path.
54184 
54185   input_path="$new_path"
54186   # Check if we need to convert this using DOS-style short mode. If the path
54187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54188   # take no chances and rewrite it.
54189   # Note: m4 eats our [], so we need to use [ and ] instead.
54190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54191   if test "x$has_forbidden_chars" != x; then
54192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54193     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54194     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54195     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54196       # Going to short mode and back again did indeed matter. Since short mode is
54197       # case insensitive, let's make it lowercase to improve readability.
54198       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54199       # Now convert it back to Unix-style (cygpath)
54200       input_path=`$CYGPATH -u "$shortmode_path"`
54201       new_path="$input_path"
54202     fi
54203   fi
54204 
54205   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54206   if test "x$test_cygdrive_prefix" = x; then
54207     # As a simple fix, exclude /usr/bin since it's not a real path.
54208     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54209       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54210       # a path prefixed by /cygdrive for fixpath to work.
54211       new_path="$CYGWIN_ROOT_PATH$input_path"
54212     fi
54213   fi
54214 
54215 
54216   if test "x$path" != "x$new_path"; then
54217     MSVC_DLL="$new_path"
54218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54219 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54220   fi
54221 
54222     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54223 
54224   path="$MSVC_DLL"
54225   has_colon=`$ECHO $path | $GREP ^.:`
54226   new_path="$path"
54227   if test "x$has_colon" = x; then
54228     # Not in mixed or Windows style, start by that.
54229     new_path=`cmd //c echo $path`
54230   fi
54231 
54232 
54233   input_path="$new_path"
54234   # Check if we need to convert this using DOS-style short mode. If the path
54235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54236   # take no chances and rewrite it.
54237   # Note: m4 eats our [], so we need to use [ and ] instead.
54238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54239   if test "x$has_forbidden_chars" != x; then
54240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54241     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54242   fi
54243 
54244 
54245   windows_path="$new_path"
54246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54247     unix_path=`$CYGPATH -u "$windows_path"`
54248     new_path="$unix_path"
54249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54251     new_path="$unix_path"
54252   fi
54253 
54254   if test "x$path" != "x$new_path"; then
54255     MSVC_DLL="$new_path"
54256     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54257 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54258   fi
54259 
54260   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54261   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54262 
54263     else
54264       # We're on a unix platform. Hooray! :)
54265       path="$MSVC_DLL"
54266       has_space=`$ECHO "$path" | $GREP " "`
54267       if test "x$has_space" != x; then
54268         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54269 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54270         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54271       fi
54272 
54273       # Use eval to expand a potential ~
54274       eval path="$path"
54275       if test ! -f "$path" && test ! -d "$path"; then
54276         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54277       fi
54278 
54279       if test -d "$path"; then
54280         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54281       else
54282         dir="`$DIRNAME "$path"`"
54283         base="`$BASENAME "$path"`"
54284         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54285       fi
54286     fi
54287   fi
54288 
54289       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54290 $as_echo_n "checking for $DLL_NAME... " >&6; }
54291       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54292 $as_echo "$MSVC_DLL" >&6; }
54293     else
54294       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54295 $as_echo "incorrect, ignoring" >&6; }
54296       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54297 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54298     fi
54299   fi
54300 
54301   fi
54302 
54303   if test "x$MSVC_DLL" = x; then
54304     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54305     if test "x$VS100COMNTOOLS" != x; then
54306       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54307 
54308   windows_path="$CYGWIN_VS_TOOLS_DIR"
54309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54310     unix_path=`$CYGPATH -u "$windows_path"`
54311     CYGWIN_VS_TOOLS_DIR="$unix_path"
54312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54314     CYGWIN_VS_TOOLS_DIR="$unix_path"
54315   fi
54316 
54317       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54318         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54319             | $GREP -i /x64/ | $HEAD --lines 1`
54320       else
54321         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54322             | $GREP -i /x86/ | $HEAD --lines 1`
54323       fi
54324 
54325   DLL_NAME="$DLL_NAME"
54326   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54327   METHOD="search of VS100COMNTOOLS"
54328   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54329     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54330 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54331 
54332     # Need to check if the found msvcr is correct architecture
54333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54334 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54335     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54336     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54337       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54338       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54339       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54340         CORRECT_MSVCR_ARCH="PE32 executable"
54341       else
54342         CORRECT_MSVCR_ARCH="PE32+ executable"
54343       fi
54344     else
54345       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54346         CORRECT_MSVCR_ARCH=386
54347       else
54348         CORRECT_MSVCR_ARCH=x86-64
54349       fi
54350     fi
54351     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54352       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54353 $as_echo "ok" >&6; }
54354       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54355 
54356   # Only process if variable expands to non-empty
54357 
54358   if test "x$MSVC_DLL" != x; then
54359     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54360 
54361   # Input might be given as Windows format, start by converting to
54362   # unix format.
54363   path="$MSVC_DLL"
54364   new_path=`$CYGPATH -u "$path"`
54365 
54366   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54367   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54368   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54369   # "foo.exe" is OK but "foo" is an error.
54370   #
54371   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54372   # It is also a way to make sure we got the proper file name for the real test later on.
54373   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54374   if test "x$test_shortpath" = x; then
54375     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54376 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54377     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54378   fi
54379 
54380   # Call helper function which possibly converts this using DOS-style short mode.
54381   # If so, the updated path is stored in $new_path.
54382 
54383   input_path="$new_path"
54384   # Check if we need to convert this using DOS-style short mode. If the path
54385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54386   # take no chances and rewrite it.
54387   # Note: m4 eats our [], so we need to use [ and ] instead.
54388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54389   if test "x$has_forbidden_chars" != x; then
54390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54391     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54392     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54393     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54394       # Going to short mode and back again did indeed matter. Since short mode is
54395       # case insensitive, let's make it lowercase to improve readability.
54396       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54397       # Now convert it back to Unix-style (cygpath)
54398       input_path=`$CYGPATH -u "$shortmode_path"`
54399       new_path="$input_path"
54400     fi
54401   fi
54402 
54403   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54404   if test "x$test_cygdrive_prefix" = x; then
54405     # As a simple fix, exclude /usr/bin since it's not a real path.
54406     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54407       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54408       # a path prefixed by /cygdrive for fixpath to work.
54409       new_path="$CYGWIN_ROOT_PATH$input_path"
54410     fi
54411   fi
54412 
54413 
54414   if test "x$path" != "x$new_path"; then
54415     MSVC_DLL="$new_path"
54416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54417 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54418   fi
54419 
54420     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54421 
54422   path="$MSVC_DLL"
54423   has_colon=`$ECHO $path | $GREP ^.:`
54424   new_path="$path"
54425   if test "x$has_colon" = x; then
54426     # Not in mixed or Windows style, start by that.
54427     new_path=`cmd //c echo $path`
54428   fi
54429 
54430 
54431   input_path="$new_path"
54432   # Check if we need to convert this using DOS-style short mode. If the path
54433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54434   # take no chances and rewrite it.
54435   # Note: m4 eats our [], so we need to use [ and ] instead.
54436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54437   if test "x$has_forbidden_chars" != x; then
54438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54439     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54440   fi
54441 
54442 
54443   windows_path="$new_path"
54444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54445     unix_path=`$CYGPATH -u "$windows_path"`
54446     new_path="$unix_path"
54447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54449     new_path="$unix_path"
54450   fi
54451 
54452   if test "x$path" != "x$new_path"; then
54453     MSVC_DLL="$new_path"
54454     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54455 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54456   fi
54457 
54458   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54459   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54460 
54461     else
54462       # We're on a unix platform. Hooray! :)
54463       path="$MSVC_DLL"
54464       has_space=`$ECHO "$path" | $GREP " "`
54465       if test "x$has_space" != x; then
54466         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54467 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54468         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54469       fi
54470 
54471       # Use eval to expand a potential ~
54472       eval path="$path"
54473       if test ! -f "$path" && test ! -d "$path"; then
54474         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54475       fi
54476 
54477       if test -d "$path"; then
54478         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54479       else
54480         dir="`$DIRNAME "$path"`"
54481         base="`$BASENAME "$path"`"
54482         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54483       fi
54484     fi
54485   fi
54486 
54487       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54488 $as_echo_n "checking for $DLL_NAME... " >&6; }
54489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54490 $as_echo "$MSVC_DLL" >&6; }
54491     else
54492       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54493 $as_echo "incorrect, ignoring" >&6; }
54494       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54495 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54496     fi
54497   fi
54498 
54499     fi
54500   fi
54501 
54502   if test "x$MSVC_DLL" = x; then
54503     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54504     # (This was the original behaviour; kept since it might turn something up)
54505     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54506       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54507         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54508             | $GREP x64 | $HEAD --lines 1`
54509       else
54510         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54511             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54512         if test "x$POSSIBLE_MSVC_DLL" = x; then
54513           # We're grasping at straws now...
54514           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54515               | $HEAD --lines 1`
54516         fi
54517       fi
54518 
54519 
54520   DLL_NAME="$DLL_NAME"
54521   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54522   METHOD="search of VCINSTALLDIR"
54523   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54524     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54525 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54526 
54527     # Need to check if the found msvcr is correct architecture
54528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54529 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54530     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54531     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54532       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54533       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54534       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54535         CORRECT_MSVCR_ARCH="PE32 executable"
54536       else
54537         CORRECT_MSVCR_ARCH="PE32+ executable"
54538       fi
54539     else
54540       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54541         CORRECT_MSVCR_ARCH=386
54542       else
54543         CORRECT_MSVCR_ARCH=x86-64
54544       fi
54545     fi
54546     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54547       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54548 $as_echo "ok" >&6; }
54549       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54550 
54551   # Only process if variable expands to non-empty
54552 
54553   if test "x$MSVC_DLL" != x; then
54554     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54555 
54556   # Input might be given as Windows format, start by converting to
54557   # unix format.
54558   path="$MSVC_DLL"
54559   new_path=`$CYGPATH -u "$path"`
54560 
54561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54564   # "foo.exe" is OK but "foo" is an error.
54565   #
54566   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54567   # It is also a way to make sure we got the proper file name for the real test later on.
54568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54569   if test "x$test_shortpath" = x; then
54570     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54571 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54572     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54573   fi
54574 
54575   # Call helper function which possibly converts this using DOS-style short mode.
54576   # If so, the updated path is stored in $new_path.
54577 
54578   input_path="$new_path"
54579   # Check if we need to convert this using DOS-style short mode. If the path
54580   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54581   # take no chances and rewrite it.
54582   # Note: m4 eats our [], so we need to use [ and ] instead.
54583   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54584   if test "x$has_forbidden_chars" != x; then
54585     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54586     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54587     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54588     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54589       # Going to short mode and back again did indeed matter. Since short mode is
54590       # case insensitive, let's make it lowercase to improve readability.
54591       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54592       # Now convert it back to Unix-style (cygpath)
54593       input_path=`$CYGPATH -u "$shortmode_path"`
54594       new_path="$input_path"
54595     fi
54596   fi
54597 
54598   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54599   if test "x$test_cygdrive_prefix" = x; then
54600     # As a simple fix, exclude /usr/bin since it's not a real path.
54601     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54602       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54603       # a path prefixed by /cygdrive for fixpath to work.
54604       new_path="$CYGWIN_ROOT_PATH$input_path"
54605     fi
54606   fi
54607 
54608 
54609   if test "x$path" != "x$new_path"; then
54610     MSVC_DLL="$new_path"
54611     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54612 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54613   fi
54614 
54615     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54616 
54617   path="$MSVC_DLL"
54618   has_colon=`$ECHO $path | $GREP ^.:`
54619   new_path="$path"
54620   if test "x$has_colon" = x; then
54621     # Not in mixed or Windows style, start by that.
54622     new_path=`cmd //c echo $path`
54623   fi
54624 
54625 
54626   input_path="$new_path"
54627   # Check if we need to convert this using DOS-style short mode. If the path
54628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54629   # take no chances and rewrite it.
54630   # Note: m4 eats our [], so we need to use [ and ] instead.
54631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54632   if test "x$has_forbidden_chars" != x; then
54633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54634     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54635   fi
54636 
54637 
54638   windows_path="$new_path"
54639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54640     unix_path=`$CYGPATH -u "$windows_path"`
54641     new_path="$unix_path"
54642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54644     new_path="$unix_path"
54645   fi
54646 
54647   if test "x$path" != "x$new_path"; then
54648     MSVC_DLL="$new_path"
54649     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54650 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54651   fi
54652 
54653   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54654   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54655 
54656     else
54657       # We're on a unix platform. Hooray! :)
54658       path="$MSVC_DLL"
54659       has_space=`$ECHO "$path" | $GREP " "`
54660       if test "x$has_space" != x; then
54661         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54662 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54663         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54664       fi
54665 
54666       # Use eval to expand a potential ~
54667       eval path="$path"
54668       if test ! -f "$path" && test ! -d "$path"; then
54669         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54670       fi
54671 
54672       if test -d "$path"; then
54673         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54674       else
54675         dir="`$DIRNAME "$path"`"
54676         base="`$BASENAME "$path"`"
54677         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54678       fi
54679     fi
54680   fi
54681 
54682       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54683 $as_echo_n "checking for $DLL_NAME... " >&6; }
54684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54685 $as_echo "$MSVC_DLL" >&6; }
54686     else
54687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54688 $as_echo "incorrect, ignoring" >&6; }
54689       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54690 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54691     fi
54692   fi
54693 
54694     fi
54695   fi
54696 
54697   if test "x$MSVC_DLL" = x; then
54698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54699 $as_echo_n "checking for $DLL_NAME... " >&6; }
54700     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54701 $as_echo "no" >&6; }
54702     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54703   fi
54704 
54705     MSVCR_DLL="$MSVC_DLL"
54706   fi
54707 
54708 
54709 
54710 # Check whether --with-msvcp-dll was given.
54711 if test "${with_msvcp_dll+set}" = set; then :
54712   withval=$with_msvcp_dll;
54713 fi
54714 
54715 
54716   if test "x$MSVCP_NAME" != "x"; then
54717     if test "x$with_msvcp_dll" != x; then
54718       # If given explicitely by user, do not probe. If not present, fail directly.
54719 
54720   DLL_NAME="$MSVCP_NAME"
54721   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54722   METHOD="--with-msvcp-dll"
54723   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54724     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54725 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54726 
54727     # Need to check if the found msvcr is correct architecture
54728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54729 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54730     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54732       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54733       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54734       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54735         CORRECT_MSVCR_ARCH="PE32 executable"
54736       else
54737         CORRECT_MSVCR_ARCH="PE32+ executable"
54738       fi
54739     else
54740       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54741         CORRECT_MSVCR_ARCH=386
54742       else
54743         CORRECT_MSVCR_ARCH=x86-64
54744       fi
54745     fi
54746     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54748 $as_echo "ok" >&6; }
54749       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54750 
54751   # Only process if variable expands to non-empty
54752 
54753   if test "x$MSVC_DLL" != x; then
54754     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54755 
54756   # Input might be given as Windows format, start by converting to
54757   # unix format.
54758   path="$MSVC_DLL"
54759   new_path=`$CYGPATH -u "$path"`
54760 
54761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54764   # "foo.exe" is OK but "foo" is an error.
54765   #
54766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54767   # It is also a way to make sure we got the proper file name for the real test later on.
54768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54769   if test "x$test_shortpath" = x; then
54770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54771 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54772     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54773   fi
54774 
54775   # Call helper function which possibly converts this using DOS-style short mode.
54776   # If so, the updated path is stored in $new_path.
54777 
54778   input_path="$new_path"
54779   # Check if we need to convert this using DOS-style short mode. If the path
54780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54781   # take no chances and rewrite it.
54782   # Note: m4 eats our [], so we need to use [ and ] instead.
54783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54784   if test "x$has_forbidden_chars" != x; then
54785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54789       # Going to short mode and back again did indeed matter. Since short mode is
54790       # case insensitive, let's make it lowercase to improve readability.
54791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54792       # Now convert it back to Unix-style (cygpath)
54793       input_path=`$CYGPATH -u "$shortmode_path"`
54794       new_path="$input_path"
54795     fi
54796   fi
54797 
54798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54799   if test "x$test_cygdrive_prefix" = x; then
54800     # As a simple fix, exclude /usr/bin since it's not a real path.
54801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54803       # a path prefixed by /cygdrive for fixpath to work.
54804       new_path="$CYGWIN_ROOT_PATH$input_path"
54805     fi
54806   fi
54807 
54808 
54809   if test "x$path" != "x$new_path"; then
54810     MSVC_DLL="$new_path"
54811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54812 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54813   fi
54814 
54815     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54816 
54817   path="$MSVC_DLL"
54818   has_colon=`$ECHO $path | $GREP ^.:`
54819   new_path="$path"
54820   if test "x$has_colon" = x; then
54821     # Not in mixed or Windows style, start by that.
54822     new_path=`cmd //c echo $path`
54823   fi
54824 
54825 
54826   input_path="$new_path"
54827   # Check if we need to convert this using DOS-style short mode. If the path
54828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54829   # take no chances and rewrite it.
54830   # Note: m4 eats our [], so we need to use [ and ] instead.
54831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54832   if test "x$has_forbidden_chars" != x; then
54833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54835   fi
54836 
54837 
54838   windows_path="$new_path"
54839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54840     unix_path=`$CYGPATH -u "$windows_path"`
54841     new_path="$unix_path"
54842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54844     new_path="$unix_path"
54845   fi
54846 
54847   if test "x$path" != "x$new_path"; then
54848     MSVC_DLL="$new_path"
54849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54850 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54851   fi
54852 
54853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54855 
54856     else
54857       # We're on a unix platform. Hooray! :)
54858       path="$MSVC_DLL"
54859       has_space=`$ECHO "$path" | $GREP " "`
54860       if test "x$has_space" != x; then
54861         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54862 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54863         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54864       fi
54865 
54866       # Use eval to expand a potential ~
54867       eval path="$path"
54868       if test ! -f "$path" && test ! -d "$path"; then
54869         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54870       fi
54871 
54872       if test -d "$path"; then
54873         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54874       else
54875         dir="`$DIRNAME "$path"`"
54876         base="`$BASENAME "$path"`"
54877         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54878       fi
54879     fi
54880   fi
54881 
54882       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54883 $as_echo_n "checking for $DLL_NAME... " >&6; }
54884       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54885 $as_echo "$MSVC_DLL" >&6; }
54886     else
54887       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54888 $as_echo "incorrect, ignoring" >&6; }
54889       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54890 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54891     fi
54892   fi
54893 
54894       if test "x$MSVC_DLL" = x; then
54895         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54896       fi
54897       MSVCP_DLL="$MSVC_DLL"
54898     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54899 
54900   DLL_NAME="$MSVCP_NAME"
54901   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54902   METHOD="devkit"
54903   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54904     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54905 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54906 
54907     # Need to check if the found msvcr is correct architecture
54908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54909 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54910     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54911     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54912       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54913       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54914       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54915         CORRECT_MSVCR_ARCH="PE32 executable"
54916       else
54917         CORRECT_MSVCR_ARCH="PE32+ executable"
54918       fi
54919     else
54920       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54921         CORRECT_MSVCR_ARCH=386
54922       else
54923         CORRECT_MSVCR_ARCH=x86-64
54924       fi
54925     fi
54926     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54928 $as_echo "ok" >&6; }
54929       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54930 
54931   # Only process if variable expands to non-empty
54932 
54933   if test "x$MSVC_DLL" != x; then
54934     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54935 
54936   # Input might be given as Windows format, start by converting to
54937   # unix format.
54938   path="$MSVC_DLL"
54939   new_path=`$CYGPATH -u "$path"`
54940 
54941   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54942   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54943   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54944   # "foo.exe" is OK but "foo" is an error.
54945   #
54946   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54947   # It is also a way to make sure we got the proper file name for the real test later on.
54948   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54949   if test "x$test_shortpath" = x; then
54950     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54951 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54952     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54953   fi
54954 
54955   # Call helper function which possibly converts this using DOS-style short mode.
54956   # If so, the updated path is stored in $new_path.
54957 
54958   input_path="$new_path"
54959   # Check if we need to convert this using DOS-style short mode. If the path
54960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54961   # take no chances and rewrite it.
54962   # Note: m4 eats our [], so we need to use [ and ] instead.
54963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54964   if test "x$has_forbidden_chars" != x; then
54965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54969       # Going to short mode and back again did indeed matter. Since short mode is
54970       # case insensitive, let's make it lowercase to improve readability.
54971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54972       # Now convert it back to Unix-style (cygpath)
54973       input_path=`$CYGPATH -u "$shortmode_path"`
54974       new_path="$input_path"
54975     fi
54976   fi
54977 
54978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54979   if test "x$test_cygdrive_prefix" = x; then
54980     # As a simple fix, exclude /usr/bin since it's not a real path.
54981     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54983       # a path prefixed by /cygdrive for fixpath to work.
54984       new_path="$CYGWIN_ROOT_PATH$input_path"
54985     fi
54986   fi
54987 
54988 
54989   if test "x$path" != "x$new_path"; then
54990     MSVC_DLL="$new_path"
54991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54992 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54993   fi
54994 
54995     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54996 
54997   path="$MSVC_DLL"
54998   has_colon=`$ECHO $path | $GREP ^.:`
54999   new_path="$path"
55000   if test "x$has_colon" = x; then
55001     # Not in mixed or Windows style, start by that.
55002     new_path=`cmd //c echo $path`
55003   fi
55004 
55005 
55006   input_path="$new_path"
55007   # Check if we need to convert this using DOS-style short mode. If the path
55008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55009   # take no chances and rewrite it.
55010   # Note: m4 eats our [], so we need to use [ and ] instead.
55011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55012   if test "x$has_forbidden_chars" != x; then
55013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55015   fi
55016 
55017 
55018   windows_path="$new_path"
55019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55020     unix_path=`$CYGPATH -u "$windows_path"`
55021     new_path="$unix_path"
55022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55024     new_path="$unix_path"
55025   fi
55026 
55027   if test "x$path" != "x$new_path"; then
55028     MSVC_DLL="$new_path"
55029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55030 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55031   fi
55032 
55033   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55034   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55035 
55036     else
55037       # We're on a unix platform. Hooray! :)
55038       path="$MSVC_DLL"
55039       has_space=`$ECHO "$path" | $GREP " "`
55040       if test "x$has_space" != x; then
55041         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55042 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55043         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55044       fi
55045 
55046       # Use eval to expand a potential ~
55047       eval path="$path"
55048       if test ! -f "$path" && test ! -d "$path"; then
55049         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55050       fi
55051 
55052       if test -d "$path"; then
55053         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55054       else
55055         dir="`$DIRNAME "$path"`"
55056         base="`$BASENAME "$path"`"
55057         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55058       fi
55059     fi
55060   fi
55061 
55062       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55063 $as_echo_n "checking for $DLL_NAME... " >&6; }
55064       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55065 $as_echo "$MSVC_DLL" >&6; }
55066     else
55067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55068 $as_echo "incorrect, ignoring" >&6; }
55069       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55070 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55071     fi
55072   fi
55073 
55074       if test "x$MSVC_DLL" = x; then
55075         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55076       fi
55077       MSVCP_DLL="$MSVC_DLL"
55078     else
55079 
55080   DLL_NAME="${MSVCP_NAME}"
55081   MSVC_DLL=
55082 
55083   if test "x$MSVC_DLL" = x; then
55084     # Probe: Using well-known location from Visual Studio 10.0
55085     if test "x$VCINSTALLDIR" != x; then
55086       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55087 
55088   windows_path="$CYGWIN_VC_INSTALL_DIR"
55089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55090     unix_path=`$CYGPATH -u "$windows_path"`
55091     CYGWIN_VC_INSTALL_DIR="$unix_path"
55092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55094     CYGWIN_VC_INSTALL_DIR="$unix_path"
55095   fi
55096 
55097       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55098         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55099       else
55100         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55101       fi
55102       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55103 
55104   DLL_NAME="$DLL_NAME"
55105   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55106   METHOD="well-known location in VCINSTALLDIR"
55107   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55108     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55109 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55110 
55111     # Need to check if the found msvcr is correct architecture
55112     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55113 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55114     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55116       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55117       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55118       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55119         CORRECT_MSVCR_ARCH="PE32 executable"
55120       else
55121         CORRECT_MSVCR_ARCH="PE32+ executable"
55122       fi
55123     else
55124       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55125         CORRECT_MSVCR_ARCH=386
55126       else
55127         CORRECT_MSVCR_ARCH=x86-64
55128       fi
55129     fi
55130     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55131       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55132 $as_echo "ok" >&6; }
55133       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55134 
55135   # Only process if variable expands to non-empty
55136 
55137   if test "x$MSVC_DLL" != x; then
55138     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55139 
55140   # Input might be given as Windows format, start by converting to
55141   # unix format.
55142   path="$MSVC_DLL"
55143   new_path=`$CYGPATH -u "$path"`
55144 
55145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55148   # "foo.exe" is OK but "foo" is an error.
55149   #
55150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55151   # It is also a way to make sure we got the proper file name for the real test later on.
55152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55153   if test "x$test_shortpath" = x; then
55154     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55155 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55156     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55157   fi
55158 
55159   # Call helper function which possibly converts this using DOS-style short mode.
55160   # If so, the updated path is stored in $new_path.
55161 
55162   input_path="$new_path"
55163   # Check if we need to convert this using DOS-style short mode. If the path
55164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55165   # take no chances and rewrite it.
55166   # Note: m4 eats our [], so we need to use [ and ] instead.
55167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55168   if test "x$has_forbidden_chars" != x; then
55169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55173       # Going to short mode and back again did indeed matter. Since short mode is
55174       # case insensitive, let's make it lowercase to improve readability.
55175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55176       # Now convert it back to Unix-style (cygpath)
55177       input_path=`$CYGPATH -u "$shortmode_path"`
55178       new_path="$input_path"
55179     fi
55180   fi
55181 
55182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55183   if test "x$test_cygdrive_prefix" = x; then
55184     # As a simple fix, exclude /usr/bin since it's not a real path.
55185     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55187       # a path prefixed by /cygdrive for fixpath to work.
55188       new_path="$CYGWIN_ROOT_PATH$input_path"
55189     fi
55190   fi
55191 
55192 
55193   if test "x$path" != "x$new_path"; then
55194     MSVC_DLL="$new_path"
55195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55196 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55197   fi
55198 
55199     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55200 
55201   path="$MSVC_DLL"
55202   has_colon=`$ECHO $path | $GREP ^.:`
55203   new_path="$path"
55204   if test "x$has_colon" = x; then
55205     # Not in mixed or Windows style, start by that.
55206     new_path=`cmd //c echo $path`
55207   fi
55208 
55209 
55210   input_path="$new_path"
55211   # Check if we need to convert this using DOS-style short mode. If the path
55212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55213   # take no chances and rewrite it.
55214   # Note: m4 eats our [], so we need to use [ and ] instead.
55215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55216   if test "x$has_forbidden_chars" != x; then
55217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55219   fi
55220 
55221 
55222   windows_path="$new_path"
55223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55224     unix_path=`$CYGPATH -u "$windows_path"`
55225     new_path="$unix_path"
55226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55228     new_path="$unix_path"
55229   fi
55230 
55231   if test "x$path" != "x$new_path"; then
55232     MSVC_DLL="$new_path"
55233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55234 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55235   fi
55236 
55237   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55238   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55239 
55240     else
55241       # We're on a unix platform. Hooray! :)
55242       path="$MSVC_DLL"
55243       has_space=`$ECHO "$path" | $GREP " "`
55244       if test "x$has_space" != x; then
55245         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55246 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55247         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55248       fi
55249 
55250       # Use eval to expand a potential ~
55251       eval path="$path"
55252       if test ! -f "$path" && test ! -d "$path"; then
55253         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55254       fi
55255 
55256       if test -d "$path"; then
55257         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55258       else
55259         dir="`$DIRNAME "$path"`"
55260         base="`$BASENAME "$path"`"
55261         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55262       fi
55263     fi
55264   fi
55265 
55266       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55267 $as_echo_n "checking for $DLL_NAME... " >&6; }
55268       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55269 $as_echo "$MSVC_DLL" >&6; }
55270     else
55271       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55272 $as_echo "incorrect, ignoring" >&6; }
55273       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55274 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55275     fi
55276   fi
55277 
55278     fi
55279   fi
55280 
55281   if test "x$MSVC_DLL" = x; then
55282     # Probe: Check in the Boot JDK directory.
55283     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55284 
55285   DLL_NAME="$DLL_NAME"
55286   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55287   METHOD="well-known location in Boot JDK"
55288   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55289     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55290 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55291 
55292     # Need to check if the found msvcr is correct architecture
55293     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55294 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55295     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55296     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55297       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55298       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55299       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55300         CORRECT_MSVCR_ARCH="PE32 executable"
55301       else
55302         CORRECT_MSVCR_ARCH="PE32+ executable"
55303       fi
55304     else
55305       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55306         CORRECT_MSVCR_ARCH=386
55307       else
55308         CORRECT_MSVCR_ARCH=x86-64
55309       fi
55310     fi
55311     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55312       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55313 $as_echo "ok" >&6; }
55314       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55315 
55316   # Only process if variable expands to non-empty
55317 
55318   if test "x$MSVC_DLL" != x; then
55319     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55320 
55321   # Input might be given as Windows format, start by converting to
55322   # unix format.
55323   path="$MSVC_DLL"
55324   new_path=`$CYGPATH -u "$path"`
55325 
55326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55329   # "foo.exe" is OK but "foo" is an error.
55330   #
55331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55332   # It is also a way to make sure we got the proper file name for the real test later on.
55333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55334   if test "x$test_shortpath" = x; then
55335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55336 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55337     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55338   fi
55339 
55340   # Call helper function which possibly converts this using DOS-style short mode.
55341   # If so, the updated path is stored in $new_path.
55342 
55343   input_path="$new_path"
55344   # Check if we need to convert this using DOS-style short mode. If the path
55345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55346   # take no chances and rewrite it.
55347   # Note: m4 eats our [], so we need to use [ and ] instead.
55348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55349   if test "x$has_forbidden_chars" != x; then
55350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55354       # Going to short mode and back again did indeed matter. Since short mode is
55355       # case insensitive, let's make it lowercase to improve readability.
55356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55357       # Now convert it back to Unix-style (cygpath)
55358       input_path=`$CYGPATH -u "$shortmode_path"`
55359       new_path="$input_path"
55360     fi
55361   fi
55362 
55363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55364   if test "x$test_cygdrive_prefix" = x; then
55365     # As a simple fix, exclude /usr/bin since it's not a real path.
55366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55368       # a path prefixed by /cygdrive for fixpath to work.
55369       new_path="$CYGWIN_ROOT_PATH$input_path"
55370     fi
55371   fi
55372 
55373 
55374   if test "x$path" != "x$new_path"; then
55375     MSVC_DLL="$new_path"
55376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55377 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55378   fi
55379 
55380     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55381 
55382   path="$MSVC_DLL"
55383   has_colon=`$ECHO $path | $GREP ^.:`
55384   new_path="$path"
55385   if test "x$has_colon" = x; then
55386     # Not in mixed or Windows style, start by that.
55387     new_path=`cmd //c echo $path`
55388   fi
55389 
55390 
55391   input_path="$new_path"
55392   # Check if we need to convert this using DOS-style short mode. If the path
55393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55394   # take no chances and rewrite it.
55395   # Note: m4 eats our [], so we need to use [ and ] instead.
55396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55397   if test "x$has_forbidden_chars" != x; then
55398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55400   fi
55401 
55402 
55403   windows_path="$new_path"
55404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55405     unix_path=`$CYGPATH -u "$windows_path"`
55406     new_path="$unix_path"
55407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55409     new_path="$unix_path"
55410   fi
55411 
55412   if test "x$path" != "x$new_path"; then
55413     MSVC_DLL="$new_path"
55414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55415 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55416   fi
55417 
55418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55420 
55421     else
55422       # We're on a unix platform. Hooray! :)
55423       path="$MSVC_DLL"
55424       has_space=`$ECHO "$path" | $GREP " "`
55425       if test "x$has_space" != x; then
55426         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55427 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55428         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55429       fi
55430 
55431       # Use eval to expand a potential ~
55432       eval path="$path"
55433       if test ! -f "$path" && test ! -d "$path"; then
55434         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55435       fi
55436 
55437       if test -d "$path"; then
55438         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55439       else
55440         dir="`$DIRNAME "$path"`"
55441         base="`$BASENAME "$path"`"
55442         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55443       fi
55444     fi
55445   fi
55446 
55447       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55448 $as_echo_n "checking for $DLL_NAME... " >&6; }
55449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55450 $as_echo "$MSVC_DLL" >&6; }
55451     else
55452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55453 $as_echo "incorrect, ignoring" >&6; }
55454       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55455 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55456     fi
55457   fi
55458 
55459   fi
55460 
55461   if test "x$MSVC_DLL" = x; then
55462     # Probe: Look in the Windows system32 directory
55463     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55464 
55465   windows_path="$CYGWIN_SYSTEMROOT"
55466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55467     unix_path=`$CYGPATH -u "$windows_path"`
55468     CYGWIN_SYSTEMROOT="$unix_path"
55469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55471     CYGWIN_SYSTEMROOT="$unix_path"
55472   fi
55473 
55474     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55475 
55476   DLL_NAME="$DLL_NAME"
55477   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55478   METHOD="well-known location in SYSTEMROOT"
55479   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55480     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55481 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55482 
55483     # Need to check if the found msvcr is correct architecture
55484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55485 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55486     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55487     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55488       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55489       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55490       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55491         CORRECT_MSVCR_ARCH="PE32 executable"
55492       else
55493         CORRECT_MSVCR_ARCH="PE32+ executable"
55494       fi
55495     else
55496       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55497         CORRECT_MSVCR_ARCH=386
55498       else
55499         CORRECT_MSVCR_ARCH=x86-64
55500       fi
55501     fi
55502     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55504 $as_echo "ok" >&6; }
55505       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55506 
55507   # Only process if variable expands to non-empty
55508 
55509   if test "x$MSVC_DLL" != x; then
55510     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55511 
55512   # Input might be given as Windows format, start by converting to
55513   # unix format.
55514   path="$MSVC_DLL"
55515   new_path=`$CYGPATH -u "$path"`
55516 
55517   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55518   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55519   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55520   # "foo.exe" is OK but "foo" is an error.
55521   #
55522   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55523   # It is also a way to make sure we got the proper file name for the real test later on.
55524   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55525   if test "x$test_shortpath" = x; then
55526     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55527 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55528     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55529   fi
55530 
55531   # Call helper function which possibly converts this using DOS-style short mode.
55532   # If so, the updated path is stored in $new_path.
55533 
55534   input_path="$new_path"
55535   # Check if we need to convert this using DOS-style short mode. If the path
55536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55537   # take no chances and rewrite it.
55538   # Note: m4 eats our [], so we need to use [ and ] instead.
55539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55540   if test "x$has_forbidden_chars" != x; then
55541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55545       # Going to short mode and back again did indeed matter. Since short mode is
55546       # case insensitive, let's make it lowercase to improve readability.
55547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55548       # Now convert it back to Unix-style (cygpath)
55549       input_path=`$CYGPATH -u "$shortmode_path"`
55550       new_path="$input_path"
55551     fi
55552   fi
55553 
55554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55555   if test "x$test_cygdrive_prefix" = x; then
55556     # As a simple fix, exclude /usr/bin since it's not a real path.
55557     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55559       # a path prefixed by /cygdrive for fixpath to work.
55560       new_path="$CYGWIN_ROOT_PATH$input_path"
55561     fi
55562   fi
55563 
55564 
55565   if test "x$path" != "x$new_path"; then
55566     MSVC_DLL="$new_path"
55567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55568 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55569   fi
55570 
55571     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55572 
55573   path="$MSVC_DLL"
55574   has_colon=`$ECHO $path | $GREP ^.:`
55575   new_path="$path"
55576   if test "x$has_colon" = x; then
55577     # Not in mixed or Windows style, start by that.
55578     new_path=`cmd //c echo $path`
55579   fi
55580 
55581 
55582   input_path="$new_path"
55583   # Check if we need to convert this using DOS-style short mode. If the path
55584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55585   # take no chances and rewrite it.
55586   # Note: m4 eats our [], so we need to use [ and ] instead.
55587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55588   if test "x$has_forbidden_chars" != x; then
55589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55590     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55591   fi
55592 
55593 
55594   windows_path="$new_path"
55595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55596     unix_path=`$CYGPATH -u "$windows_path"`
55597     new_path="$unix_path"
55598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55600     new_path="$unix_path"
55601   fi
55602 
55603   if test "x$path" != "x$new_path"; then
55604     MSVC_DLL="$new_path"
55605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55606 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55607   fi
55608 
55609   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55610   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55611 
55612     else
55613       # We're on a unix platform. Hooray! :)
55614       path="$MSVC_DLL"
55615       has_space=`$ECHO "$path" | $GREP " "`
55616       if test "x$has_space" != x; then
55617         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55618 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55619         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55620       fi
55621 
55622       # Use eval to expand a potential ~
55623       eval path="$path"
55624       if test ! -f "$path" && test ! -d "$path"; then
55625         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55626       fi
55627 
55628       if test -d "$path"; then
55629         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55630       else
55631         dir="`$DIRNAME "$path"`"
55632         base="`$BASENAME "$path"`"
55633         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55634       fi
55635     fi
55636   fi
55637 
55638       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55639 $as_echo_n "checking for $DLL_NAME... " >&6; }
55640       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55641 $as_echo "$MSVC_DLL" >&6; }
55642     else
55643       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55644 $as_echo "incorrect, ignoring" >&6; }
55645       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55646 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55647     fi
55648   fi
55649 
55650   fi
55651 
55652   if test "x$MSVC_DLL" = x; then
55653     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55654     if test "x$VS100COMNTOOLS" != x; then
55655       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55656 
55657   windows_path="$CYGWIN_VS_TOOLS_DIR"
55658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55659     unix_path=`$CYGPATH -u "$windows_path"`
55660     CYGWIN_VS_TOOLS_DIR="$unix_path"
55661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55663     CYGWIN_VS_TOOLS_DIR="$unix_path"
55664   fi
55665 
55666       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55667         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55668             | $GREP -i /x64/ | $HEAD --lines 1`
55669       else
55670         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55671             | $GREP -i /x86/ | $HEAD --lines 1`
55672       fi
55673 
55674   DLL_NAME="$DLL_NAME"
55675   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55676   METHOD="search of VS100COMNTOOLS"
55677   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55678     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55679 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55680 
55681     # Need to check if the found msvcr is correct architecture
55682     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55683 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55684     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55685     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55686       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55687       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55688       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55689         CORRECT_MSVCR_ARCH="PE32 executable"
55690       else
55691         CORRECT_MSVCR_ARCH="PE32+ executable"
55692       fi
55693     else
55694       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55695         CORRECT_MSVCR_ARCH=386
55696       else
55697         CORRECT_MSVCR_ARCH=x86-64
55698       fi
55699     fi
55700     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55701       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55702 $as_echo "ok" >&6; }
55703       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55704 
55705   # Only process if variable expands to non-empty
55706 
55707   if test "x$MSVC_DLL" != x; then
55708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55709 
55710   # Input might be given as Windows format, start by converting to
55711   # unix format.
55712   path="$MSVC_DLL"
55713   new_path=`$CYGPATH -u "$path"`
55714 
55715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55718   # "foo.exe" is OK but "foo" is an error.
55719   #
55720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55721   # It is also a way to make sure we got the proper file name for the real test later on.
55722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55723   if test "x$test_shortpath" = x; then
55724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55725 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55726     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55727   fi
55728 
55729   # Call helper function which possibly converts this using DOS-style short mode.
55730   # If so, the updated path is stored in $new_path.
55731 
55732   input_path="$new_path"
55733   # Check if we need to convert this using DOS-style short mode. If the path
55734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55735   # take no chances and rewrite it.
55736   # Note: m4 eats our [], so we need to use [ and ] instead.
55737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55738   if test "x$has_forbidden_chars" != x; then
55739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55743       # Going to short mode and back again did indeed matter. Since short mode is
55744       # case insensitive, let's make it lowercase to improve readability.
55745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55746       # Now convert it back to Unix-style (cygpath)
55747       input_path=`$CYGPATH -u "$shortmode_path"`
55748       new_path="$input_path"
55749     fi
55750   fi
55751 
55752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55753   if test "x$test_cygdrive_prefix" = x; then
55754     # As a simple fix, exclude /usr/bin since it's not a real path.
55755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55757       # a path prefixed by /cygdrive for fixpath to work.
55758       new_path="$CYGWIN_ROOT_PATH$input_path"
55759     fi
55760   fi
55761 
55762 
55763   if test "x$path" != "x$new_path"; then
55764     MSVC_DLL="$new_path"
55765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55766 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55767   fi
55768 
55769     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55770 
55771   path="$MSVC_DLL"
55772   has_colon=`$ECHO $path | $GREP ^.:`
55773   new_path="$path"
55774   if test "x$has_colon" = x; then
55775     # Not in mixed or Windows style, start by that.
55776     new_path=`cmd //c echo $path`
55777   fi
55778 
55779 
55780   input_path="$new_path"
55781   # Check if we need to convert this using DOS-style short mode. If the path
55782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55783   # take no chances and rewrite it.
55784   # Note: m4 eats our [], so we need to use [ and ] instead.
55785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55786   if test "x$has_forbidden_chars" != x; then
55787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55789   fi
55790 
55791 
55792   windows_path="$new_path"
55793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55794     unix_path=`$CYGPATH -u "$windows_path"`
55795     new_path="$unix_path"
55796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55798     new_path="$unix_path"
55799   fi
55800 
55801   if test "x$path" != "x$new_path"; then
55802     MSVC_DLL="$new_path"
55803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55804 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55805   fi
55806 
55807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55809 
55810     else
55811       # We're on a unix platform. Hooray! :)
55812       path="$MSVC_DLL"
55813       has_space=`$ECHO "$path" | $GREP " "`
55814       if test "x$has_space" != x; then
55815         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55816 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55817         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55818       fi
55819 
55820       # Use eval to expand a potential ~
55821       eval path="$path"
55822       if test ! -f "$path" && test ! -d "$path"; then
55823         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55824       fi
55825 
55826       if test -d "$path"; then
55827         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55828       else
55829         dir="`$DIRNAME "$path"`"
55830         base="`$BASENAME "$path"`"
55831         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55832       fi
55833     fi
55834   fi
55835 
55836       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55837 $as_echo_n "checking for $DLL_NAME... " >&6; }
55838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55839 $as_echo "$MSVC_DLL" >&6; }
55840     else
55841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55842 $as_echo "incorrect, ignoring" >&6; }
55843       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55844 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55845     fi
55846   fi
55847 
55848     fi
55849   fi
55850 
55851   if test "x$MSVC_DLL" = x; then
55852     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55853     # (This was the original behaviour; kept since it might turn something up)
55854     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55855       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55856         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55857             | $GREP x64 | $HEAD --lines 1`
55858       else
55859         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55860             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55861         if test "x$POSSIBLE_MSVC_DLL" = x; then
55862           # We're grasping at straws now...
55863           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55864               | $HEAD --lines 1`
55865         fi
55866       fi
55867 
55868 
55869   DLL_NAME="$DLL_NAME"
55870   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55871   METHOD="search of VCINSTALLDIR"
55872   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55873     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55874 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55875 
55876     # Need to check if the found msvcr is correct architecture
55877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55878 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55879     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55880     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55881       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55882       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55883       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55884         CORRECT_MSVCR_ARCH="PE32 executable"
55885       else
55886         CORRECT_MSVCR_ARCH="PE32+ executable"
55887       fi
55888     else
55889       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55890         CORRECT_MSVCR_ARCH=386
55891       else
55892         CORRECT_MSVCR_ARCH=x86-64
55893       fi
55894     fi
55895     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55896       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55897 $as_echo "ok" >&6; }
55898       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55899 
55900   # Only process if variable expands to non-empty
55901 
55902   if test "x$MSVC_DLL" != x; then
55903     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55904 
55905   # Input might be given as Windows format, start by converting to
55906   # unix format.
55907   path="$MSVC_DLL"
55908   new_path=`$CYGPATH -u "$path"`
55909 
55910   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55911   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55912   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55913   # "foo.exe" is OK but "foo" is an error.
55914   #
55915   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55916   # It is also a way to make sure we got the proper file name for the real test later on.
55917   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55918   if test "x$test_shortpath" = x; then
55919     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55920 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55921     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55922   fi
55923 
55924   # Call helper function which possibly converts this using DOS-style short mode.
55925   # If so, the updated path is stored in $new_path.
55926 
55927   input_path="$new_path"
55928   # Check if we need to convert this using DOS-style short mode. If the path
55929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55930   # take no chances and rewrite it.
55931   # Note: m4 eats our [], so we need to use [ and ] instead.
55932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55933   if test "x$has_forbidden_chars" != x; then
55934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55935     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55936     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55937     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55938       # Going to short mode and back again did indeed matter. Since short mode is
55939       # case insensitive, let's make it lowercase to improve readability.
55940       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55941       # Now convert it back to Unix-style (cygpath)
55942       input_path=`$CYGPATH -u "$shortmode_path"`
55943       new_path="$input_path"
55944     fi
55945   fi
55946 
55947   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55948   if test "x$test_cygdrive_prefix" = x; then
55949     # As a simple fix, exclude /usr/bin since it's not a real path.
55950     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55951       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55952       # a path prefixed by /cygdrive for fixpath to work.
55953       new_path="$CYGWIN_ROOT_PATH$input_path"
55954     fi
55955   fi
55956 
55957 
55958   if test "x$path" != "x$new_path"; then
55959     MSVC_DLL="$new_path"
55960     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55961 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55962   fi
55963 
55964     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55965 
55966   path="$MSVC_DLL"
55967   has_colon=`$ECHO $path | $GREP ^.:`
55968   new_path="$path"
55969   if test "x$has_colon" = x; then
55970     # Not in mixed or Windows style, start by that.
55971     new_path=`cmd //c echo $path`
55972   fi
55973 
55974 
55975   input_path="$new_path"
55976   # Check if we need to convert this using DOS-style short mode. If the path
55977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55978   # take no chances and rewrite it.
55979   # Note: m4 eats our [], so we need to use [ and ] instead.
55980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55981   if test "x$has_forbidden_chars" != x; then
55982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55984   fi
55985 
55986 
55987   windows_path="$new_path"
55988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55989     unix_path=`$CYGPATH -u "$windows_path"`
55990     new_path="$unix_path"
55991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55993     new_path="$unix_path"
55994   fi
55995 
55996   if test "x$path" != "x$new_path"; then
55997     MSVC_DLL="$new_path"
55998     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55999 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56000   fi
56001 
56002   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56003   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56004 
56005     else
56006       # We're on a unix platform. Hooray! :)
56007       path="$MSVC_DLL"
56008       has_space=`$ECHO "$path" | $GREP " "`
56009       if test "x$has_space" != x; then
56010         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56011 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56012         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56013       fi
56014 
56015       # Use eval to expand a potential ~
56016       eval path="$path"
56017       if test ! -f "$path" && test ! -d "$path"; then
56018         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56019       fi
56020 
56021       if test -d "$path"; then
56022         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56023       else
56024         dir="`$DIRNAME "$path"`"
56025         base="`$BASENAME "$path"`"
56026         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56027       fi
56028     fi
56029   fi
56030 
56031       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56032 $as_echo_n "checking for $DLL_NAME... " >&6; }
56033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56034 $as_echo "$MSVC_DLL" >&6; }
56035     else
56036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56037 $as_echo "incorrect, ignoring" >&6; }
56038       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56039 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56040     fi
56041   fi
56042 
56043     fi
56044   fi
56045 
56046   if test "x$MSVC_DLL" = x; then
56047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56048 $as_echo_n "checking for $DLL_NAME... " >&6; }
56049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56050 $as_echo "no" >&6; }
56051     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56052   fi
56053 
56054       MSVCP_DLL="$MSVC_DLL"
56055     fi
56056 
56057   fi
56058 
56059   fi
56060 
56061 
56062   if test "x$NEEDS_LIB_X11" = xfalse; then
56063     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56064       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56065 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56066     fi
56067     X_CFLAGS=
56068     X_LIBS=
56069   else
56070 
56071     if test "x${with_x}" = xno; then
56072       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56073     fi
56074 
56075     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56076       # The user has specified a X11 base directory. Use it for includes and
56077       # libraries, unless explicitely overridden.
56078       if test "x$x_includes" = xNONE; then
56079         x_includes="${with_x}/include"
56080       fi
56081       if test "x$x_libraries" = xNONE; then
56082         x_libraries="${with_x}/lib"
56083       fi
56084     else
56085       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56086       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56087       # --x-libraries for the sysroot, if that seems to be correct.
56088       if test "x$SYSROOT" != "x"; then
56089         if test "x$x_includes" = xNONE; then
56090           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56091             x_includes="$SYSROOT/usr/X11R6/include"
56092           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56093             x_includes="$SYSROOT/usr/include"
56094           fi
56095         fi
56096         if test "x$x_libraries" = xNONE; then
56097           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56098             x_libraries="$SYSROOT/usr/X11R6/lib"
56099           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56100             x_libraries="$SYSROOT/usr/lib64"
56101           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56102             x_libraries="$SYSROOT/usr/lib"
56103           fi
56104         fi
56105       fi
56106     fi
56107 
56108     # Now let autoconf do it's magic
56109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56110 $as_echo_n "checking for X... " >&6; }
56111 
56112 
56113 # Check whether --with-x was given.
56114 if test "${with_x+set}" = set; then :
56115   withval=$with_x;
56116 fi
56117 
56118 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56119 if test "x$with_x" = xno; then
56120   # The user explicitly disabled X.
56121   have_x=disabled
56122 else
56123   case $x_includes,$x_libraries in #(
56124     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56125     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56126   $as_echo_n "(cached) " >&6
56127 else
56128   # One or both of the vars are not set, and there is no cached value.
56129 ac_x_includes=no ac_x_libraries=no
56130 rm -f -r conftest.dir
56131 if mkdir conftest.dir; then
56132   cd conftest.dir
56133   cat >Imakefile <<'_ACEOF'
56134 incroot:
56135         @echo incroot='${INCROOT}'
56136 usrlibdir:
56137         @echo usrlibdir='${USRLIBDIR}'
56138 libdir:
56139         @echo libdir='${LIBDIR}'
56140 _ACEOF
56141   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56142     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56143     for ac_var in incroot usrlibdir libdir; do
56144       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56145     done
56146     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56147     for ac_extension in a so sl dylib la dll; do
56148       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56149          test -f "$ac_im_libdir/libX11.$ac_extension"; then
56150         ac_im_usrlibdir=$ac_im_libdir; break
56151       fi
56152     done
56153     # Screen out bogus values from the imake configuration.  They are
56154     # bogus both because they are the default anyway, and because
56155     # using them would break gcc on systems where it needs fixed includes.
56156     case $ac_im_incroot in
56157         /usr/include) ac_x_includes= ;;
56158         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56159     esac
56160     case $ac_im_usrlibdir in
56161         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
56162         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56163     esac
56164   fi
56165   cd ..
56166   rm -f -r conftest.dir
56167 fi
56168 
56169 # Standard set of common directories for X headers.
56170 # Check X11 before X11Rn because it is often a symlink to the current release.
56171 ac_x_header_dirs='
56172 /usr/X11/include
56173 /usr/X11R7/include
56174 /usr/X11R6/include
56175 /usr/X11R5/include
56176 /usr/X11R4/include
56177 
56178 /usr/include/X11
56179 /usr/include/X11R7
56180 /usr/include/X11R6
56181 /usr/include/X11R5
56182 /usr/include/X11R4
56183 
56184 /usr/local/X11/include
56185 /usr/local/X11R7/include
56186 /usr/local/X11R6/include
56187 /usr/local/X11R5/include
56188 /usr/local/X11R4/include
56189 
56190 /usr/local/include/X11
56191 /usr/local/include/X11R7
56192 /usr/local/include/X11R6
56193 /usr/local/include/X11R5
56194 /usr/local/include/X11R4
56195 
56196 /usr/X386/include
56197 /usr/x386/include
56198 /usr/XFree86/include/X11
56199 
56200 /usr/include
56201 /usr/local/include
56202 /usr/unsupported/include
56203 /usr/athena/include
56204 /usr/local/x11r5/include
56205 /usr/lpp/Xamples/include
56206 
56207 /usr/openwin/include
56208 /usr/openwin/share/include'
56209 
56210 if test "$ac_x_includes" = no; then
56211   # Guess where to find include files, by looking for Xlib.h.
56212   # First, try using that file with no special directory specified.
56213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56214 /* end confdefs.h.  */
56215 #include <X11/Xlib.h>
56216 _ACEOF
56217 if ac_fn_cxx_try_cpp "$LINENO"; then :
56218   # We can compile using X headers with no special include directory.
56219 ac_x_includes=
56220 else
56221   for ac_dir in $ac_x_header_dirs; do
56222   if test -r "$ac_dir/X11/Xlib.h"; then
56223     ac_x_includes=$ac_dir
56224     break
56225   fi
56226 done
56227 fi
56228 rm -f conftest.err conftest.i conftest.$ac_ext
56229 fi # $ac_x_includes = no
56230 
56231 if test "$ac_x_libraries" = no; then
56232   # Check for the libraries.
56233   # See if we find them without any special options.
56234   # Don't add to $LIBS permanently.
56235   ac_save_LIBS=$LIBS
56236   LIBS="-lX11 $LIBS"
56237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56238 /* end confdefs.h.  */
56239 #include <X11/Xlib.h>
56240 int
56241 main ()
56242 {
56243 XrmInitialize ()
56244   ;
56245   return 0;
56246 }
56247 _ACEOF
56248 if ac_fn_cxx_try_link "$LINENO"; then :
56249   LIBS=$ac_save_LIBS
56250 # We can link X programs with no special library path.
56251 ac_x_libraries=
56252 else
56253   LIBS=$ac_save_LIBS
56254 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56255 do
56256   # Don't even attempt the hair of trying to link an X program!
56257   for ac_extension in a so sl dylib la dll; do
56258     if test -r "$ac_dir/libX11.$ac_extension"; then
56259       ac_x_libraries=$ac_dir
56260       break 2
56261     fi
56262   done
56263 done
56264 fi
56265 rm -f core conftest.err conftest.$ac_objext \
56266     conftest$ac_exeext conftest.$ac_ext
56267 fi # $ac_x_libraries = no
56268 
56269 case $ac_x_includes,$ac_x_libraries in #(
56270   no,* | *,no | *\'*)
56271     # Didn't find X, or a directory has "'" in its name.
56272     ac_cv_have_x="have_x=no";; #(
56273   *)
56274     # Record where we found X for the cache.
56275     ac_cv_have_x="have_x=yes\
56276         ac_x_includes='$ac_x_includes'\
56277         ac_x_libraries='$ac_x_libraries'"
56278 esac
56279 fi
56280 ;; #(
56281     *) have_x=yes;;
56282   esac
56283   eval "$ac_cv_have_x"
56284 fi # $with_x != no
56285 
56286 if test "$have_x" != yes; then
56287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56288 $as_echo "$have_x" >&6; }
56289   no_x=yes
56290 else
56291   # If each of the values was on the command line, it overrides each guess.
56292   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56293   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56294   # Update the cache value to reflect the command line values.
56295   ac_cv_have_x="have_x=yes\
56296         ac_x_includes='$x_includes'\
56297         ac_x_libraries='$x_libraries'"
56298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56299 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56300 fi
56301 
56302     if test "$no_x" = yes; then
56303   # Not all programs may use this symbol, but it does not hurt to define it.
56304 
56305 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56306 
56307   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56308 else
56309   if test -n "$x_includes"; then
56310     X_CFLAGS="$X_CFLAGS -I$x_includes"
56311   fi
56312 
56313   # It would also be nice to do this for all -L options, not just this one.
56314   if test -n "$x_libraries"; then
56315     X_LIBS="$X_LIBS -L$x_libraries"
56316     # For Solaris; some versions of Sun CC require a space after -R and
56317     # others require no space.  Words are not sufficient . . . .
56318     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56319 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56320     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56321     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56322     ac_cxx_werror_flag=yes
56323     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56324 /* end confdefs.h.  */
56325 
56326 int
56327 main ()
56328 {
56329 
56330   ;
56331   return 0;
56332 }
56333 _ACEOF
56334 if ac_fn_cxx_try_link "$LINENO"; then :
56335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56336 $as_echo "no" >&6; }
56337        X_LIBS="$X_LIBS -R$x_libraries"
56338 else
56339   LIBS="$ac_xsave_LIBS -R $x_libraries"
56340        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56341 /* end confdefs.h.  */
56342 
56343 int
56344 main ()
56345 {
56346 
56347   ;
56348   return 0;
56349 }
56350 _ACEOF
56351 if ac_fn_cxx_try_link "$LINENO"; then :
56352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56353 $as_echo "yes" >&6; }
56354           X_LIBS="$X_LIBS -R $x_libraries"
56355 else
56356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56357 $as_echo "neither works" >&6; }
56358 fi
56359 rm -f core conftest.err conftest.$ac_objext \
56360     conftest$ac_exeext conftest.$ac_ext
56361 fi
56362 rm -f core conftest.err conftest.$ac_objext \
56363     conftest$ac_exeext conftest.$ac_ext
56364     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56365     LIBS=$ac_xsave_LIBS
56366   fi
56367 
56368   # Check for system-dependent libraries X programs must link with.
56369   # Do this before checking for the system-independent R6 libraries
56370   # (-lICE), since we may need -lsocket or whatever for X linking.
56371 
56372   if test "$ISC" = yes; then
56373     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56374   else
56375     # Martyn Johnson says this is needed for Ultrix, if the X
56376     # libraries were built with DECnet support.  And Karl Berry says
56377     # the Alpha needs dnet_stub (dnet does not exist).
56378     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56379     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56380 /* end confdefs.h.  */
56381 
56382 /* Override any GCC internal prototype to avoid an error.
56383    Use char because int might match the return type of a GCC
56384    builtin and then its argument prototype would still apply.  */
56385 #ifdef __cplusplus
56386 extern "C"
56387 #endif
56388 char XOpenDisplay ();
56389 int
56390 main ()
56391 {
56392 return XOpenDisplay ();
56393   ;
56394   return 0;
56395 }
56396 _ACEOF
56397 if ac_fn_cxx_try_link "$LINENO"; then :
56398 
56399 else
56400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56401 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56402 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56403   $as_echo_n "(cached) " >&6
56404 else
56405   ac_check_lib_save_LIBS=$LIBS
56406 LIBS="-ldnet  $LIBS"
56407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56408 /* end confdefs.h.  */
56409 
56410 /* Override any GCC internal prototype to avoid an error.
56411    Use char because int might match the return type of a GCC
56412    builtin and then its argument prototype would still apply.  */
56413 #ifdef __cplusplus
56414 extern "C"
56415 #endif
56416 char dnet_ntoa ();
56417 int
56418 main ()
56419 {
56420 return dnet_ntoa ();
56421   ;
56422   return 0;
56423 }
56424 _ACEOF
56425 if ac_fn_cxx_try_link "$LINENO"; then :
56426   ac_cv_lib_dnet_dnet_ntoa=yes
56427 else
56428   ac_cv_lib_dnet_dnet_ntoa=no
56429 fi
56430 rm -f core conftest.err conftest.$ac_objext \
56431     conftest$ac_exeext conftest.$ac_ext
56432 LIBS=$ac_check_lib_save_LIBS
56433 fi
56434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56435 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56436 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56437   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56438 fi
56439 
56440     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56441       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56442 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56443 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56444   $as_echo_n "(cached) " >&6
56445 else
56446   ac_check_lib_save_LIBS=$LIBS
56447 LIBS="-ldnet_stub  $LIBS"
56448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56449 /* end confdefs.h.  */
56450 
56451 /* Override any GCC internal prototype to avoid an error.
56452    Use char because int might match the return type of a GCC
56453    builtin and then its argument prototype would still apply.  */
56454 #ifdef __cplusplus
56455 extern "C"
56456 #endif
56457 char dnet_ntoa ();
56458 int
56459 main ()
56460 {
56461 return dnet_ntoa ();
56462   ;
56463   return 0;
56464 }
56465 _ACEOF
56466 if ac_fn_cxx_try_link "$LINENO"; then :
56467   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56468 else
56469   ac_cv_lib_dnet_stub_dnet_ntoa=no
56470 fi
56471 rm -f core conftest.err conftest.$ac_objext \
56472     conftest$ac_exeext conftest.$ac_ext
56473 LIBS=$ac_check_lib_save_LIBS
56474 fi
56475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56476 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56477 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56478   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56479 fi
56480 
56481     fi
56482 fi
56483 rm -f core conftest.err conftest.$ac_objext \
56484     conftest$ac_exeext conftest.$ac_ext
56485     LIBS="$ac_xsave_LIBS"
56486 
56487     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56488     # to get the SysV transport functions.
56489     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56490     # needs -lnsl.
56491     # The nsl library prevents programs from opening the X display
56492     # on Irix 5.2, according to T.E. Dickey.
56493     # The functions gethostbyname, getservbyname, and inet_addr are
56494     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56495     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56496 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56497 
56498 fi
56499 
56500     if test $ac_cv_func_gethostbyname = no; then
56501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56502 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56503 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56504   $as_echo_n "(cached) " >&6
56505 else
56506   ac_check_lib_save_LIBS=$LIBS
56507 LIBS="-lnsl  $LIBS"
56508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56509 /* end confdefs.h.  */
56510 
56511 /* Override any GCC internal prototype to avoid an error.
56512    Use char because int might match the return type of a GCC
56513    builtin and then its argument prototype would still apply.  */
56514 #ifdef __cplusplus
56515 extern "C"
56516 #endif
56517 char gethostbyname ();
56518 int
56519 main ()
56520 {
56521 return gethostbyname ();
56522   ;
56523   return 0;
56524 }
56525 _ACEOF
56526 if ac_fn_cxx_try_link "$LINENO"; then :
56527   ac_cv_lib_nsl_gethostbyname=yes
56528 else
56529   ac_cv_lib_nsl_gethostbyname=no
56530 fi
56531 rm -f core conftest.err conftest.$ac_objext \
56532     conftest$ac_exeext conftest.$ac_ext
56533 LIBS=$ac_check_lib_save_LIBS
56534 fi
56535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56536 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56537 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56538   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56539 fi
56540 
56541       if test $ac_cv_lib_nsl_gethostbyname = no; then
56542         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56543 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56544 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56545   $as_echo_n "(cached) " >&6
56546 else
56547   ac_check_lib_save_LIBS=$LIBS
56548 LIBS="-lbsd  $LIBS"
56549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56550 /* end confdefs.h.  */
56551 
56552 /* Override any GCC internal prototype to avoid an error.
56553    Use char because int might match the return type of a GCC
56554    builtin and then its argument prototype would still apply.  */
56555 #ifdef __cplusplus
56556 extern "C"
56557 #endif
56558 char gethostbyname ();
56559 int
56560 main ()
56561 {
56562 return gethostbyname ();
56563   ;
56564   return 0;
56565 }
56566 _ACEOF
56567 if ac_fn_cxx_try_link "$LINENO"; then :
56568   ac_cv_lib_bsd_gethostbyname=yes
56569 else
56570   ac_cv_lib_bsd_gethostbyname=no
56571 fi
56572 rm -f core conftest.err conftest.$ac_objext \
56573     conftest$ac_exeext conftest.$ac_ext
56574 LIBS=$ac_check_lib_save_LIBS
56575 fi
56576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56577 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56578 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56579   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56580 fi
56581 
56582       fi
56583     fi
56584 
56585     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56586     # socket/setsockopt and other routines are undefined under SCO ODT
56587     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56588     # on later versions), says Simon Leinen: it contains gethostby*
56589     # variants that don't use the name server (or something).  -lsocket
56590     # must be given before -lnsl if both are needed.  We assume that
56591     # if connect needs -lnsl, so does gethostbyname.
56592     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56593 if test "x$ac_cv_func_connect" = xyes; then :
56594 
56595 fi
56596 
56597     if test $ac_cv_func_connect = no; then
56598       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56599 $as_echo_n "checking for connect in -lsocket... " >&6; }
56600 if ${ac_cv_lib_socket_connect+:} false; then :
56601   $as_echo_n "(cached) " >&6
56602 else
56603   ac_check_lib_save_LIBS=$LIBS
56604 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56606 /* end confdefs.h.  */
56607 
56608 /* Override any GCC internal prototype to avoid an error.
56609    Use char because int might match the return type of a GCC
56610    builtin and then its argument prototype would still apply.  */
56611 #ifdef __cplusplus
56612 extern "C"
56613 #endif
56614 char connect ();
56615 int
56616 main ()
56617 {
56618 return connect ();
56619   ;
56620   return 0;
56621 }
56622 _ACEOF
56623 if ac_fn_cxx_try_link "$LINENO"; then :
56624   ac_cv_lib_socket_connect=yes
56625 else
56626   ac_cv_lib_socket_connect=no
56627 fi
56628 rm -f core conftest.err conftest.$ac_objext \
56629     conftest$ac_exeext conftest.$ac_ext
56630 LIBS=$ac_check_lib_save_LIBS
56631 fi
56632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56633 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56634 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56635   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56636 fi
56637 
56638     fi
56639 
56640     # Guillermo Gomez says -lposix is necessary on A/UX.
56641     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56642 if test "x$ac_cv_func_remove" = xyes; then :
56643 
56644 fi
56645 
56646     if test $ac_cv_func_remove = no; then
56647       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56648 $as_echo_n "checking for remove in -lposix... " >&6; }
56649 if ${ac_cv_lib_posix_remove+:} false; then :
56650   $as_echo_n "(cached) " >&6
56651 else
56652   ac_check_lib_save_LIBS=$LIBS
56653 LIBS="-lposix  $LIBS"
56654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56655 /* end confdefs.h.  */
56656 
56657 /* Override any GCC internal prototype to avoid an error.
56658    Use char because int might match the return type of a GCC
56659    builtin and then its argument prototype would still apply.  */
56660 #ifdef __cplusplus
56661 extern "C"
56662 #endif
56663 char remove ();
56664 int
56665 main ()
56666 {
56667 return remove ();
56668   ;
56669   return 0;
56670 }
56671 _ACEOF
56672 if ac_fn_cxx_try_link "$LINENO"; then :
56673   ac_cv_lib_posix_remove=yes
56674 else
56675   ac_cv_lib_posix_remove=no
56676 fi
56677 rm -f core conftest.err conftest.$ac_objext \
56678     conftest$ac_exeext conftest.$ac_ext
56679 LIBS=$ac_check_lib_save_LIBS
56680 fi
56681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56682 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56683 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56684   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56685 fi
56686 
56687     fi
56688 
56689     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56690     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56691 if test "x$ac_cv_func_shmat" = xyes; then :
56692 
56693 fi
56694 
56695     if test $ac_cv_func_shmat = no; then
56696       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56697 $as_echo_n "checking for shmat in -lipc... " >&6; }
56698 if ${ac_cv_lib_ipc_shmat+:} false; then :
56699   $as_echo_n "(cached) " >&6
56700 else
56701   ac_check_lib_save_LIBS=$LIBS
56702 LIBS="-lipc  $LIBS"
56703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56704 /* end confdefs.h.  */
56705 
56706 /* Override any GCC internal prototype to avoid an error.
56707    Use char because int might match the return type of a GCC
56708    builtin and then its argument prototype would still apply.  */
56709 #ifdef __cplusplus
56710 extern "C"
56711 #endif
56712 char shmat ();
56713 int
56714 main ()
56715 {
56716 return shmat ();
56717   ;
56718   return 0;
56719 }
56720 _ACEOF
56721 if ac_fn_cxx_try_link "$LINENO"; then :
56722   ac_cv_lib_ipc_shmat=yes
56723 else
56724   ac_cv_lib_ipc_shmat=no
56725 fi
56726 rm -f core conftest.err conftest.$ac_objext \
56727     conftest$ac_exeext conftest.$ac_ext
56728 LIBS=$ac_check_lib_save_LIBS
56729 fi
56730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56731 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56732 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56733   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56734 fi
56735 
56736     fi
56737   fi
56738 
56739   # Check for libraries that X11R6 Xt/Xaw programs need.
56740   ac_save_LDFLAGS=$LDFLAGS
56741   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56742   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56743   # check for ICE first), but we must link in the order -lSM -lICE or
56744   # we get undefined symbols.  So assume we have SM if we have ICE.
56745   # These have to be linked with before -lX11, unlike the other
56746   # libraries we check for below, so use a different variable.
56747   # John Interrante, Karl Berry
56748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56749 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56750 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56751   $as_echo_n "(cached) " >&6
56752 else
56753   ac_check_lib_save_LIBS=$LIBS
56754 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56756 /* end confdefs.h.  */
56757 
56758 /* Override any GCC internal prototype to avoid an error.
56759    Use char because int might match the return type of a GCC
56760    builtin and then its argument prototype would still apply.  */
56761 #ifdef __cplusplus
56762 extern "C"
56763 #endif
56764 char IceConnectionNumber ();
56765 int
56766 main ()
56767 {
56768 return IceConnectionNumber ();
56769   ;
56770   return 0;
56771 }
56772 _ACEOF
56773 if ac_fn_cxx_try_link "$LINENO"; then :
56774   ac_cv_lib_ICE_IceConnectionNumber=yes
56775 else
56776   ac_cv_lib_ICE_IceConnectionNumber=no
56777 fi
56778 rm -f core conftest.err conftest.$ac_objext \
56779     conftest$ac_exeext conftest.$ac_ext
56780 LIBS=$ac_check_lib_save_LIBS
56781 fi
56782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56783 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56784 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56785   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56786 fi
56787 
56788   LDFLAGS=$ac_save_LDFLAGS
56789 
56790 fi
56791 
56792 
56793     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56794     # this doesn't make sense so we remove it.
56795     if test "x$COMPILE_TYPE" = xcross; then
56796       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56797     fi
56798 
56799     if test "x$no_x" = xyes; then
56800 
56801   # Print a helpful message on how to acquire the necessary build dependency.
56802   # x11 is the help tag: freetype, cups, alsa etc
56803   MISSING_DEPENDENCY=x11
56804 
56805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56806     cygwin_help $MISSING_DEPENDENCY
56807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56808     msys_help $MISSING_DEPENDENCY
56809   else
56810     PKGHANDLER_COMMAND=
56811 
56812     case $PKGHANDLER in
56813       apt-get)
56814         apt_help     $MISSING_DEPENDENCY ;;
56815       yum)
56816         yum_help     $MISSING_DEPENDENCY ;;
56817       port)
56818         port_help    $MISSING_DEPENDENCY ;;
56819       pkgutil)
56820         pkgutil_help $MISSING_DEPENDENCY ;;
56821       pkgadd)
56822         pkgadd_help  $MISSING_DEPENDENCY ;;
56823     esac
56824 
56825     if test "x$PKGHANDLER_COMMAND" != x; then
56826       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56827     fi
56828   fi
56829 
56830       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56831     fi
56832 
56833     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56834       OPENWIN_HOME="/usr/openwin"
56835       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56836       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56837           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56838     fi
56839 
56840     ac_ext=c
56841 ac_cpp='$CPP $CPPFLAGS'
56842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56845 
56846     OLD_CFLAGS="$CFLAGS"
56847     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56848 
56849     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56850     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56851 do :
56852   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56853 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56854           # include <X11/Xlib.h>
56855           # include <X11/Xutil.h>
56856 
56857 
56858 "
56859 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56860   cat >>confdefs.h <<_ACEOF
56861 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56862 _ACEOF
56863  X11_HEADERS_OK=yes
56864 else
56865   X11_HEADERS_OK=no; break
56866 fi
56867 
56868 done
56869 
56870 
56871     if test "x$X11_HEADERS_OK" = xno; then
56872 
56873   # Print a helpful message on how to acquire the necessary build dependency.
56874   # x11 is the help tag: freetype, cups, alsa etc
56875   MISSING_DEPENDENCY=x11
56876 
56877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56878     cygwin_help $MISSING_DEPENDENCY
56879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56880     msys_help $MISSING_DEPENDENCY
56881   else
56882     PKGHANDLER_COMMAND=
56883 
56884     case $PKGHANDLER in
56885       apt-get)
56886         apt_help     $MISSING_DEPENDENCY ;;
56887       yum)
56888         yum_help     $MISSING_DEPENDENCY ;;
56889       port)
56890         port_help    $MISSING_DEPENDENCY ;;
56891       pkgutil)
56892         pkgutil_help $MISSING_DEPENDENCY ;;
56893       pkgadd)
56894         pkgadd_help  $MISSING_DEPENDENCY ;;
56895     esac
56896 
56897     if test "x$PKGHANDLER_COMMAND" != x; then
56898       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56899     fi
56900   fi
56901 
56902       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56903     fi
56904 
56905     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56906     # defined in libawt_xawt.
56907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56908 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56909     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56910 /* end confdefs.h.  */
56911 #include <X11/extensions/Xrender.h>
56912 int
56913 main ()
56914 {
56915 XLinearGradient x;
56916   ;
56917   return 0;
56918 }
56919 _ACEOF
56920 if ac_fn_c_try_compile "$LINENO"; then :
56921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56922 $as_echo "yes" >&6; }
56923 else
56924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56925 $as_echo "no" >&6; }
56926          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56927 fi
56928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56929 
56930     CFLAGS="$OLD_CFLAGS"
56931     ac_ext=cpp
56932 ac_cpp='$CXXCPP $CPPFLAGS'
56933 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56934 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56935 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56936 
56937   fi # NEEDS_LIB_X11
56938 
56939 
56940 
56941 
56942 
56943 
56944 # Check whether --with-cups was given.
56945 if test "${with_cups+set}" = set; then :
56946   withval=$with_cups;
56947 fi
56948 
56949 
56950 # Check whether --with-cups-include was given.
56951 if test "${with_cups_include+set}" = set; then :
56952   withval=$with_cups_include;
56953 fi
56954 
56955 
56956   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56957     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56958         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56959       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56960 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56961     fi
56962     CUPS_CFLAGS=
56963   else
56964     CUPS_FOUND=no
56965 
56966     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56967       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56968     fi
56969 
56970     if test "x${with_cups}" != x; then
56971       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56972 $as_echo_n "checking for cups headers... " >&6; }
56973       if test -s "${with_cups}/include/cups/cups.h"; then
56974         CUPS_CFLAGS="-I${with_cups}/include"
56975         CUPS_FOUND=yes
56976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56977 $as_echo "$CUPS_FOUND" >&6; }
56978       else
56979         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56980       fi
56981     fi
56982     if test "x${with_cups_include}" != x; then
56983       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56984 $as_echo_n "checking for cups headers... " >&6; }
56985       if test -s "${with_cups_include}/cups/cups.h"; then
56986         CUPS_CFLAGS="-I${with_cups_include}"
56987         CUPS_FOUND=yes
56988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56989 $as_echo "$CUPS_FOUND" >&6; }
56990       else
56991         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56992       fi
56993     fi
56994     if test "x$CUPS_FOUND" = xno; then
56995       # Are the cups headers installed in the default /usr/include location?
56996       for ac_header in cups/cups.h cups/ppd.h
56997 do :
56998   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56999 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57000 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57001   cat >>confdefs.h <<_ACEOF
57002 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57003 _ACEOF
57004 
57005           CUPS_FOUND=yes
57006           CUPS_CFLAGS=
57007           DEFAULT_CUPS=yes
57008 
57009 fi
57010 
57011 done
57012 
57013     fi
57014     if test "x$CUPS_FOUND" = xno; then
57015 
57016   # Print a helpful message on how to acquire the necessary build dependency.
57017   # cups is the help tag: freetype, cups, alsa etc
57018   MISSING_DEPENDENCY=cups
57019 
57020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57021     cygwin_help $MISSING_DEPENDENCY
57022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57023     msys_help $MISSING_DEPENDENCY
57024   else
57025     PKGHANDLER_COMMAND=
57026 
57027     case $PKGHANDLER in
57028       apt-get)
57029         apt_help     $MISSING_DEPENDENCY ;;
57030       yum)
57031         yum_help     $MISSING_DEPENDENCY ;;
57032       port)
57033         port_help    $MISSING_DEPENDENCY ;;
57034       pkgutil)
57035         pkgutil_help $MISSING_DEPENDENCY ;;
57036       pkgadd)
57037         pkgadd_help  $MISSING_DEPENDENCY ;;
57038     esac
57039 
57040     if test "x$PKGHANDLER_COMMAND" != x; then
57041       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57042     fi
57043   fi
57044 
57045       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57046     fi
57047   fi
57048 
57049 
57050 
57051 
57052 
57053 # Check whether --with-freetype was given.
57054 if test "${with_freetype+set}" = set; then :
57055   withval=$with_freetype;
57056 fi
57057 
57058 
57059 # Check whether --with-freetype-include was given.
57060 if test "${with_freetype_include+set}" = set; then :
57061   withval=$with_freetype_include;
57062 fi
57063 
57064 
57065 # Check whether --with-freetype-lib was given.
57066 if test "${with_freetype_lib+set}" = set; then :
57067   withval=$with_freetype_lib;
57068 fi
57069 
57070 
57071 # Check whether --with-freetype-src was given.
57072 if test "${with_freetype_src+set}" = set; then :
57073   withval=$with_freetype_src;
57074 fi
57075 
57076   # Check whether --enable-freetype-bundling was given.
57077 if test "${enable_freetype_bundling+set}" = set; then :
57078   enableval=$enable_freetype_bundling;
57079 fi
57080 
57081 
57082   # Need to specify explicitly since it needs to be overridden on some versions of macosx
57083   FREETYPE_BASE_NAME=freetype
57084   FREETYPE_CFLAGS=
57085   FREETYPE_LIBS=
57086   FREETYPE_BUNDLE_LIB_PATH=
57087 
57088   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57089     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57090         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57091         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57092         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57093       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57094 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57095     fi
57096     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57097       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57098 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57099     fi
57100   else
57101     # freetype is needed to build; go get it!
57102 
57103     BUNDLE_FREETYPE="$enable_freetype_bundling"
57104 
57105     if  test "x$with_freetype_src" != x; then
57106       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57107         # Try to build freetype if --with-freetype-src was given on Windows
57108 
57109   FREETYPE_SRC_PATH="$with_freetype_src"
57110   BUILD_FREETYPE=yes
57111 
57112   # Check if the freetype sources are acessible..
57113   if ! test -d $FREETYPE_SRC_PATH; then
57114     { $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
57115 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57116     BUILD_FREETYPE=no
57117   fi
57118   # ..and contain a vc2010 project file
57119   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57120   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57121     { $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
57122 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57123     BUILD_FREETYPE=no
57124   fi
57125   # Now check if configure found a version of 'msbuild.exe'
57126   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57127     { $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
57128 $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;}
57129     BUILD_FREETYPE=no
57130   fi
57131 
57132   # Ready to go..
57133   if test "x$BUILD_FREETYPE" = xyes; then
57134     # msbuild requires trailing slashes for output directories
57135     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57136     freetype_lib_path_unix="$freetype_lib_path"
57137     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57138 
57139   unix_path="$vcxproj_path"
57140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57141     windows_path=`$CYGPATH -m "$unix_path"`
57142     vcxproj_path="$windows_path"
57143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57144     windows_path=`cmd //c echo $unix_path`
57145     vcxproj_path="$windows_path"
57146   fi
57147 
57148 
57149   unix_path="$freetype_lib_path"
57150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57151     windows_path=`$CYGPATH -m "$unix_path"`
57152     freetype_lib_path="$windows_path"
57153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57154     windows_path=`cmd //c echo $unix_path`
57155     freetype_lib_path="$windows_path"
57156   fi
57157 
57158 
57159   unix_path="$freetype_obj_path"
57160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57161     windows_path=`$CYGPATH -m "$unix_path"`
57162     freetype_obj_path="$windows_path"
57163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57164     windows_path=`cmd //c echo $unix_path`
57165     freetype_obj_path="$windows_path"
57166   fi
57167 
57168     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57169       freetype_platform=x64
57170     else
57171       freetype_platform=win32
57172     fi
57173 
57174     # The original freetype project file is for VS 2010 (i.e. 'v100'),
57175     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57176     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57177     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57178     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57179 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57180 
57181     # First we try to build the freetype.dll
57182     $ECHO -e "@echo off\n"\
57183         "$MSBUILD $vcxproj_path "\
57184         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57185         "/p:Configuration=\"Release Multithreaded\" "\
57186         "/p:Platform=$freetype_platform "\
57187         "/p:ConfigurationType=DynamicLibrary "\
57188         "/p:TargetName=freetype "\
57189         "/p:OutDir=\"$freetype_lib_path\" "\
57190         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57191     cmd /c freetype.bat
57192 
57193     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57194       # If that succeeds we also build freetype.lib
57195       $ECHO -e "@echo off\n"\
57196           "$MSBUILD $vcxproj_path "\
57197           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57198           "/p:Configuration=\"Release Multithreaded\" "\
57199           "/p:Platform=$freetype_platform "\
57200           "/p:ConfigurationType=StaticLibrary "\
57201           "/p:TargetName=freetype "\
57202           "/p:OutDir=\"$freetype_lib_path\" "\
57203           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57204       cmd /c freetype.bat
57205 
57206       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57207         # Once we build both, lib and dll, set freetype lib and include path appropriately
57208         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57209         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57210         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57211 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57212       else
57213         BUILD_FREETYPE=no
57214       fi
57215     else
57216       BUILD_FREETYPE=no
57217     fi
57218   fi
57219 
57220         if test "x$BUILD_FREETYPE" = xyes; then
57221           # Okay, we built it. Check that it works.
57222 
57223   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57224   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57225   METHOD="--with-freetype-src"
57226 
57227   # Let's start with an optimistic view of the world :-)
57228   FOUND_FREETYPE=yes
57229 
57230   # First look for the canonical freetype main include file ft2build.h.
57231   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57232     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57233     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57234     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57235       # Fail.
57236       FOUND_FREETYPE=no
57237     fi
57238   fi
57239 
57240   if test "x$FOUND_FREETYPE" = xyes; then
57241     # Include file found, let's continue the sanity check.
57242     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57243 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57244 
57245     # Reset to default value
57246     FREETYPE_BASE_NAME=freetype
57247     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57248     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57249       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57250           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57251         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57252         # for the .6 version explicitly.
57253         FREETYPE_BASE_NAME=freetype.6
57254         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57255         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57256 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57257       else
57258         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57259 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57260         FOUND_FREETYPE=no
57261       fi
57262     else
57263       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57264         # On Windows, we will need both .lib and .dll file.
57265         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57266           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57267 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57268           FOUND_FREETYPE=no
57269         fi
57270       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57271           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57272         # Found lib in isa dir, use that instead.
57273         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57274         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57275 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57276       fi
57277     fi
57278   fi
57279 
57280   if test "x$FOUND_FREETYPE" = xyes; then
57281 
57282   # Only process if variable expands to non-empty
57283 
57284   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57285     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57286 
57287   # Input might be given as Windows format, start by converting to
57288   # unix format.
57289   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57290   new_path=`$CYGPATH -u "$path"`
57291 
57292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57295   # "foo.exe" is OK but "foo" is an error.
57296   #
57297   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57298   # It is also a way to make sure we got the proper file name for the real test later on.
57299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57300   if test "x$test_shortpath" = x; then
57301     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57302 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57303     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57304   fi
57305 
57306   # Call helper function which possibly converts this using DOS-style short mode.
57307   # If so, the updated path is stored in $new_path.
57308 
57309   input_path="$new_path"
57310   # Check if we need to convert this using DOS-style short mode. If the path
57311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57312   # take no chances and rewrite it.
57313   # Note: m4 eats our [], so we need to use [ and ] instead.
57314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57315   if test "x$has_forbidden_chars" != x; then
57316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57320       # Going to short mode and back again did indeed matter. Since short mode is
57321       # case insensitive, let's make it lowercase to improve readability.
57322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57323       # Now convert it back to Unix-style (cygpath)
57324       input_path=`$CYGPATH -u "$shortmode_path"`
57325       new_path="$input_path"
57326     fi
57327   fi
57328 
57329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57330   if test "x$test_cygdrive_prefix" = x; then
57331     # As a simple fix, exclude /usr/bin since it's not a real path.
57332     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57334       # a path prefixed by /cygdrive for fixpath to work.
57335       new_path="$CYGWIN_ROOT_PATH$input_path"
57336     fi
57337   fi
57338 
57339 
57340   if test "x$path" != "x$new_path"; then
57341     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57343 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57344   fi
57345 
57346     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57347 
57348   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57349   has_colon=`$ECHO $path | $GREP ^.:`
57350   new_path="$path"
57351   if test "x$has_colon" = x; then
57352     # Not in mixed or Windows style, start by that.
57353     new_path=`cmd //c echo $path`
57354   fi
57355 
57356 
57357   input_path="$new_path"
57358   # Check if we need to convert this using DOS-style short mode. If the path
57359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57360   # take no chances and rewrite it.
57361   # Note: m4 eats our [], so we need to use [ and ] instead.
57362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57363   if test "x$has_forbidden_chars" != x; then
57364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57366   fi
57367 
57368 
57369   windows_path="$new_path"
57370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57371     unix_path=`$CYGPATH -u "$windows_path"`
57372     new_path="$unix_path"
57373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57375     new_path="$unix_path"
57376   fi
57377 
57378   if test "x$path" != "x$new_path"; then
57379     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57381 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57382   fi
57383 
57384   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57385   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57386 
57387     else
57388       # We're on a unix platform. Hooray! :)
57389       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57390       has_space=`$ECHO "$path" | $GREP " "`
57391       if test "x$has_space" != x; then
57392         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57393 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57394         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57395       fi
57396 
57397       # Use eval to expand a potential ~
57398       eval path="$path"
57399       if test ! -f "$path" && test ! -d "$path"; then
57400         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57401       fi
57402 
57403       if test -d "$path"; then
57404         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57405       else
57406         dir="`$DIRNAME "$path"`"
57407         base="`$BASENAME "$path"`"
57408         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57409       fi
57410     fi
57411   fi
57412 
57413 
57414   # Only process if variable expands to non-empty
57415 
57416   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57417     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57418 
57419   # Input might be given as Windows format, start by converting to
57420   # unix format.
57421   path="$POTENTIAL_FREETYPE_LIB_PATH"
57422   new_path=`$CYGPATH -u "$path"`
57423 
57424   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57425   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57426   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57427   # "foo.exe" is OK but "foo" is an error.
57428   #
57429   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57430   # It is also a way to make sure we got the proper file name for the real test later on.
57431   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57432   if test "x$test_shortpath" = x; then
57433     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57434 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57435     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57436   fi
57437 
57438   # Call helper function which possibly converts this using DOS-style short mode.
57439   # If so, the updated path is stored in $new_path.
57440 
57441   input_path="$new_path"
57442   # Check if we need to convert this using DOS-style short mode. If the path
57443   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57444   # take no chances and rewrite it.
57445   # Note: m4 eats our [], so we need to use [ and ] instead.
57446   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57447   if test "x$has_forbidden_chars" != x; then
57448     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57449     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57450     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57451     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57452       # Going to short mode and back again did indeed matter. Since short mode is
57453       # case insensitive, let's make it lowercase to improve readability.
57454       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57455       # Now convert it back to Unix-style (cygpath)
57456       input_path=`$CYGPATH -u "$shortmode_path"`
57457       new_path="$input_path"
57458     fi
57459   fi
57460 
57461   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57462   if test "x$test_cygdrive_prefix" = x; then
57463     # As a simple fix, exclude /usr/bin since it's not a real path.
57464     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57465       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57466       # a path prefixed by /cygdrive for fixpath to work.
57467       new_path="$CYGWIN_ROOT_PATH$input_path"
57468     fi
57469   fi
57470 
57471 
57472   if test "x$path" != "x$new_path"; then
57473     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57475 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57476   fi
57477 
57478     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57479 
57480   path="$POTENTIAL_FREETYPE_LIB_PATH"
57481   has_colon=`$ECHO $path | $GREP ^.:`
57482   new_path="$path"
57483   if test "x$has_colon" = x; then
57484     # Not in mixed or Windows style, start by that.
57485     new_path=`cmd //c echo $path`
57486   fi
57487 
57488 
57489   input_path="$new_path"
57490   # Check if we need to convert this using DOS-style short mode. If the path
57491   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57492   # take no chances and rewrite it.
57493   # Note: m4 eats our [], so we need to use [ and ] instead.
57494   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57495   if test "x$has_forbidden_chars" != x; then
57496     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57497     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57498   fi
57499 
57500 
57501   windows_path="$new_path"
57502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57503     unix_path=`$CYGPATH -u "$windows_path"`
57504     new_path="$unix_path"
57505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57507     new_path="$unix_path"
57508   fi
57509 
57510   if test "x$path" != "x$new_path"; then
57511     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57513 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57514   fi
57515 
57516   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57517   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57518 
57519     else
57520       # We're on a unix platform. Hooray! :)
57521       path="$POTENTIAL_FREETYPE_LIB_PATH"
57522       has_space=`$ECHO "$path" | $GREP " "`
57523       if test "x$has_space" != x; then
57524         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57525 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57526         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57527       fi
57528 
57529       # Use eval to expand a potential ~
57530       eval path="$path"
57531       if test ! -f "$path" && test ! -d "$path"; then
57532         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57533       fi
57534 
57535       if test -d "$path"; then
57536         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57537       else
57538         dir="`$DIRNAME "$path"`"
57539         base="`$BASENAME "$path"`"
57540         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57541       fi
57542     fi
57543   fi
57544 
57545 
57546     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57547     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57548 $as_echo_n "checking for freetype includes... " >&6; }
57549     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57550 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57551     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57553 $as_echo_n "checking for freetype libraries... " >&6; }
57554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57555 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57556   fi
57557 
57558           if test "x$FOUND_FREETYPE" != xyes; then
57559             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57560           fi
57561         else
57562           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57563 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57564           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57565         fi
57566       else
57567         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57568 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57569       fi
57570     fi
57571 
57572     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57573       # User has specified settings
57574 
57575       if test "x$BUNDLE_FREETYPE" = x; then
57576         # If not specified, default is to bundle freetype
57577         BUNDLE_FREETYPE=yes
57578       fi
57579 
57580       if test "x$with_freetype" != x; then
57581         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57582         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57583       fi
57584 
57585       # Allow --with-freetype-lib and --with-freetype-include to override
57586       if test "x$with_freetype_include" != x; then
57587         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57588       fi
57589       if test "x$with_freetype_lib" != x; then
57590         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57591       fi
57592 
57593       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57594         # Okay, we got it. Check that it works.
57595 
57596   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57597   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57598   METHOD="--with-freetype"
57599 
57600   # Let's start with an optimistic view of the world :-)
57601   FOUND_FREETYPE=yes
57602 
57603   # First look for the canonical freetype main include file ft2build.h.
57604   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57605     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57606     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57607     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57608       # Fail.
57609       FOUND_FREETYPE=no
57610     fi
57611   fi
57612 
57613   if test "x$FOUND_FREETYPE" = xyes; then
57614     # Include file found, let's continue the sanity check.
57615     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57616 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57617 
57618     # Reset to default value
57619     FREETYPE_BASE_NAME=freetype
57620     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57621     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57622       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57623           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57624         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57625         # for the .6 version explicitly.
57626         FREETYPE_BASE_NAME=freetype.6
57627         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57628         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57629 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57630       else
57631         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57632 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57633         FOUND_FREETYPE=no
57634       fi
57635     else
57636       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57637         # On Windows, we will need both .lib and .dll file.
57638         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57639           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57640 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57641           FOUND_FREETYPE=no
57642         fi
57643       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57644           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57645         # Found lib in isa dir, use that instead.
57646         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57647         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57648 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57649       fi
57650     fi
57651   fi
57652 
57653   if test "x$FOUND_FREETYPE" = xyes; then
57654 
57655   # Only process if variable expands to non-empty
57656 
57657   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57658     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57659 
57660   # Input might be given as Windows format, start by converting to
57661   # unix format.
57662   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57663   new_path=`$CYGPATH -u "$path"`
57664 
57665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57668   # "foo.exe" is OK but "foo" is an error.
57669   #
57670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57671   # It is also a way to make sure we got the proper file name for the real test later on.
57672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57673   if test "x$test_shortpath" = x; then
57674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57675 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57676     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57677   fi
57678 
57679   # Call helper function which possibly converts this using DOS-style short mode.
57680   # If so, the updated path is stored in $new_path.
57681 
57682   input_path="$new_path"
57683   # Check if we need to convert this using DOS-style short mode. If the path
57684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57685   # take no chances and rewrite it.
57686   # Note: m4 eats our [], so we need to use [ and ] instead.
57687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57688   if test "x$has_forbidden_chars" != x; then
57689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57693       # Going to short mode and back again did indeed matter. Since short mode is
57694       # case insensitive, let's make it lowercase to improve readability.
57695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57696       # Now convert it back to Unix-style (cygpath)
57697       input_path=`$CYGPATH -u "$shortmode_path"`
57698       new_path="$input_path"
57699     fi
57700   fi
57701 
57702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57703   if test "x$test_cygdrive_prefix" = x; then
57704     # As a simple fix, exclude /usr/bin since it's not a real path.
57705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57707       # a path prefixed by /cygdrive for fixpath to work.
57708       new_path="$CYGWIN_ROOT_PATH$input_path"
57709     fi
57710   fi
57711 
57712 
57713   if test "x$path" != "x$new_path"; then
57714     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57716 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57717   fi
57718 
57719     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57720 
57721   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57722   has_colon=`$ECHO $path | $GREP ^.:`
57723   new_path="$path"
57724   if test "x$has_colon" = x; then
57725     # Not in mixed or Windows style, start by that.
57726     new_path=`cmd //c echo $path`
57727   fi
57728 
57729 
57730   input_path="$new_path"
57731   # Check if we need to convert this using DOS-style short mode. If the path
57732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57733   # take no chances and rewrite it.
57734   # Note: m4 eats our [], so we need to use [ and ] instead.
57735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57736   if test "x$has_forbidden_chars" != x; then
57737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57739   fi
57740 
57741 
57742   windows_path="$new_path"
57743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57744     unix_path=`$CYGPATH -u "$windows_path"`
57745     new_path="$unix_path"
57746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57748     new_path="$unix_path"
57749   fi
57750 
57751   if test "x$path" != "x$new_path"; then
57752     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57754 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57755   fi
57756 
57757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57759 
57760     else
57761       # We're on a unix platform. Hooray! :)
57762       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57763       has_space=`$ECHO "$path" | $GREP " "`
57764       if test "x$has_space" != x; then
57765         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57766 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57767         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57768       fi
57769 
57770       # Use eval to expand a potential ~
57771       eval path="$path"
57772       if test ! -f "$path" && test ! -d "$path"; then
57773         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57774       fi
57775 
57776       if test -d "$path"; then
57777         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57778       else
57779         dir="`$DIRNAME "$path"`"
57780         base="`$BASENAME "$path"`"
57781         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57782       fi
57783     fi
57784   fi
57785 
57786 
57787   # Only process if variable expands to non-empty
57788 
57789   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57791 
57792   # Input might be given as Windows format, start by converting to
57793   # unix format.
57794   path="$POTENTIAL_FREETYPE_LIB_PATH"
57795   new_path=`$CYGPATH -u "$path"`
57796 
57797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57800   # "foo.exe" is OK but "foo" is an error.
57801   #
57802   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57803   # It is also a way to make sure we got the proper file name for the real test later on.
57804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57805   if test "x$test_shortpath" = x; then
57806     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57807 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57808     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57809   fi
57810 
57811   # Call helper function which possibly converts this using DOS-style short mode.
57812   # If so, the updated path is stored in $new_path.
57813 
57814   input_path="$new_path"
57815   # Check if we need to convert this using DOS-style short mode. If the path
57816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57817   # take no chances and rewrite it.
57818   # Note: m4 eats our [], so we need to use [ and ] instead.
57819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57820   if test "x$has_forbidden_chars" != x; then
57821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57825       # Going to short mode and back again did indeed matter. Since short mode is
57826       # case insensitive, let's make it lowercase to improve readability.
57827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57828       # Now convert it back to Unix-style (cygpath)
57829       input_path=`$CYGPATH -u "$shortmode_path"`
57830       new_path="$input_path"
57831     fi
57832   fi
57833 
57834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57835   if test "x$test_cygdrive_prefix" = x; then
57836     # As a simple fix, exclude /usr/bin since it's not a real path.
57837     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57839       # a path prefixed by /cygdrive for fixpath to work.
57840       new_path="$CYGWIN_ROOT_PATH$input_path"
57841     fi
57842   fi
57843 
57844 
57845   if test "x$path" != "x$new_path"; then
57846     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57848 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57849   fi
57850 
57851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57852 
57853   path="$POTENTIAL_FREETYPE_LIB_PATH"
57854   has_colon=`$ECHO $path | $GREP ^.:`
57855   new_path="$path"
57856   if test "x$has_colon" = x; then
57857     # Not in mixed or Windows style, start by that.
57858     new_path=`cmd //c echo $path`
57859   fi
57860 
57861 
57862   input_path="$new_path"
57863   # Check if we need to convert this using DOS-style short mode. If the path
57864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57865   # take no chances and rewrite it.
57866   # Note: m4 eats our [], so we need to use [ and ] instead.
57867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57868   if test "x$has_forbidden_chars" != x; then
57869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57871   fi
57872 
57873 
57874   windows_path="$new_path"
57875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57876     unix_path=`$CYGPATH -u "$windows_path"`
57877     new_path="$unix_path"
57878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57880     new_path="$unix_path"
57881   fi
57882 
57883   if test "x$path" != "x$new_path"; then
57884     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57886 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57887   fi
57888 
57889   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57890   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57891 
57892     else
57893       # We're on a unix platform. Hooray! :)
57894       path="$POTENTIAL_FREETYPE_LIB_PATH"
57895       has_space=`$ECHO "$path" | $GREP " "`
57896       if test "x$has_space" != x; then
57897         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57898 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57899         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57900       fi
57901 
57902       # Use eval to expand a potential ~
57903       eval path="$path"
57904       if test ! -f "$path" && test ! -d "$path"; then
57905         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57906       fi
57907 
57908       if test -d "$path"; then
57909         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57910       else
57911         dir="`$DIRNAME "$path"`"
57912         base="`$BASENAME "$path"`"
57913         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57914       fi
57915     fi
57916   fi
57917 
57918 
57919     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57920     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57921 $as_echo_n "checking for freetype includes... " >&6; }
57922     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57923 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57924     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57926 $as_echo_n "checking for freetype libraries... " >&6; }
57927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57928 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57929   fi
57930 
57931         if test "x$FOUND_FREETYPE" != xyes; then
57932           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57933         fi
57934       else
57935         # User specified only one of lib or include. This is an error.
57936         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57937           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57938 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57939           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57940         else
57941           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57942 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57943           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57944         fi
57945       fi
57946     else
57947       # User did not specify settings, but we need freetype. Try to locate it.
57948 
57949       if test "x$BUNDLE_FREETYPE" = x; then
57950         # If not specified, default is to bundle freetype only on windows
57951         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57952           BUNDLE_FREETYPE=yes
57953         else
57954           BUNDLE_FREETYPE=no
57955         fi
57956       fi
57957 
57958       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57959       if test "x$SYSROOT" = x; then
57960         if test "x$FOUND_FREETYPE" != xyes; then
57961           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57962           if test "x$PKG_CONFIG" != x; then
57963 
57964 pkg_failed=no
57965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57966 $as_echo_n "checking for FREETYPE... " >&6; }
57967 
57968 if test -n "$FREETYPE_CFLAGS"; then
57969     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57970  elif test -n "$PKG_CONFIG"; then
57971     if test -n "$PKG_CONFIG" && \
57972     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57973   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57974   ac_status=$?
57975   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57976   test $ac_status = 0; }; then
57977   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57978 else
57979   pkg_failed=yes
57980 fi
57981  else
57982     pkg_failed=untried
57983 fi
57984 if test -n "$FREETYPE_LIBS"; then
57985     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57986  elif test -n "$PKG_CONFIG"; then
57987     if test -n "$PKG_CONFIG" && \
57988     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57989   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57990   ac_status=$?
57991   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57992   test $ac_status = 0; }; then
57993   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57994 else
57995   pkg_failed=yes
57996 fi
57997  else
57998     pkg_failed=untried
57999 fi
58000 
58001 
58002 
58003 if test $pkg_failed = yes; then
58004 
58005 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58006         _pkg_short_errors_supported=yes
58007 else
58008         _pkg_short_errors_supported=no
58009 fi
58010         if test $_pkg_short_errors_supported = yes; then
58011                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58012         else
58013                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58014         fi
58015         # Put the nasty error message in config.log where it belongs
58016         echo "$FREETYPE_PKG_ERRORS" >&5
58017 
58018         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58019 $as_echo "no" >&6; }
58020                 FOUND_FREETYPE=no
58021 elif test $pkg_failed = untried; then
58022         FOUND_FREETYPE=no
58023 else
58024         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58025         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58027 $as_echo "yes" >&6; }
58028         FOUND_FREETYPE=yes
58029 fi
58030             if test "x$FOUND_FREETYPE" = xyes; then
58031               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58032               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58033               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58034               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58035                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58036               fi
58037               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58038               if test "x$BUNDLE_FREETYPE" = xyes; then
58039                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58040 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58041                 FOUND_FREETYPE=no
58042               else
58043                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58044 $as_echo_n "checking for freetype... " >&6; }
58045                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58046 $as_echo "yes (using pkg-config)" >&6; }
58047               fi
58048             fi
58049           fi
58050         fi
58051       fi
58052 
58053       if test "x$FOUND_FREETYPE" != xyes; then
58054         # Check in well-known locations
58055         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58056           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58057 
58058   windows_path="$FREETYPE_BASE_DIR"
58059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58060     unix_path=`$CYGPATH -u "$windows_path"`
58061     FREETYPE_BASE_DIR="$unix_path"
58062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58064     FREETYPE_BASE_DIR="$unix_path"
58065   fi
58066 
58067 
58068   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58069   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58070   METHOD="well-known location"
58071 
58072   # Let's start with an optimistic view of the world :-)
58073   FOUND_FREETYPE=yes
58074 
58075   # First look for the canonical freetype main include file ft2build.h.
58076   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58077     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58078     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58079     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58080       # Fail.
58081       FOUND_FREETYPE=no
58082     fi
58083   fi
58084 
58085   if test "x$FOUND_FREETYPE" = xyes; then
58086     # Include file found, let's continue the sanity check.
58087     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58088 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58089 
58090     # Reset to default value
58091     FREETYPE_BASE_NAME=freetype
58092     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58093     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58094       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58095           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58096         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58097         # for the .6 version explicitly.
58098         FREETYPE_BASE_NAME=freetype.6
58099         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58100         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58101 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58102       else
58103         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58104 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58105         FOUND_FREETYPE=no
58106       fi
58107     else
58108       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58109         # On Windows, we will need both .lib and .dll file.
58110         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58111           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58112 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58113           FOUND_FREETYPE=no
58114         fi
58115       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58116           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58117         # Found lib in isa dir, use that instead.
58118         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58119         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58120 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58121       fi
58122     fi
58123   fi
58124 
58125   if test "x$FOUND_FREETYPE" = xyes; then
58126 
58127   # Only process if variable expands to non-empty
58128 
58129   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58130     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58131 
58132   # Input might be given as Windows format, start by converting to
58133   # unix format.
58134   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58135   new_path=`$CYGPATH -u "$path"`
58136 
58137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58140   # "foo.exe" is OK but "foo" is an error.
58141   #
58142   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58143   # It is also a way to make sure we got the proper file name for the real test later on.
58144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58145   if test "x$test_shortpath" = x; then
58146     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58147 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58148     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58149   fi
58150 
58151   # Call helper function which possibly converts this using DOS-style short mode.
58152   # If so, the updated path is stored in $new_path.
58153 
58154   input_path="$new_path"
58155   # Check if we need to convert this using DOS-style short mode. If the path
58156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58157   # take no chances and rewrite it.
58158   # Note: m4 eats our [], so we need to use [ and ] instead.
58159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58160   if test "x$has_forbidden_chars" != x; then
58161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58165       # Going to short mode and back again did indeed matter. Since short mode is
58166       # case insensitive, let's make it lowercase to improve readability.
58167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58168       # Now convert it back to Unix-style (cygpath)
58169       input_path=`$CYGPATH -u "$shortmode_path"`
58170       new_path="$input_path"
58171     fi
58172   fi
58173 
58174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58175   if test "x$test_cygdrive_prefix" = x; then
58176     # As a simple fix, exclude /usr/bin since it's not a real path.
58177     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58179       # a path prefixed by /cygdrive for fixpath to work.
58180       new_path="$CYGWIN_ROOT_PATH$input_path"
58181     fi
58182   fi
58183 
58184 
58185   if test "x$path" != "x$new_path"; then
58186     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58188 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58189   fi
58190 
58191     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58192 
58193   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58194   has_colon=`$ECHO $path | $GREP ^.:`
58195   new_path="$path"
58196   if test "x$has_colon" = x; then
58197     # Not in mixed or Windows style, start by that.
58198     new_path=`cmd //c echo $path`
58199   fi
58200 
58201 
58202   input_path="$new_path"
58203   # Check if we need to convert this using DOS-style short mode. If the path
58204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58205   # take no chances and rewrite it.
58206   # Note: m4 eats our [], so we need to use [ and ] instead.
58207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58208   if test "x$has_forbidden_chars" != x; then
58209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58211   fi
58212 
58213 
58214   windows_path="$new_path"
58215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58216     unix_path=`$CYGPATH -u "$windows_path"`
58217     new_path="$unix_path"
58218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58220     new_path="$unix_path"
58221   fi
58222 
58223   if test "x$path" != "x$new_path"; then
58224     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58227   fi
58228 
58229   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58230   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58231 
58232     else
58233       # We're on a unix platform. Hooray! :)
58234       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58235       has_space=`$ECHO "$path" | $GREP " "`
58236       if test "x$has_space" != x; then
58237         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58238 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58239         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58240       fi
58241 
58242       # Use eval to expand a potential ~
58243       eval path="$path"
58244       if test ! -f "$path" && test ! -d "$path"; then
58245         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58246       fi
58247 
58248       if test -d "$path"; then
58249         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58250       else
58251         dir="`$DIRNAME "$path"`"
58252         base="`$BASENAME "$path"`"
58253         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58254       fi
58255     fi
58256   fi
58257 
58258 
58259   # Only process if variable expands to non-empty
58260 
58261   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58263 
58264   # Input might be given as Windows format, start by converting to
58265   # unix format.
58266   path="$POTENTIAL_FREETYPE_LIB_PATH"
58267   new_path=`$CYGPATH -u "$path"`
58268 
58269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58272   # "foo.exe" is OK but "foo" is an error.
58273   #
58274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58275   # It is also a way to make sure we got the proper file name for the real test later on.
58276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58277   if test "x$test_shortpath" = x; then
58278     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58279 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58280     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58281   fi
58282 
58283   # Call helper function which possibly converts this using DOS-style short mode.
58284   # If so, the updated path is stored in $new_path.
58285 
58286   input_path="$new_path"
58287   # Check if we need to convert this using DOS-style short mode. If the path
58288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58289   # take no chances and rewrite it.
58290   # Note: m4 eats our [], so we need to use [ and ] instead.
58291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58292   if test "x$has_forbidden_chars" != x; then
58293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58297       # Going to short mode and back again did indeed matter. Since short mode is
58298       # case insensitive, let's make it lowercase to improve readability.
58299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58300       # Now convert it back to Unix-style (cygpath)
58301       input_path=`$CYGPATH -u "$shortmode_path"`
58302       new_path="$input_path"
58303     fi
58304   fi
58305 
58306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58307   if test "x$test_cygdrive_prefix" = x; then
58308     # As a simple fix, exclude /usr/bin since it's not a real path.
58309     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58311       # a path prefixed by /cygdrive for fixpath to work.
58312       new_path="$CYGWIN_ROOT_PATH$input_path"
58313     fi
58314   fi
58315 
58316 
58317   if test "x$path" != "x$new_path"; then
58318     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58320 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58321   fi
58322 
58323     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58324 
58325   path="$POTENTIAL_FREETYPE_LIB_PATH"
58326   has_colon=`$ECHO $path | $GREP ^.:`
58327   new_path="$path"
58328   if test "x$has_colon" = x; then
58329     # Not in mixed or Windows style, start by that.
58330     new_path=`cmd //c echo $path`
58331   fi
58332 
58333 
58334   input_path="$new_path"
58335   # Check if we need to convert this using DOS-style short mode. If the path
58336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58337   # take no chances and rewrite it.
58338   # Note: m4 eats our [], so we need to use [ and ] instead.
58339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58340   if test "x$has_forbidden_chars" != x; then
58341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58342     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58343   fi
58344 
58345 
58346   windows_path="$new_path"
58347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58348     unix_path=`$CYGPATH -u "$windows_path"`
58349     new_path="$unix_path"
58350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58352     new_path="$unix_path"
58353   fi
58354 
58355   if test "x$path" != "x$new_path"; then
58356     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58358 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58359   fi
58360 
58361   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58362   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58363 
58364     else
58365       # We're on a unix platform. Hooray! :)
58366       path="$POTENTIAL_FREETYPE_LIB_PATH"
58367       has_space=`$ECHO "$path" | $GREP " "`
58368       if test "x$has_space" != x; then
58369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58370 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58371         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58372       fi
58373 
58374       # Use eval to expand a potential ~
58375       eval path="$path"
58376       if test ! -f "$path" && test ! -d "$path"; then
58377         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58378       fi
58379 
58380       if test -d "$path"; then
58381         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58382       else
58383         dir="`$DIRNAME "$path"`"
58384         base="`$BASENAME "$path"`"
58385         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58386       fi
58387     fi
58388   fi
58389 
58390 
58391     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58393 $as_echo_n "checking for freetype includes... " >&6; }
58394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58395 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58396     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58398 $as_echo_n "checking for freetype libraries... " >&6; }
58399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58400 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58401   fi
58402 
58403           if test "x$FOUND_FREETYPE" != xyes; then
58404             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58405 
58406   windows_path="$FREETYPE_BASE_DIR"
58407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58408     unix_path=`$CYGPATH -u "$windows_path"`
58409     FREETYPE_BASE_DIR="$unix_path"
58410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58412     FREETYPE_BASE_DIR="$unix_path"
58413   fi
58414 
58415 
58416   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58417   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58418   METHOD="well-known location"
58419 
58420   # Let's start with an optimistic view of the world :-)
58421   FOUND_FREETYPE=yes
58422 
58423   # First look for the canonical freetype main include file ft2build.h.
58424   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58425     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58426     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58427     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58428       # Fail.
58429       FOUND_FREETYPE=no
58430     fi
58431   fi
58432 
58433   if test "x$FOUND_FREETYPE" = xyes; then
58434     # Include file found, let's continue the sanity check.
58435     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58436 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58437 
58438     # Reset to default value
58439     FREETYPE_BASE_NAME=freetype
58440     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58441     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58442       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58443           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58444         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58445         # for the .6 version explicitly.
58446         FREETYPE_BASE_NAME=freetype.6
58447         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58448         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58449 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58450       else
58451         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58452 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58453         FOUND_FREETYPE=no
58454       fi
58455     else
58456       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58457         # On Windows, we will need both .lib and .dll file.
58458         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58459           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58460 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58461           FOUND_FREETYPE=no
58462         fi
58463       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58464           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58465         # Found lib in isa dir, use that instead.
58466         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58467         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58468 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58469       fi
58470     fi
58471   fi
58472 
58473   if test "x$FOUND_FREETYPE" = xyes; then
58474 
58475   # Only process if variable expands to non-empty
58476 
58477   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58478     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58479 
58480   # Input might be given as Windows format, start by converting to
58481   # unix format.
58482   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58483   new_path=`$CYGPATH -u "$path"`
58484 
58485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58488   # "foo.exe" is OK but "foo" is an error.
58489   #
58490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58491   # It is also a way to make sure we got the proper file name for the real test later on.
58492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58493   if test "x$test_shortpath" = x; then
58494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58495 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58496     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58497   fi
58498 
58499   # Call helper function which possibly converts this using DOS-style short mode.
58500   # If so, the updated path is stored in $new_path.
58501 
58502   input_path="$new_path"
58503   # Check if we need to convert this using DOS-style short mode. If the path
58504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58505   # take no chances and rewrite it.
58506   # Note: m4 eats our [], so we need to use [ and ] instead.
58507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58508   if test "x$has_forbidden_chars" != x; then
58509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58513       # Going to short mode and back again did indeed matter. Since short mode is
58514       # case insensitive, let's make it lowercase to improve readability.
58515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58516       # Now convert it back to Unix-style (cygpath)
58517       input_path=`$CYGPATH -u "$shortmode_path"`
58518       new_path="$input_path"
58519     fi
58520   fi
58521 
58522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58523   if test "x$test_cygdrive_prefix" = x; then
58524     # As a simple fix, exclude /usr/bin since it's not a real path.
58525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58527       # a path prefixed by /cygdrive for fixpath to work.
58528       new_path="$CYGWIN_ROOT_PATH$input_path"
58529     fi
58530   fi
58531 
58532 
58533   if test "x$path" != "x$new_path"; then
58534     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58536 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58537   fi
58538 
58539     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58540 
58541   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58542   has_colon=`$ECHO $path | $GREP ^.:`
58543   new_path="$path"
58544   if test "x$has_colon" = x; then
58545     # Not in mixed or Windows style, start by that.
58546     new_path=`cmd //c echo $path`
58547   fi
58548 
58549 
58550   input_path="$new_path"
58551   # Check if we need to convert this using DOS-style short mode. If the path
58552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58553   # take no chances and rewrite it.
58554   # Note: m4 eats our [], so we need to use [ and ] instead.
58555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58556   if test "x$has_forbidden_chars" != x; then
58557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58559   fi
58560 
58561 
58562   windows_path="$new_path"
58563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58564     unix_path=`$CYGPATH -u "$windows_path"`
58565     new_path="$unix_path"
58566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58568     new_path="$unix_path"
58569   fi
58570 
58571   if test "x$path" != "x$new_path"; then
58572     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58574 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58575   fi
58576 
58577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58579 
58580     else
58581       # We're on a unix platform. Hooray! :)
58582       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58583       has_space=`$ECHO "$path" | $GREP " "`
58584       if test "x$has_space" != x; then
58585         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58586 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58587         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58588       fi
58589 
58590       # Use eval to expand a potential ~
58591       eval path="$path"
58592       if test ! -f "$path" && test ! -d "$path"; then
58593         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58594       fi
58595 
58596       if test -d "$path"; then
58597         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58598       else
58599         dir="`$DIRNAME "$path"`"
58600         base="`$BASENAME "$path"`"
58601         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58602       fi
58603     fi
58604   fi
58605 
58606 
58607   # Only process if variable expands to non-empty
58608 
58609   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58610     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58611 
58612   # Input might be given as Windows format, start by converting to
58613   # unix format.
58614   path="$POTENTIAL_FREETYPE_LIB_PATH"
58615   new_path=`$CYGPATH -u "$path"`
58616 
58617   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58618   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58619   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58620   # "foo.exe" is OK but "foo" is an error.
58621   #
58622   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58623   # It is also a way to make sure we got the proper file name for the real test later on.
58624   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58625   if test "x$test_shortpath" = x; then
58626     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58627 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58628     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58629   fi
58630 
58631   # Call helper function which possibly converts this using DOS-style short mode.
58632   # If so, the updated path is stored in $new_path.
58633 
58634   input_path="$new_path"
58635   # Check if we need to convert this using DOS-style short mode. If the path
58636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58637   # take no chances and rewrite it.
58638   # Note: m4 eats our [], so we need to use [ and ] instead.
58639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58640   if test "x$has_forbidden_chars" != x; then
58641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58645       # Going to short mode and back again did indeed matter. Since short mode is
58646       # case insensitive, let's make it lowercase to improve readability.
58647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58648       # Now convert it back to Unix-style (cygpath)
58649       input_path=`$CYGPATH -u "$shortmode_path"`
58650       new_path="$input_path"
58651     fi
58652   fi
58653 
58654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58655   if test "x$test_cygdrive_prefix" = x; then
58656     # As a simple fix, exclude /usr/bin since it's not a real path.
58657     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58659       # a path prefixed by /cygdrive for fixpath to work.
58660       new_path="$CYGWIN_ROOT_PATH$input_path"
58661     fi
58662   fi
58663 
58664 
58665   if test "x$path" != "x$new_path"; then
58666     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58668 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58669   fi
58670 
58671     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58672 
58673   path="$POTENTIAL_FREETYPE_LIB_PATH"
58674   has_colon=`$ECHO $path | $GREP ^.:`
58675   new_path="$path"
58676   if test "x$has_colon" = x; then
58677     # Not in mixed or Windows style, start by that.
58678     new_path=`cmd //c echo $path`
58679   fi
58680 
58681 
58682   input_path="$new_path"
58683   # Check if we need to convert this using DOS-style short mode. If the path
58684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58685   # take no chances and rewrite it.
58686   # Note: m4 eats our [], so we need to use [ and ] instead.
58687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58688   if test "x$has_forbidden_chars" != x; then
58689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58691   fi
58692 
58693 
58694   windows_path="$new_path"
58695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58696     unix_path=`$CYGPATH -u "$windows_path"`
58697     new_path="$unix_path"
58698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58700     new_path="$unix_path"
58701   fi
58702 
58703   if test "x$path" != "x$new_path"; then
58704     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58706 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58707   fi
58708 
58709   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58710   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58711 
58712     else
58713       # We're on a unix platform. Hooray! :)
58714       path="$POTENTIAL_FREETYPE_LIB_PATH"
58715       has_space=`$ECHO "$path" | $GREP " "`
58716       if test "x$has_space" != x; then
58717         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58718 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58719         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58720       fi
58721 
58722       # Use eval to expand a potential ~
58723       eval path="$path"
58724       if test ! -f "$path" && test ! -d "$path"; then
58725         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58726       fi
58727 
58728       if test -d "$path"; then
58729         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58730       else
58731         dir="`$DIRNAME "$path"`"
58732         base="`$BASENAME "$path"`"
58733         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58734       fi
58735     fi
58736   fi
58737 
58738 
58739     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58741 $as_echo_n "checking for freetype includes... " >&6; }
58742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58743 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58744     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58745     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58746 $as_echo_n "checking for freetype libraries... " >&6; }
58747     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58748 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58749   fi
58750 
58751           fi
58752           if test "x$FOUND_FREETYPE" != xyes; then
58753             FREETYPE_BASE_DIR="$HOME/freetype"
58754 
58755   windows_path="$FREETYPE_BASE_DIR"
58756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58757     unix_path=`$CYGPATH -u "$windows_path"`
58758     FREETYPE_BASE_DIR="$unix_path"
58759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58761     FREETYPE_BASE_DIR="$unix_path"
58762   fi
58763 
58764             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58765 
58766   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58767   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58768   METHOD="well-known location"
58769 
58770   # Let's start with an optimistic view of the world :-)
58771   FOUND_FREETYPE=yes
58772 
58773   # First look for the canonical freetype main include file ft2build.h.
58774   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58775     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58776     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58777     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58778       # Fail.
58779       FOUND_FREETYPE=no
58780     fi
58781   fi
58782 
58783   if test "x$FOUND_FREETYPE" = xyes; then
58784     # Include file found, let's continue the sanity check.
58785     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58786 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58787 
58788     # Reset to default value
58789     FREETYPE_BASE_NAME=freetype
58790     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58791     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58792       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58793           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58794         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58795         # for the .6 version explicitly.
58796         FREETYPE_BASE_NAME=freetype.6
58797         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58798         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58799 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58800       else
58801         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58802 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58803         FOUND_FREETYPE=no
58804       fi
58805     else
58806       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58807         # On Windows, we will need both .lib and .dll file.
58808         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58809           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58810 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58811           FOUND_FREETYPE=no
58812         fi
58813       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58814           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58815         # Found lib in isa dir, use that instead.
58816         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58817         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58818 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58819       fi
58820     fi
58821   fi
58822 
58823   if test "x$FOUND_FREETYPE" = xyes; then
58824 
58825   # Only process if variable expands to non-empty
58826 
58827   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58828     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58829 
58830   # Input might be given as Windows format, start by converting to
58831   # unix format.
58832   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58833   new_path=`$CYGPATH -u "$path"`
58834 
58835   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58836   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58837   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58838   # "foo.exe" is OK but "foo" is an error.
58839   #
58840   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58841   # It is also a way to make sure we got the proper file name for the real test later on.
58842   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58843   if test "x$test_shortpath" = x; then
58844     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58845 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58846     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58847   fi
58848 
58849   # Call helper function which possibly converts this using DOS-style short mode.
58850   # If so, the updated path is stored in $new_path.
58851 
58852   input_path="$new_path"
58853   # Check if we need to convert this using DOS-style short mode. If the path
58854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58855   # take no chances and rewrite it.
58856   # Note: m4 eats our [], so we need to use [ and ] instead.
58857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58858   if test "x$has_forbidden_chars" != x; then
58859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58860     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58861     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58862     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58863       # Going to short mode and back again did indeed matter. Since short mode is
58864       # case insensitive, let's make it lowercase to improve readability.
58865       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58866       # Now convert it back to Unix-style (cygpath)
58867       input_path=`$CYGPATH -u "$shortmode_path"`
58868       new_path="$input_path"
58869     fi
58870   fi
58871 
58872   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58873   if test "x$test_cygdrive_prefix" = x; then
58874     # As a simple fix, exclude /usr/bin since it's not a real path.
58875     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58876       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58877       # a path prefixed by /cygdrive for fixpath to work.
58878       new_path="$CYGWIN_ROOT_PATH$input_path"
58879     fi
58880   fi
58881 
58882 
58883   if test "x$path" != "x$new_path"; then
58884     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58886 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58887   fi
58888 
58889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58890 
58891   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58892   has_colon=`$ECHO $path | $GREP ^.:`
58893   new_path="$path"
58894   if test "x$has_colon" = x; then
58895     # Not in mixed or Windows style, start by that.
58896     new_path=`cmd //c echo $path`
58897   fi
58898 
58899 
58900   input_path="$new_path"
58901   # Check if we need to convert this using DOS-style short mode. If the path
58902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58903   # take no chances and rewrite it.
58904   # Note: m4 eats our [], so we need to use [ and ] instead.
58905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58906   if test "x$has_forbidden_chars" != x; then
58907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58908     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58909   fi
58910 
58911 
58912   windows_path="$new_path"
58913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58914     unix_path=`$CYGPATH -u "$windows_path"`
58915     new_path="$unix_path"
58916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58918     new_path="$unix_path"
58919   fi
58920 
58921   if test "x$path" != "x$new_path"; then
58922     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58924 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58925   fi
58926 
58927   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58928   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58929 
58930     else
58931       # We're on a unix platform. Hooray! :)
58932       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58933       has_space=`$ECHO "$path" | $GREP " "`
58934       if test "x$has_space" != x; then
58935         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58936 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58937         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58938       fi
58939 
58940       # Use eval to expand a potential ~
58941       eval path="$path"
58942       if test ! -f "$path" && test ! -d "$path"; then
58943         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58944       fi
58945 
58946       if test -d "$path"; then
58947         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58948       else
58949         dir="`$DIRNAME "$path"`"
58950         base="`$BASENAME "$path"`"
58951         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58952       fi
58953     fi
58954   fi
58955 
58956 
58957   # Only process if variable expands to non-empty
58958 
58959   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58960     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58961 
58962   # Input might be given as Windows format, start by converting to
58963   # unix format.
58964   path="$POTENTIAL_FREETYPE_LIB_PATH"
58965   new_path=`$CYGPATH -u "$path"`
58966 
58967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58970   # "foo.exe" is OK but "foo" is an error.
58971   #
58972   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58973   # It is also a way to make sure we got the proper file name for the real test later on.
58974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58975   if test "x$test_shortpath" = x; then
58976     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58977 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58978     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58979   fi
58980 
58981   # Call helper function which possibly converts this using DOS-style short mode.
58982   # If so, the updated path is stored in $new_path.
58983 
58984   input_path="$new_path"
58985   # Check if we need to convert this using DOS-style short mode. If the path
58986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58987   # take no chances and rewrite it.
58988   # Note: m4 eats our [], so we need to use [ and ] instead.
58989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58990   if test "x$has_forbidden_chars" != x; then
58991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58995       # Going to short mode and back again did indeed matter. Since short mode is
58996       # case insensitive, let's make it lowercase to improve readability.
58997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58998       # Now convert it back to Unix-style (cygpath)
58999       input_path=`$CYGPATH -u "$shortmode_path"`
59000       new_path="$input_path"
59001     fi
59002   fi
59003 
59004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59005   if test "x$test_cygdrive_prefix" = x; then
59006     # As a simple fix, exclude /usr/bin since it's not a real path.
59007     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59009       # a path prefixed by /cygdrive for fixpath to work.
59010       new_path="$CYGWIN_ROOT_PATH$input_path"
59011     fi
59012   fi
59013 
59014 
59015   if test "x$path" != "x$new_path"; then
59016     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59018 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59019   fi
59020 
59021     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59022 
59023   path="$POTENTIAL_FREETYPE_LIB_PATH"
59024   has_colon=`$ECHO $path | $GREP ^.:`
59025   new_path="$path"
59026   if test "x$has_colon" = x; then
59027     # Not in mixed or Windows style, start by that.
59028     new_path=`cmd //c echo $path`
59029   fi
59030 
59031 
59032   input_path="$new_path"
59033   # Check if we need to convert this using DOS-style short mode. If the path
59034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59035   # take no chances and rewrite it.
59036   # Note: m4 eats our [], so we need to use [ and ] instead.
59037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59038   if test "x$has_forbidden_chars" != x; then
59039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59041   fi
59042 
59043 
59044   windows_path="$new_path"
59045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59046     unix_path=`$CYGPATH -u "$windows_path"`
59047     new_path="$unix_path"
59048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59050     new_path="$unix_path"
59051   fi
59052 
59053   if test "x$path" != "x$new_path"; then
59054     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59056 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59057   fi
59058 
59059   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59060   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59061 
59062     else
59063       # We're on a unix platform. Hooray! :)
59064       path="$POTENTIAL_FREETYPE_LIB_PATH"
59065       has_space=`$ECHO "$path" | $GREP " "`
59066       if test "x$has_space" != x; then
59067         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59068 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59069         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59070       fi
59071 
59072       # Use eval to expand a potential ~
59073       eval path="$path"
59074       if test ! -f "$path" && test ! -d "$path"; then
59075         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59076       fi
59077 
59078       if test -d "$path"; then
59079         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59080       else
59081         dir="`$DIRNAME "$path"`"
59082         base="`$BASENAME "$path"`"
59083         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59084       fi
59085     fi
59086   fi
59087 
59088 
59089     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59091 $as_echo_n "checking for freetype includes... " >&6; }
59092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59093 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59094     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59096 $as_echo_n "checking for freetype libraries... " >&6; }
59097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59098 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59099   fi
59100 
59101             else
59102 
59103   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59104   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59105   METHOD="well-known location"
59106 
59107   # Let's start with an optimistic view of the world :-)
59108   FOUND_FREETYPE=yes
59109 
59110   # First look for the canonical freetype main include file ft2build.h.
59111   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59112     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59113     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59114     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59115       # Fail.
59116       FOUND_FREETYPE=no
59117     fi
59118   fi
59119 
59120   if test "x$FOUND_FREETYPE" = xyes; then
59121     # Include file found, let's continue the sanity check.
59122     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59123 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59124 
59125     # Reset to default value
59126     FREETYPE_BASE_NAME=freetype
59127     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59128     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59129       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59130           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59131         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59132         # for the .6 version explicitly.
59133         FREETYPE_BASE_NAME=freetype.6
59134         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59135         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59136 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59137       else
59138         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59139 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59140         FOUND_FREETYPE=no
59141       fi
59142     else
59143       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59144         # On Windows, we will need both .lib and .dll file.
59145         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59146           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59147 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59148           FOUND_FREETYPE=no
59149         fi
59150       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59151           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59152         # Found lib in isa dir, use that instead.
59153         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59154         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59155 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59156       fi
59157     fi
59158   fi
59159 
59160   if test "x$FOUND_FREETYPE" = xyes; then
59161 
59162   # Only process if variable expands to non-empty
59163 
59164   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59165     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59166 
59167   # Input might be given as Windows format, start by converting to
59168   # unix format.
59169   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59170   new_path=`$CYGPATH -u "$path"`
59171 
59172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59175   # "foo.exe" is OK but "foo" is an error.
59176   #
59177   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59178   # It is also a way to make sure we got the proper file name for the real test later on.
59179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59180   if test "x$test_shortpath" = x; then
59181     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59182 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59183     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59184   fi
59185 
59186   # Call helper function which possibly converts this using DOS-style short mode.
59187   # If so, the updated path is stored in $new_path.
59188 
59189   input_path="$new_path"
59190   # Check if we need to convert this using DOS-style short mode. If the path
59191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59192   # take no chances and rewrite it.
59193   # Note: m4 eats our [], so we need to use [ and ] instead.
59194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59195   if test "x$has_forbidden_chars" != x; then
59196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59197     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59198     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59199     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59200       # Going to short mode and back again did indeed matter. Since short mode is
59201       # case insensitive, let's make it lowercase to improve readability.
59202       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59203       # Now convert it back to Unix-style (cygpath)
59204       input_path=`$CYGPATH -u "$shortmode_path"`
59205       new_path="$input_path"
59206     fi
59207   fi
59208 
59209   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59210   if test "x$test_cygdrive_prefix" = x; then
59211     # As a simple fix, exclude /usr/bin since it's not a real path.
59212     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59213       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59214       # a path prefixed by /cygdrive for fixpath to work.
59215       new_path="$CYGWIN_ROOT_PATH$input_path"
59216     fi
59217   fi
59218 
59219 
59220   if test "x$path" != "x$new_path"; then
59221     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59222     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59223 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59224   fi
59225 
59226     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59227 
59228   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59229   has_colon=`$ECHO $path | $GREP ^.:`
59230   new_path="$path"
59231   if test "x$has_colon" = x; then
59232     # Not in mixed or Windows style, start by that.
59233     new_path=`cmd //c echo $path`
59234   fi
59235 
59236 
59237   input_path="$new_path"
59238   # Check if we need to convert this using DOS-style short mode. If the path
59239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59240   # take no chances and rewrite it.
59241   # Note: m4 eats our [], so we need to use [ and ] instead.
59242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59243   if test "x$has_forbidden_chars" != x; then
59244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59246   fi
59247 
59248 
59249   windows_path="$new_path"
59250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59251     unix_path=`$CYGPATH -u "$windows_path"`
59252     new_path="$unix_path"
59253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59255     new_path="$unix_path"
59256   fi
59257 
59258   if test "x$path" != "x$new_path"; then
59259     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59261 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59262   fi
59263 
59264   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59265   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59266 
59267     else
59268       # We're on a unix platform. Hooray! :)
59269       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59270       has_space=`$ECHO "$path" | $GREP " "`
59271       if test "x$has_space" != x; then
59272         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59273 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59274         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59275       fi
59276 
59277       # Use eval to expand a potential ~
59278       eval path="$path"
59279       if test ! -f "$path" && test ! -d "$path"; then
59280         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59281       fi
59282 
59283       if test -d "$path"; then
59284         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59285       else
59286         dir="`$DIRNAME "$path"`"
59287         base="`$BASENAME "$path"`"
59288         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59289       fi
59290     fi
59291   fi
59292 
59293 
59294   # Only process if variable expands to non-empty
59295 
59296   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59297     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59298 
59299   # Input might be given as Windows format, start by converting to
59300   # unix format.
59301   path="$POTENTIAL_FREETYPE_LIB_PATH"
59302   new_path=`$CYGPATH -u "$path"`
59303 
59304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59307   # "foo.exe" is OK but "foo" is an error.
59308   #
59309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59310   # It is also a way to make sure we got the proper file name for the real test later on.
59311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59312   if test "x$test_shortpath" = x; then
59313     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59314 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59315     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59316   fi
59317 
59318   # Call helper function which possibly converts this using DOS-style short mode.
59319   # If so, the updated path is stored in $new_path.
59320 
59321   input_path="$new_path"
59322   # Check if we need to convert this using DOS-style short mode. If the path
59323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59324   # take no chances and rewrite it.
59325   # Note: m4 eats our [], so we need to use [ and ] instead.
59326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59327   if test "x$has_forbidden_chars" != x; then
59328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59332       # Going to short mode and back again did indeed matter. Since short mode is
59333       # case insensitive, let's make it lowercase to improve readability.
59334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59335       # Now convert it back to Unix-style (cygpath)
59336       input_path=`$CYGPATH -u "$shortmode_path"`
59337       new_path="$input_path"
59338     fi
59339   fi
59340 
59341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59342   if test "x$test_cygdrive_prefix" = x; then
59343     # As a simple fix, exclude /usr/bin since it's not a real path.
59344     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59346       # a path prefixed by /cygdrive for fixpath to work.
59347       new_path="$CYGWIN_ROOT_PATH$input_path"
59348     fi
59349   fi
59350 
59351 
59352   if test "x$path" != "x$new_path"; then
59353     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59355 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59356   fi
59357 
59358     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59359 
59360   path="$POTENTIAL_FREETYPE_LIB_PATH"
59361   has_colon=`$ECHO $path | $GREP ^.:`
59362   new_path="$path"
59363   if test "x$has_colon" = x; then
59364     # Not in mixed or Windows style, start by that.
59365     new_path=`cmd //c echo $path`
59366   fi
59367 
59368 
59369   input_path="$new_path"
59370   # Check if we need to convert this using DOS-style short mode. If the path
59371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59372   # take no chances and rewrite it.
59373   # Note: m4 eats our [], so we need to use [ and ] instead.
59374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59375   if test "x$has_forbidden_chars" != x; then
59376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59378   fi
59379 
59380 
59381   windows_path="$new_path"
59382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59383     unix_path=`$CYGPATH -u "$windows_path"`
59384     new_path="$unix_path"
59385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59387     new_path="$unix_path"
59388   fi
59389 
59390   if test "x$path" != "x$new_path"; then
59391     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59393 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59394   fi
59395 
59396   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59397   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59398 
59399     else
59400       # We're on a unix platform. Hooray! :)
59401       path="$POTENTIAL_FREETYPE_LIB_PATH"
59402       has_space=`$ECHO "$path" | $GREP " "`
59403       if test "x$has_space" != x; then
59404         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59405 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59406         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59407       fi
59408 
59409       # Use eval to expand a potential ~
59410       eval path="$path"
59411       if test ! -f "$path" && test ! -d "$path"; then
59412         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59413       fi
59414 
59415       if test -d "$path"; then
59416         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59417       else
59418         dir="`$DIRNAME "$path"`"
59419         base="`$BASENAME "$path"`"
59420         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59421       fi
59422     fi
59423   fi
59424 
59425 
59426     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59428 $as_echo_n "checking for freetype includes... " >&6; }
59429     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59430 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59431     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59432     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59433 $as_echo_n "checking for freetype libraries... " >&6; }
59434     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59435 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59436   fi
59437 
59438             fi
59439             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59440                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59441               # Source is available, as a last resort try to build freetype in default location
59442 
59443   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59444   BUILD_FREETYPE=yes
59445 
59446   # Check if the freetype sources are acessible..
59447   if ! test -d $FREETYPE_SRC_PATH; then
59448     { $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
59449 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59450     BUILD_FREETYPE=no
59451   fi
59452   # ..and contain a vc2010 project file
59453   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59454   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59455     { $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
59456 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59457     BUILD_FREETYPE=no
59458   fi
59459   # Now check if configure found a version of 'msbuild.exe'
59460   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59461     { $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
59462 $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;}
59463     BUILD_FREETYPE=no
59464   fi
59465 
59466   # Ready to go..
59467   if test "x$BUILD_FREETYPE" = xyes; then
59468     # msbuild requires trailing slashes for output directories
59469     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59470     freetype_lib_path_unix="$freetype_lib_path"
59471     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59472 
59473   unix_path="$vcxproj_path"
59474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59475     windows_path=`$CYGPATH -m "$unix_path"`
59476     vcxproj_path="$windows_path"
59477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59478     windows_path=`cmd //c echo $unix_path`
59479     vcxproj_path="$windows_path"
59480   fi
59481 
59482 
59483   unix_path="$freetype_lib_path"
59484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59485     windows_path=`$CYGPATH -m "$unix_path"`
59486     freetype_lib_path="$windows_path"
59487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59488     windows_path=`cmd //c echo $unix_path`
59489     freetype_lib_path="$windows_path"
59490   fi
59491 
59492 
59493   unix_path="$freetype_obj_path"
59494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59495     windows_path=`$CYGPATH -m "$unix_path"`
59496     freetype_obj_path="$windows_path"
59497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59498     windows_path=`cmd //c echo $unix_path`
59499     freetype_obj_path="$windows_path"
59500   fi
59501 
59502     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59503       freetype_platform=x64
59504     else
59505       freetype_platform=win32
59506     fi
59507 
59508     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59509     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59510     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59511     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59512     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59513 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59514 
59515     # First we try to build the freetype.dll
59516     $ECHO -e "@echo off\n"\
59517         "$MSBUILD $vcxproj_path "\
59518         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59519         "/p:Configuration=\"Release Multithreaded\" "\
59520         "/p:Platform=$freetype_platform "\
59521         "/p:ConfigurationType=DynamicLibrary "\
59522         "/p:TargetName=freetype "\
59523         "/p:OutDir=\"$freetype_lib_path\" "\
59524         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59525     cmd /c freetype.bat
59526 
59527     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59528       # If that succeeds we also build freetype.lib
59529       $ECHO -e "@echo off\n"\
59530           "$MSBUILD $vcxproj_path "\
59531           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59532           "/p:Configuration=\"Release Multithreaded\" "\
59533           "/p:Platform=$freetype_platform "\
59534           "/p:ConfigurationType=StaticLibrary "\
59535           "/p:TargetName=freetype "\
59536           "/p:OutDir=\"$freetype_lib_path\" "\
59537           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59538       cmd /c freetype.bat
59539 
59540       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59541         # Once we build both, lib and dll, set freetype lib and include path appropriately
59542         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59543         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59544         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59545 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59546       else
59547         BUILD_FREETYPE=no
59548       fi
59549     else
59550       BUILD_FREETYPE=no
59551     fi
59552   fi
59553 
59554               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59555 
59556   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59557   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59558   METHOD="well-known location"
59559 
59560   # Let's start with an optimistic view of the world :-)
59561   FOUND_FREETYPE=yes
59562 
59563   # First look for the canonical freetype main include file ft2build.h.
59564   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59565     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59566     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59567     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59568       # Fail.
59569       FOUND_FREETYPE=no
59570     fi
59571   fi
59572 
59573   if test "x$FOUND_FREETYPE" = xyes; then
59574     # Include file found, let's continue the sanity check.
59575     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59576 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59577 
59578     # Reset to default value
59579     FREETYPE_BASE_NAME=freetype
59580     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59581     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59582       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59583           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59584         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59585         # for the .6 version explicitly.
59586         FREETYPE_BASE_NAME=freetype.6
59587         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59588         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59589 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59590       else
59591         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59592 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59593         FOUND_FREETYPE=no
59594       fi
59595     else
59596       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59597         # On Windows, we will need both .lib and .dll file.
59598         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59599           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59600 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59601           FOUND_FREETYPE=no
59602         fi
59603       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59604           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59605         # Found lib in isa dir, use that instead.
59606         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59607         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59608 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59609       fi
59610     fi
59611   fi
59612 
59613   if test "x$FOUND_FREETYPE" = xyes; then
59614 
59615   # Only process if variable expands to non-empty
59616 
59617   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59618     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59619 
59620   # Input might be given as Windows format, start by converting to
59621   # unix format.
59622   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59623   new_path=`$CYGPATH -u "$path"`
59624 
59625   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59626   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59627   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59628   # "foo.exe" is OK but "foo" is an error.
59629   #
59630   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59631   # It is also a way to make sure we got the proper file name for the real test later on.
59632   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59633   if test "x$test_shortpath" = x; then
59634     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59635 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59636     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59637   fi
59638 
59639   # Call helper function which possibly converts this using DOS-style short mode.
59640   # If so, the updated path is stored in $new_path.
59641 
59642   input_path="$new_path"
59643   # Check if we need to convert this using DOS-style short mode. If the path
59644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59645   # take no chances and rewrite it.
59646   # Note: m4 eats our [], so we need to use [ and ] instead.
59647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59648   if test "x$has_forbidden_chars" != x; then
59649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59650     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59653       # Going to short mode and back again did indeed matter. Since short mode is
59654       # case insensitive, let's make it lowercase to improve readability.
59655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59656       # Now convert it back to Unix-style (cygpath)
59657       input_path=`$CYGPATH -u "$shortmode_path"`
59658       new_path="$input_path"
59659     fi
59660   fi
59661 
59662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59663   if test "x$test_cygdrive_prefix" = x; then
59664     # As a simple fix, exclude /usr/bin since it's not a real path.
59665     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59667       # a path prefixed by /cygdrive for fixpath to work.
59668       new_path="$CYGWIN_ROOT_PATH$input_path"
59669     fi
59670   fi
59671 
59672 
59673   if test "x$path" != "x$new_path"; then
59674     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59675     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59676 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59677   fi
59678 
59679     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59680 
59681   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59682   has_colon=`$ECHO $path | $GREP ^.:`
59683   new_path="$path"
59684   if test "x$has_colon" = x; then
59685     # Not in mixed or Windows style, start by that.
59686     new_path=`cmd //c echo $path`
59687   fi
59688 
59689 
59690   input_path="$new_path"
59691   # Check if we need to convert this using DOS-style short mode. If the path
59692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59693   # take no chances and rewrite it.
59694   # Note: m4 eats our [], so we need to use [ and ] instead.
59695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59696   if test "x$has_forbidden_chars" != x; then
59697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59698     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59699   fi
59700 
59701 
59702   windows_path="$new_path"
59703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59704     unix_path=`$CYGPATH -u "$windows_path"`
59705     new_path="$unix_path"
59706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59708     new_path="$unix_path"
59709   fi
59710 
59711   if test "x$path" != "x$new_path"; then
59712     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59714 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59715   fi
59716 
59717   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59718   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59719 
59720     else
59721       # We're on a unix platform. Hooray! :)
59722       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59723       has_space=`$ECHO "$path" | $GREP " "`
59724       if test "x$has_space" != x; then
59725         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59726 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59727         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59728       fi
59729 
59730       # Use eval to expand a potential ~
59731       eval path="$path"
59732       if test ! -f "$path" && test ! -d "$path"; then
59733         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59734       fi
59735 
59736       if test -d "$path"; then
59737         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59738       else
59739         dir="`$DIRNAME "$path"`"
59740         base="`$BASENAME "$path"`"
59741         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59742       fi
59743     fi
59744   fi
59745 
59746 
59747   # Only process if variable expands to non-empty
59748 
59749   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59750     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59751 
59752   # Input might be given as Windows format, start by converting to
59753   # unix format.
59754   path="$POTENTIAL_FREETYPE_LIB_PATH"
59755   new_path=`$CYGPATH -u "$path"`
59756 
59757   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59758   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59759   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59760   # "foo.exe" is OK but "foo" is an error.
59761   #
59762   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59763   # It is also a way to make sure we got the proper file name for the real test later on.
59764   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59765   if test "x$test_shortpath" = x; then
59766     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59767 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59768     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59769   fi
59770 
59771   # Call helper function which possibly converts this using DOS-style short mode.
59772   # If so, the updated path is stored in $new_path.
59773 
59774   input_path="$new_path"
59775   # Check if we need to convert this using DOS-style short mode. If the path
59776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59777   # take no chances and rewrite it.
59778   # Note: m4 eats our [], so we need to use [ and ] instead.
59779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59780   if test "x$has_forbidden_chars" != x; then
59781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59782     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59783     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59784     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59785       # Going to short mode and back again did indeed matter. Since short mode is
59786       # case insensitive, let's make it lowercase to improve readability.
59787       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59788       # Now convert it back to Unix-style (cygpath)
59789       input_path=`$CYGPATH -u "$shortmode_path"`
59790       new_path="$input_path"
59791     fi
59792   fi
59793 
59794   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59795   if test "x$test_cygdrive_prefix" = x; then
59796     # As a simple fix, exclude /usr/bin since it's not a real path.
59797     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59798       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59799       # a path prefixed by /cygdrive for fixpath to work.
59800       new_path="$CYGWIN_ROOT_PATH$input_path"
59801     fi
59802   fi
59803 
59804 
59805   if test "x$path" != "x$new_path"; then
59806     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59808 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59809   fi
59810 
59811     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59812 
59813   path="$POTENTIAL_FREETYPE_LIB_PATH"
59814   has_colon=`$ECHO $path | $GREP ^.:`
59815   new_path="$path"
59816   if test "x$has_colon" = x; then
59817     # Not in mixed or Windows style, start by that.
59818     new_path=`cmd //c echo $path`
59819   fi
59820 
59821 
59822   input_path="$new_path"
59823   # Check if we need to convert this using DOS-style short mode. If the path
59824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59825   # take no chances and rewrite it.
59826   # Note: m4 eats our [], so we need to use [ and ] instead.
59827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59828   if test "x$has_forbidden_chars" != x; then
59829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59830     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59831   fi
59832 
59833 
59834   windows_path="$new_path"
59835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59836     unix_path=`$CYGPATH -u "$windows_path"`
59837     new_path="$unix_path"
59838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59840     new_path="$unix_path"
59841   fi
59842 
59843   if test "x$path" != "x$new_path"; then
59844     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59846 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59847   fi
59848 
59849   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59850   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59851 
59852     else
59853       # We're on a unix platform. Hooray! :)
59854       path="$POTENTIAL_FREETYPE_LIB_PATH"
59855       has_space=`$ECHO "$path" | $GREP " "`
59856       if test "x$has_space" != x; then
59857         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59858 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59859         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59860       fi
59861 
59862       # Use eval to expand a potential ~
59863       eval path="$path"
59864       if test ! -f "$path" && test ! -d "$path"; then
59865         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59866       fi
59867 
59868       if test -d "$path"; then
59869         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59870       else
59871         dir="`$DIRNAME "$path"`"
59872         base="`$BASENAME "$path"`"
59873         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59874       fi
59875     fi
59876   fi
59877 
59878 
59879     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59881 $as_echo_n "checking for freetype includes... " >&6; }
59882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59883 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59884     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59885     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59886 $as_echo_n "checking for freetype libraries... " >&6; }
59887     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59888 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59889   fi
59890 
59891               else
59892 
59893   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59894   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59895   METHOD="well-known location"
59896 
59897   # Let's start with an optimistic view of the world :-)
59898   FOUND_FREETYPE=yes
59899 
59900   # First look for the canonical freetype main include file ft2build.h.
59901   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59902     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59903     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59904     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59905       # Fail.
59906       FOUND_FREETYPE=no
59907     fi
59908   fi
59909 
59910   if test "x$FOUND_FREETYPE" = xyes; then
59911     # Include file found, let's continue the sanity check.
59912     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59913 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59914 
59915     # Reset to default value
59916     FREETYPE_BASE_NAME=freetype
59917     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59918     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59919       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59920           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59921         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59922         # for the .6 version explicitly.
59923         FREETYPE_BASE_NAME=freetype.6
59924         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59925         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59926 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59927       else
59928         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59929 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59930         FOUND_FREETYPE=no
59931       fi
59932     else
59933       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59934         # On Windows, we will need both .lib and .dll file.
59935         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59936           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59937 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59938           FOUND_FREETYPE=no
59939         fi
59940       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59941           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59942         # Found lib in isa dir, use that instead.
59943         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59944         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59945 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59946       fi
59947     fi
59948   fi
59949 
59950   if test "x$FOUND_FREETYPE" = xyes; then
59951 
59952   # Only process if variable expands to non-empty
59953 
59954   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59955     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59956 
59957   # Input might be given as Windows format, start by converting to
59958   # unix format.
59959   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59960   new_path=`$CYGPATH -u "$path"`
59961 
59962   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59963   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59964   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59965   # "foo.exe" is OK but "foo" is an error.
59966   #
59967   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59968   # It is also a way to make sure we got the proper file name for the real test later on.
59969   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59970   if test "x$test_shortpath" = x; then
59971     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59972 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59973     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59974   fi
59975 
59976   # Call helper function which possibly converts this using DOS-style short mode.
59977   # If so, the updated path is stored in $new_path.
59978 
59979   input_path="$new_path"
59980   # Check if we need to convert this using DOS-style short mode. If the path
59981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59982   # take no chances and rewrite it.
59983   # Note: m4 eats our [], so we need to use [ and ] instead.
59984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59985   if test "x$has_forbidden_chars" != x; then
59986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59987     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59988     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59989     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59990       # Going to short mode and back again did indeed matter. Since short mode is
59991       # case insensitive, let's make it lowercase to improve readability.
59992       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59993       # Now convert it back to Unix-style (cygpath)
59994       input_path=`$CYGPATH -u "$shortmode_path"`
59995       new_path="$input_path"
59996     fi
59997   fi
59998 
59999   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60000   if test "x$test_cygdrive_prefix" = x; then
60001     # As a simple fix, exclude /usr/bin since it's not a real path.
60002     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60003       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60004       # a path prefixed by /cygdrive for fixpath to work.
60005       new_path="$CYGWIN_ROOT_PATH$input_path"
60006     fi
60007   fi
60008 
60009 
60010   if test "x$path" != "x$new_path"; then
60011     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60012     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60013 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60014   fi
60015 
60016     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60017 
60018   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60019   has_colon=`$ECHO $path | $GREP ^.:`
60020   new_path="$path"
60021   if test "x$has_colon" = x; then
60022     # Not in mixed or Windows style, start by that.
60023     new_path=`cmd //c echo $path`
60024   fi
60025 
60026 
60027   input_path="$new_path"
60028   # Check if we need to convert this using DOS-style short mode. If the path
60029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60030   # take no chances and rewrite it.
60031   # Note: m4 eats our [], so we need to use [ and ] instead.
60032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60033   if test "x$has_forbidden_chars" != x; then
60034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60036   fi
60037 
60038 
60039   windows_path="$new_path"
60040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60041     unix_path=`$CYGPATH -u "$windows_path"`
60042     new_path="$unix_path"
60043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60045     new_path="$unix_path"
60046   fi
60047 
60048   if test "x$path" != "x$new_path"; then
60049     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60051 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60052   fi
60053 
60054   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60055   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60056 
60057     else
60058       # We're on a unix platform. Hooray! :)
60059       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60060       has_space=`$ECHO "$path" | $GREP " "`
60061       if test "x$has_space" != x; then
60062         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60063 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60064         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60065       fi
60066 
60067       # Use eval to expand a potential ~
60068       eval path="$path"
60069       if test ! -f "$path" && test ! -d "$path"; then
60070         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60071       fi
60072 
60073       if test -d "$path"; then
60074         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60075       else
60076         dir="`$DIRNAME "$path"`"
60077         base="`$BASENAME "$path"`"
60078         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60079       fi
60080     fi
60081   fi
60082 
60083 
60084   # Only process if variable expands to non-empty
60085 
60086   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60087     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60088 
60089   # Input might be given as Windows format, start by converting to
60090   # unix format.
60091   path="$POTENTIAL_FREETYPE_LIB_PATH"
60092   new_path=`$CYGPATH -u "$path"`
60093 
60094   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60095   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60096   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60097   # "foo.exe" is OK but "foo" is an error.
60098   #
60099   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60100   # It is also a way to make sure we got the proper file name for the real test later on.
60101   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60102   if test "x$test_shortpath" = x; then
60103     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60104 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60105     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60106   fi
60107 
60108   # Call helper function which possibly converts this using DOS-style short mode.
60109   # If so, the updated path is stored in $new_path.
60110 
60111   input_path="$new_path"
60112   # Check if we need to convert this using DOS-style short mode. If the path
60113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60114   # take no chances and rewrite it.
60115   # Note: m4 eats our [], so we need to use [ and ] instead.
60116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60117   if test "x$has_forbidden_chars" != x; then
60118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60122       # Going to short mode and back again did indeed matter. Since short mode is
60123       # case insensitive, let's make it lowercase to improve readability.
60124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60125       # Now convert it back to Unix-style (cygpath)
60126       input_path=`$CYGPATH -u "$shortmode_path"`
60127       new_path="$input_path"
60128     fi
60129   fi
60130 
60131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60132   if test "x$test_cygdrive_prefix" = x; then
60133     # As a simple fix, exclude /usr/bin since it's not a real path.
60134     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60136       # a path prefixed by /cygdrive for fixpath to work.
60137       new_path="$CYGWIN_ROOT_PATH$input_path"
60138     fi
60139   fi
60140 
60141 
60142   if test "x$path" != "x$new_path"; then
60143     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60145 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60146   fi
60147 
60148     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60149 
60150   path="$POTENTIAL_FREETYPE_LIB_PATH"
60151   has_colon=`$ECHO $path | $GREP ^.:`
60152   new_path="$path"
60153   if test "x$has_colon" = x; then
60154     # Not in mixed or Windows style, start by that.
60155     new_path=`cmd //c echo $path`
60156   fi
60157 
60158 
60159   input_path="$new_path"
60160   # Check if we need to convert this using DOS-style short mode. If the path
60161   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60162   # take no chances and rewrite it.
60163   # Note: m4 eats our [], so we need to use [ and ] instead.
60164   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60165   if test "x$has_forbidden_chars" != x; then
60166     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60167     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60168   fi
60169 
60170 
60171   windows_path="$new_path"
60172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60173     unix_path=`$CYGPATH -u "$windows_path"`
60174     new_path="$unix_path"
60175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60177     new_path="$unix_path"
60178   fi
60179 
60180   if test "x$path" != "x$new_path"; then
60181     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60183 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60184   fi
60185 
60186   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60187   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60188 
60189     else
60190       # We're on a unix platform. Hooray! :)
60191       path="$POTENTIAL_FREETYPE_LIB_PATH"
60192       has_space=`$ECHO "$path" | $GREP " "`
60193       if test "x$has_space" != x; then
60194         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60195 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60196         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60197       fi
60198 
60199       # Use eval to expand a potential ~
60200       eval path="$path"
60201       if test ! -f "$path" && test ! -d "$path"; then
60202         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60203       fi
60204 
60205       if test -d "$path"; then
60206         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60207       else
60208         dir="`$DIRNAME "$path"`"
60209         base="`$BASENAME "$path"`"
60210         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60211       fi
60212     fi
60213   fi
60214 
60215 
60216     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60218 $as_echo_n "checking for freetype includes... " >&6; }
60219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60220 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60221     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60222     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60223 $as_echo_n "checking for freetype libraries... " >&6; }
60224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60225 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60226   fi
60227 
60228               fi
60229             fi
60230           fi
60231         else
60232           FREETYPE_BASE_DIR="$SYSROOT/usr"
60233 
60234   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60235   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60236   METHOD="well-known location"
60237 
60238   # Let's start with an optimistic view of the world :-)
60239   FOUND_FREETYPE=yes
60240 
60241   # First look for the canonical freetype main include file ft2build.h.
60242   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60243     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60244     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60245     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60246       # Fail.
60247       FOUND_FREETYPE=no
60248     fi
60249   fi
60250 
60251   if test "x$FOUND_FREETYPE" = xyes; then
60252     # Include file found, let's continue the sanity check.
60253     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60254 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60255 
60256     # Reset to default value
60257     FREETYPE_BASE_NAME=freetype
60258     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60259     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60260       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60261           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60262         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60263         # for the .6 version explicitly.
60264         FREETYPE_BASE_NAME=freetype.6
60265         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60266         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60267 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60268       else
60269         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60270 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60271         FOUND_FREETYPE=no
60272       fi
60273     else
60274       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60275         # On Windows, we will need both .lib and .dll file.
60276         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60277           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60278 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60279           FOUND_FREETYPE=no
60280         fi
60281       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60282           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60283         # Found lib in isa dir, use that instead.
60284         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60285         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60286 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60287       fi
60288     fi
60289   fi
60290 
60291   if test "x$FOUND_FREETYPE" = xyes; then
60292 
60293   # Only process if variable expands to non-empty
60294 
60295   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60296     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60297 
60298   # Input might be given as Windows format, start by converting to
60299   # unix format.
60300   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60301   new_path=`$CYGPATH -u "$path"`
60302 
60303   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60304   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60305   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60306   # "foo.exe" is OK but "foo" is an error.
60307   #
60308   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60309   # It is also a way to make sure we got the proper file name for the real test later on.
60310   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60311   if test "x$test_shortpath" = x; then
60312     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60313 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60314     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60315   fi
60316 
60317   # Call helper function which possibly converts this using DOS-style short mode.
60318   # If so, the updated path is stored in $new_path.
60319 
60320   input_path="$new_path"
60321   # Check if we need to convert this using DOS-style short mode. If the path
60322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60323   # take no chances and rewrite it.
60324   # Note: m4 eats our [], so we need to use [ and ] instead.
60325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60326   if test "x$has_forbidden_chars" != x; then
60327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60331       # Going to short mode and back again did indeed matter. Since short mode is
60332       # case insensitive, let's make it lowercase to improve readability.
60333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60334       # Now convert it back to Unix-style (cygpath)
60335       input_path=`$CYGPATH -u "$shortmode_path"`
60336       new_path="$input_path"
60337     fi
60338   fi
60339 
60340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60341   if test "x$test_cygdrive_prefix" = x; then
60342     # As a simple fix, exclude /usr/bin since it's not a real path.
60343     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60345       # a path prefixed by /cygdrive for fixpath to work.
60346       new_path="$CYGWIN_ROOT_PATH$input_path"
60347     fi
60348   fi
60349 
60350 
60351   if test "x$path" != "x$new_path"; then
60352     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60354 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60355   fi
60356 
60357     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60358 
60359   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60360   has_colon=`$ECHO $path | $GREP ^.:`
60361   new_path="$path"
60362   if test "x$has_colon" = x; then
60363     # Not in mixed or Windows style, start by that.
60364     new_path=`cmd //c echo $path`
60365   fi
60366 
60367 
60368   input_path="$new_path"
60369   # Check if we need to convert this using DOS-style short mode. If the path
60370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60371   # take no chances and rewrite it.
60372   # Note: m4 eats our [], so we need to use [ and ] instead.
60373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60374   if test "x$has_forbidden_chars" != x; then
60375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60376     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60377   fi
60378 
60379 
60380   windows_path="$new_path"
60381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60382     unix_path=`$CYGPATH -u "$windows_path"`
60383     new_path="$unix_path"
60384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60386     new_path="$unix_path"
60387   fi
60388 
60389   if test "x$path" != "x$new_path"; then
60390     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60392 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60393   fi
60394 
60395   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60396   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60397 
60398     else
60399       # We're on a unix platform. Hooray! :)
60400       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60401       has_space=`$ECHO "$path" | $GREP " "`
60402       if test "x$has_space" != x; then
60403         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60404 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60405         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60406       fi
60407 
60408       # Use eval to expand a potential ~
60409       eval path="$path"
60410       if test ! -f "$path" && test ! -d "$path"; then
60411         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60412       fi
60413 
60414       if test -d "$path"; then
60415         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60416       else
60417         dir="`$DIRNAME "$path"`"
60418         base="`$BASENAME "$path"`"
60419         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60420       fi
60421     fi
60422   fi
60423 
60424 
60425   # Only process if variable expands to non-empty
60426 
60427   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60428     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60429 
60430   # Input might be given as Windows format, start by converting to
60431   # unix format.
60432   path="$POTENTIAL_FREETYPE_LIB_PATH"
60433   new_path=`$CYGPATH -u "$path"`
60434 
60435   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60436   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60437   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60438   # "foo.exe" is OK but "foo" is an error.
60439   #
60440   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60441   # It is also a way to make sure we got the proper file name for the real test later on.
60442   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60443   if test "x$test_shortpath" = x; then
60444     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60445 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60446     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60447   fi
60448 
60449   # Call helper function which possibly converts this using DOS-style short mode.
60450   # If so, the updated path is stored in $new_path.
60451 
60452   input_path="$new_path"
60453   # Check if we need to convert this using DOS-style short mode. If the path
60454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60455   # take no chances and rewrite it.
60456   # Note: m4 eats our [], so we need to use [ and ] instead.
60457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60458   if test "x$has_forbidden_chars" != x; then
60459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60463       # Going to short mode and back again did indeed matter. Since short mode is
60464       # case insensitive, let's make it lowercase to improve readability.
60465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60466       # Now convert it back to Unix-style (cygpath)
60467       input_path=`$CYGPATH -u "$shortmode_path"`
60468       new_path="$input_path"
60469     fi
60470   fi
60471 
60472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60473   if test "x$test_cygdrive_prefix" = x; then
60474     # As a simple fix, exclude /usr/bin since it's not a real path.
60475     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60477       # a path prefixed by /cygdrive for fixpath to work.
60478       new_path="$CYGWIN_ROOT_PATH$input_path"
60479     fi
60480   fi
60481 
60482 
60483   if test "x$path" != "x$new_path"; then
60484     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60486 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60487   fi
60488 
60489     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60490 
60491   path="$POTENTIAL_FREETYPE_LIB_PATH"
60492   has_colon=`$ECHO $path | $GREP ^.:`
60493   new_path="$path"
60494   if test "x$has_colon" = x; then
60495     # Not in mixed or Windows style, start by that.
60496     new_path=`cmd //c echo $path`
60497   fi
60498 
60499 
60500   input_path="$new_path"
60501   # Check if we need to convert this using DOS-style short mode. If the path
60502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60503   # take no chances and rewrite it.
60504   # Note: m4 eats our [], so we need to use [ and ] instead.
60505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60506   if test "x$has_forbidden_chars" != x; then
60507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60508     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60509   fi
60510 
60511 
60512   windows_path="$new_path"
60513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60514     unix_path=`$CYGPATH -u "$windows_path"`
60515     new_path="$unix_path"
60516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60518     new_path="$unix_path"
60519   fi
60520 
60521   if test "x$path" != "x$new_path"; then
60522     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60523     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60524 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60525   fi
60526 
60527   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60528   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60529 
60530     else
60531       # We're on a unix platform. Hooray! :)
60532       path="$POTENTIAL_FREETYPE_LIB_PATH"
60533       has_space=`$ECHO "$path" | $GREP " "`
60534       if test "x$has_space" != x; then
60535         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60536 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60537         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60538       fi
60539 
60540       # Use eval to expand a potential ~
60541       eval path="$path"
60542       if test ! -f "$path" && test ! -d "$path"; then
60543         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60544       fi
60545 
60546       if test -d "$path"; then
60547         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60548       else
60549         dir="`$DIRNAME "$path"`"
60550         base="`$BASENAME "$path"`"
60551         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60552       fi
60553     fi
60554   fi
60555 
60556 
60557     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60558     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60559 $as_echo_n "checking for freetype includes... " >&6; }
60560     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60561 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60562     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60564 $as_echo_n "checking for freetype libraries... " >&6; }
60565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60566 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60567   fi
60568 
60569 
60570           if test "x$FOUND_FREETYPE" != xyes; then
60571             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60572 
60573   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60574   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60575   METHOD="well-known location"
60576 
60577   # Let's start with an optimistic view of the world :-)
60578   FOUND_FREETYPE=yes
60579 
60580   # First look for the canonical freetype main include file ft2build.h.
60581   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60582     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60583     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60584     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60585       # Fail.
60586       FOUND_FREETYPE=no
60587     fi
60588   fi
60589 
60590   if test "x$FOUND_FREETYPE" = xyes; then
60591     # Include file found, let's continue the sanity check.
60592     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60593 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60594 
60595     # Reset to default value
60596     FREETYPE_BASE_NAME=freetype
60597     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60598     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60599       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60600           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60601         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60602         # for the .6 version explicitly.
60603         FREETYPE_BASE_NAME=freetype.6
60604         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60605         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60606 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60607       else
60608         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60609 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60610         FOUND_FREETYPE=no
60611       fi
60612     else
60613       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60614         # On Windows, we will need both .lib and .dll file.
60615         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60616           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60617 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60618           FOUND_FREETYPE=no
60619         fi
60620       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60621           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60622         # Found lib in isa dir, use that instead.
60623         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60624         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60625 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60626       fi
60627     fi
60628   fi
60629 
60630   if test "x$FOUND_FREETYPE" = xyes; then
60631 
60632   # Only process if variable expands to non-empty
60633 
60634   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60635     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60636 
60637   # Input might be given as Windows format, start by converting to
60638   # unix format.
60639   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60640   new_path=`$CYGPATH -u "$path"`
60641 
60642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60645   # "foo.exe" is OK but "foo" is an error.
60646   #
60647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60648   # It is also a way to make sure we got the proper file name for the real test later on.
60649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60650   if test "x$test_shortpath" = x; then
60651     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60652 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60653     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60654   fi
60655 
60656   # Call helper function which possibly converts this using DOS-style short mode.
60657   # If so, the updated path is stored in $new_path.
60658 
60659   input_path="$new_path"
60660   # Check if we need to convert this using DOS-style short mode. If the path
60661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60662   # take no chances and rewrite it.
60663   # Note: m4 eats our [], so we need to use [ and ] instead.
60664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60665   if test "x$has_forbidden_chars" != x; then
60666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60667     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60668     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60669     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60670       # Going to short mode and back again did indeed matter. Since short mode is
60671       # case insensitive, let's make it lowercase to improve readability.
60672       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60673       # Now convert it back to Unix-style (cygpath)
60674       input_path=`$CYGPATH -u "$shortmode_path"`
60675       new_path="$input_path"
60676     fi
60677   fi
60678 
60679   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60680   if test "x$test_cygdrive_prefix" = x; then
60681     # As a simple fix, exclude /usr/bin since it's not a real path.
60682     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60683       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60684       # a path prefixed by /cygdrive for fixpath to work.
60685       new_path="$CYGWIN_ROOT_PATH$input_path"
60686     fi
60687   fi
60688 
60689 
60690   if test "x$path" != "x$new_path"; then
60691     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60693 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60694   fi
60695 
60696     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60697 
60698   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60699   has_colon=`$ECHO $path | $GREP ^.:`
60700   new_path="$path"
60701   if test "x$has_colon" = x; then
60702     # Not in mixed or Windows style, start by that.
60703     new_path=`cmd //c echo $path`
60704   fi
60705 
60706 
60707   input_path="$new_path"
60708   # Check if we need to convert this using DOS-style short mode. If the path
60709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60710   # take no chances and rewrite it.
60711   # Note: m4 eats our [], so we need to use [ and ] instead.
60712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60713   if test "x$has_forbidden_chars" != x; then
60714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60716   fi
60717 
60718 
60719   windows_path="$new_path"
60720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60721     unix_path=`$CYGPATH -u "$windows_path"`
60722     new_path="$unix_path"
60723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60725     new_path="$unix_path"
60726   fi
60727 
60728   if test "x$path" != "x$new_path"; then
60729     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60731 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60732   fi
60733 
60734   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60735   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60736 
60737     else
60738       # We're on a unix platform. Hooray! :)
60739       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60740       has_space=`$ECHO "$path" | $GREP " "`
60741       if test "x$has_space" != x; then
60742         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60743 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60744         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60745       fi
60746 
60747       # Use eval to expand a potential ~
60748       eval path="$path"
60749       if test ! -f "$path" && test ! -d "$path"; then
60750         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60751       fi
60752 
60753       if test -d "$path"; then
60754         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60755       else
60756         dir="`$DIRNAME "$path"`"
60757         base="`$BASENAME "$path"`"
60758         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60759       fi
60760     fi
60761   fi
60762 
60763 
60764   # Only process if variable expands to non-empty
60765 
60766   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60768 
60769   # Input might be given as Windows format, start by converting to
60770   # unix format.
60771   path="$POTENTIAL_FREETYPE_LIB_PATH"
60772   new_path=`$CYGPATH -u "$path"`
60773 
60774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60777   # "foo.exe" is OK but "foo" is an error.
60778   #
60779   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60780   # It is also a way to make sure we got the proper file name for the real test later on.
60781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60782   if test "x$test_shortpath" = x; then
60783     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60784 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60785     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60786   fi
60787 
60788   # Call helper function which possibly converts this using DOS-style short mode.
60789   # If so, the updated path is stored in $new_path.
60790 
60791   input_path="$new_path"
60792   # Check if we need to convert this using DOS-style short mode. If the path
60793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60794   # take no chances and rewrite it.
60795   # Note: m4 eats our [], so we need to use [ and ] instead.
60796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60797   if test "x$has_forbidden_chars" != x; then
60798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60799     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60800     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60801     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60802       # Going to short mode and back again did indeed matter. Since short mode is
60803       # case insensitive, let's make it lowercase to improve readability.
60804       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60805       # Now convert it back to Unix-style (cygpath)
60806       input_path=`$CYGPATH -u "$shortmode_path"`
60807       new_path="$input_path"
60808     fi
60809   fi
60810 
60811   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60812   if test "x$test_cygdrive_prefix" = x; then
60813     # As a simple fix, exclude /usr/bin since it's not a real path.
60814     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60815       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60816       # a path prefixed by /cygdrive for fixpath to work.
60817       new_path="$CYGWIN_ROOT_PATH$input_path"
60818     fi
60819   fi
60820 
60821 
60822   if test "x$path" != "x$new_path"; then
60823     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60825 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60826   fi
60827 
60828     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60829 
60830   path="$POTENTIAL_FREETYPE_LIB_PATH"
60831   has_colon=`$ECHO $path | $GREP ^.:`
60832   new_path="$path"
60833   if test "x$has_colon" = x; then
60834     # Not in mixed or Windows style, start by that.
60835     new_path=`cmd //c echo $path`
60836   fi
60837 
60838 
60839   input_path="$new_path"
60840   # Check if we need to convert this using DOS-style short mode. If the path
60841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60842   # take no chances and rewrite it.
60843   # Note: m4 eats our [], so we need to use [ and ] instead.
60844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60845   if test "x$has_forbidden_chars" != x; then
60846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60848   fi
60849 
60850 
60851   windows_path="$new_path"
60852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60853     unix_path=`$CYGPATH -u "$windows_path"`
60854     new_path="$unix_path"
60855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60857     new_path="$unix_path"
60858   fi
60859 
60860   if test "x$path" != "x$new_path"; then
60861     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60863 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60864   fi
60865 
60866   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60867   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60868 
60869     else
60870       # We're on a unix platform. Hooray! :)
60871       path="$POTENTIAL_FREETYPE_LIB_PATH"
60872       has_space=`$ECHO "$path" | $GREP " "`
60873       if test "x$has_space" != x; then
60874         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60875 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60876         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60877       fi
60878 
60879       # Use eval to expand a potential ~
60880       eval path="$path"
60881       if test ! -f "$path" && test ! -d "$path"; then
60882         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60883       fi
60884 
60885       if test -d "$path"; then
60886         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60887       else
60888         dir="`$DIRNAME "$path"`"
60889         base="`$BASENAME "$path"`"
60890         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60891       fi
60892     fi
60893   fi
60894 
60895 
60896     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60897     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60898 $as_echo_n "checking for freetype includes... " >&6; }
60899     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60900 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60901     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60902     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60903 $as_echo_n "checking for freetype libraries... " >&6; }
60904     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60905 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60906   fi
60907 
60908           fi
60909 
60910           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60911             if test "x$FOUND_FREETYPE" != xyes; then
60912               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60913               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60914 
60915   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60916   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60917   METHOD="well-known location"
60918 
60919   # Let's start with an optimistic view of the world :-)
60920   FOUND_FREETYPE=yes
60921 
60922   # First look for the canonical freetype main include file ft2build.h.
60923   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60924     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60925     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60926     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60927       # Fail.
60928       FOUND_FREETYPE=no
60929     fi
60930   fi
60931 
60932   if test "x$FOUND_FREETYPE" = xyes; then
60933     # Include file found, let's continue the sanity check.
60934     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60935 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60936 
60937     # Reset to default value
60938     FREETYPE_BASE_NAME=freetype
60939     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60940     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60941       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60942           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60943         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60944         # for the .6 version explicitly.
60945         FREETYPE_BASE_NAME=freetype.6
60946         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60947         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60948 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60949       else
60950         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60951 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60952         FOUND_FREETYPE=no
60953       fi
60954     else
60955       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60956         # On Windows, we will need both .lib and .dll file.
60957         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60958           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60959 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60960           FOUND_FREETYPE=no
60961         fi
60962       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60963           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60964         # Found lib in isa dir, use that instead.
60965         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60966         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60967 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60968       fi
60969     fi
60970   fi
60971 
60972   if test "x$FOUND_FREETYPE" = xyes; then
60973 
60974   # Only process if variable expands to non-empty
60975 
60976   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60977     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60978 
60979   # Input might be given as Windows format, start by converting to
60980   # unix format.
60981   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60982   new_path=`$CYGPATH -u "$path"`
60983 
60984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60987   # "foo.exe" is OK but "foo" is an error.
60988   #
60989   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60990   # It is also a way to make sure we got the proper file name for the real test later on.
60991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60992   if test "x$test_shortpath" = x; then
60993     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60994 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60995     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60996   fi
60997 
60998   # Call helper function which possibly converts this using DOS-style short mode.
60999   # If so, the updated path is stored in $new_path.
61000 
61001   input_path="$new_path"
61002   # Check if we need to convert this using DOS-style short mode. If the path
61003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61004   # take no chances and rewrite it.
61005   # Note: m4 eats our [], so we need to use [ and ] instead.
61006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61007   if test "x$has_forbidden_chars" != x; then
61008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61012       # Going to short mode and back again did indeed matter. Since short mode is
61013       # case insensitive, let's make it lowercase to improve readability.
61014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61015       # Now convert it back to Unix-style (cygpath)
61016       input_path=`$CYGPATH -u "$shortmode_path"`
61017       new_path="$input_path"
61018     fi
61019   fi
61020 
61021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61022   if test "x$test_cygdrive_prefix" = x; then
61023     # As a simple fix, exclude /usr/bin since it's not a real path.
61024     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61026       # a path prefixed by /cygdrive for fixpath to work.
61027       new_path="$CYGWIN_ROOT_PATH$input_path"
61028     fi
61029   fi
61030 
61031 
61032   if test "x$path" != "x$new_path"; then
61033     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61036   fi
61037 
61038     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61039 
61040   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61041   has_colon=`$ECHO $path | $GREP ^.:`
61042   new_path="$path"
61043   if test "x$has_colon" = x; then
61044     # Not in mixed or Windows style, start by that.
61045     new_path=`cmd //c echo $path`
61046   fi
61047 
61048 
61049   input_path="$new_path"
61050   # Check if we need to convert this using DOS-style short mode. If the path
61051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61052   # take no chances and rewrite it.
61053   # Note: m4 eats our [], so we need to use [ and ] instead.
61054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61055   if test "x$has_forbidden_chars" != x; then
61056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61058   fi
61059 
61060 
61061   windows_path="$new_path"
61062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61063     unix_path=`$CYGPATH -u "$windows_path"`
61064     new_path="$unix_path"
61065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61067     new_path="$unix_path"
61068   fi
61069 
61070   if test "x$path" != "x$new_path"; then
61071     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61073 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61074   fi
61075 
61076   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61077   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61078 
61079     else
61080       # We're on a unix platform. Hooray! :)
61081       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61082       has_space=`$ECHO "$path" | $GREP " "`
61083       if test "x$has_space" != x; then
61084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61085 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61086         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61087       fi
61088 
61089       # Use eval to expand a potential ~
61090       eval path="$path"
61091       if test ! -f "$path" && test ! -d "$path"; then
61092         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61093       fi
61094 
61095       if test -d "$path"; then
61096         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61097       else
61098         dir="`$DIRNAME "$path"`"
61099         base="`$BASENAME "$path"`"
61100         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61101       fi
61102     fi
61103   fi
61104 
61105 
61106   # Only process if variable expands to non-empty
61107 
61108   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61110 
61111   # Input might be given as Windows format, start by converting to
61112   # unix format.
61113   path="$POTENTIAL_FREETYPE_LIB_PATH"
61114   new_path=`$CYGPATH -u "$path"`
61115 
61116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61119   # "foo.exe" is OK but "foo" is an error.
61120   #
61121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61122   # It is also a way to make sure we got the proper file name for the real test later on.
61123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61124   if test "x$test_shortpath" = x; then
61125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61126 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61127     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61128   fi
61129 
61130   # Call helper function which possibly converts this using DOS-style short mode.
61131   # If so, the updated path is stored in $new_path.
61132 
61133   input_path="$new_path"
61134   # Check if we need to convert this using DOS-style short mode. If the path
61135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61136   # take no chances and rewrite it.
61137   # Note: m4 eats our [], so we need to use [ and ] instead.
61138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61139   if test "x$has_forbidden_chars" != x; then
61140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61144       # Going to short mode and back again did indeed matter. Since short mode is
61145       # case insensitive, let's make it lowercase to improve readability.
61146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61147       # Now convert it back to Unix-style (cygpath)
61148       input_path=`$CYGPATH -u "$shortmode_path"`
61149       new_path="$input_path"
61150     fi
61151   fi
61152 
61153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61154   if test "x$test_cygdrive_prefix" = x; then
61155     # As a simple fix, exclude /usr/bin since it's not a real path.
61156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61158       # a path prefixed by /cygdrive for fixpath to work.
61159       new_path="$CYGWIN_ROOT_PATH$input_path"
61160     fi
61161   fi
61162 
61163 
61164   if test "x$path" != "x$new_path"; then
61165     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61167 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61168   fi
61169 
61170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61171 
61172   path="$POTENTIAL_FREETYPE_LIB_PATH"
61173   has_colon=`$ECHO $path | $GREP ^.:`
61174   new_path="$path"
61175   if test "x$has_colon" = x; then
61176     # Not in mixed or Windows style, start by that.
61177     new_path=`cmd //c echo $path`
61178   fi
61179 
61180 
61181   input_path="$new_path"
61182   # Check if we need to convert this using DOS-style short mode. If the path
61183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61184   # take no chances and rewrite it.
61185   # Note: m4 eats our [], so we need to use [ and ] instead.
61186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61187   if test "x$has_forbidden_chars" != x; then
61188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61190   fi
61191 
61192 
61193   windows_path="$new_path"
61194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61195     unix_path=`$CYGPATH -u "$windows_path"`
61196     new_path="$unix_path"
61197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61199     new_path="$unix_path"
61200   fi
61201 
61202   if test "x$path" != "x$new_path"; then
61203     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61205 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61206   fi
61207 
61208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61210 
61211     else
61212       # We're on a unix platform. Hooray! :)
61213       path="$POTENTIAL_FREETYPE_LIB_PATH"
61214       has_space=`$ECHO "$path" | $GREP " "`
61215       if test "x$has_space" != x; then
61216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61217 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61219       fi
61220 
61221       # Use eval to expand a potential ~
61222       eval path="$path"
61223       if test ! -f "$path" && test ! -d "$path"; then
61224         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61225       fi
61226 
61227       if test -d "$path"; then
61228         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61229       else
61230         dir="`$DIRNAME "$path"`"
61231         base="`$BASENAME "$path"`"
61232         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61233       fi
61234     fi
61235   fi
61236 
61237 
61238     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61239     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61240 $as_echo_n "checking for freetype includes... " >&6; }
61241     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61242 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61243     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61245 $as_echo_n "checking for freetype libraries... " >&6; }
61246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61247 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61248   fi
61249 
61250             fi
61251           fi
61252 
61253           if test "x$FOUND_FREETYPE" != xyes; then
61254             FREETYPE_BASE_DIR="$SYSROOT/usr"
61255             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61256 
61257   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61258   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61259   METHOD="well-known location"
61260 
61261   # Let's start with an optimistic view of the world :-)
61262   FOUND_FREETYPE=yes
61263 
61264   # First look for the canonical freetype main include file ft2build.h.
61265   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61266     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61267     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61268     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61269       # Fail.
61270       FOUND_FREETYPE=no
61271     fi
61272   fi
61273 
61274   if test "x$FOUND_FREETYPE" = xyes; then
61275     # Include file found, let's continue the sanity check.
61276     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61277 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61278 
61279     # Reset to default value
61280     FREETYPE_BASE_NAME=freetype
61281     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61282     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61283       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61284           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61285         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61286         # for the .6 version explicitly.
61287         FREETYPE_BASE_NAME=freetype.6
61288         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61289         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61290 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61291       else
61292         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61293 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61294         FOUND_FREETYPE=no
61295       fi
61296     else
61297       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61298         # On Windows, we will need both .lib and .dll file.
61299         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61300           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61301 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61302           FOUND_FREETYPE=no
61303         fi
61304       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61305           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61306         # Found lib in isa dir, use that instead.
61307         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61308         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61309 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61310       fi
61311     fi
61312   fi
61313 
61314   if test "x$FOUND_FREETYPE" = xyes; then
61315 
61316   # Only process if variable expands to non-empty
61317 
61318   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61319     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61320 
61321   # Input might be given as Windows format, start by converting to
61322   # unix format.
61323   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61324   new_path=`$CYGPATH -u "$path"`
61325 
61326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61329   # "foo.exe" is OK but "foo" is an error.
61330   #
61331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61332   # It is also a way to make sure we got the proper file name for the real test later on.
61333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61334   if test "x$test_shortpath" = x; then
61335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61336 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61337     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61338   fi
61339 
61340   # Call helper function which possibly converts this using DOS-style short mode.
61341   # If so, the updated path is stored in $new_path.
61342 
61343   input_path="$new_path"
61344   # Check if we need to convert this using DOS-style short mode. If the path
61345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61346   # take no chances and rewrite it.
61347   # Note: m4 eats our [], so we need to use [ and ] instead.
61348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61349   if test "x$has_forbidden_chars" != x; then
61350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61354       # Going to short mode and back again did indeed matter. Since short mode is
61355       # case insensitive, let's make it lowercase to improve readability.
61356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61357       # Now convert it back to Unix-style (cygpath)
61358       input_path=`$CYGPATH -u "$shortmode_path"`
61359       new_path="$input_path"
61360     fi
61361   fi
61362 
61363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61364   if test "x$test_cygdrive_prefix" = x; then
61365     # As a simple fix, exclude /usr/bin since it's not a real path.
61366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61368       # a path prefixed by /cygdrive for fixpath to work.
61369       new_path="$CYGWIN_ROOT_PATH$input_path"
61370     fi
61371   fi
61372 
61373 
61374   if test "x$path" != "x$new_path"; then
61375     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61377 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61378   fi
61379 
61380     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61381 
61382   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61383   has_colon=`$ECHO $path | $GREP ^.:`
61384   new_path="$path"
61385   if test "x$has_colon" = x; then
61386     # Not in mixed or Windows style, start by that.
61387     new_path=`cmd //c echo $path`
61388   fi
61389 
61390 
61391   input_path="$new_path"
61392   # Check if we need to convert this using DOS-style short mode. If the path
61393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61394   # take no chances and rewrite it.
61395   # Note: m4 eats our [], so we need to use [ and ] instead.
61396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61397   if test "x$has_forbidden_chars" != x; then
61398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61400   fi
61401 
61402 
61403   windows_path="$new_path"
61404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61405     unix_path=`$CYGPATH -u "$windows_path"`
61406     new_path="$unix_path"
61407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61409     new_path="$unix_path"
61410   fi
61411 
61412   if test "x$path" != "x$new_path"; then
61413     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61415 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61416   fi
61417 
61418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61420 
61421     else
61422       # We're on a unix platform. Hooray! :)
61423       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61424       has_space=`$ECHO "$path" | $GREP " "`
61425       if test "x$has_space" != x; then
61426         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61427 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61428         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61429       fi
61430 
61431       # Use eval to expand a potential ~
61432       eval path="$path"
61433       if test ! -f "$path" && test ! -d "$path"; then
61434         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61435       fi
61436 
61437       if test -d "$path"; then
61438         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61439       else
61440         dir="`$DIRNAME "$path"`"
61441         base="`$BASENAME "$path"`"
61442         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61443       fi
61444     fi
61445   fi
61446 
61447 
61448   # Only process if variable expands to non-empty
61449 
61450   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61452 
61453   # Input might be given as Windows format, start by converting to
61454   # unix format.
61455   path="$POTENTIAL_FREETYPE_LIB_PATH"
61456   new_path=`$CYGPATH -u "$path"`
61457 
61458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61461   # "foo.exe" is OK but "foo" is an error.
61462   #
61463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61464   # It is also a way to make sure we got the proper file name for the real test later on.
61465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61466   if test "x$test_shortpath" = x; then
61467     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61468 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61469     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61470   fi
61471 
61472   # Call helper function which possibly converts this using DOS-style short mode.
61473   # If so, the updated path is stored in $new_path.
61474 
61475   input_path="$new_path"
61476   # Check if we need to convert this using DOS-style short mode. If the path
61477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61478   # take no chances and rewrite it.
61479   # Note: m4 eats our [], so we need to use [ and ] instead.
61480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61481   if test "x$has_forbidden_chars" != x; then
61482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61483     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61484     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61485     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61486       # Going to short mode and back again did indeed matter. Since short mode is
61487       # case insensitive, let's make it lowercase to improve readability.
61488       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61489       # Now convert it back to Unix-style (cygpath)
61490       input_path=`$CYGPATH -u "$shortmode_path"`
61491       new_path="$input_path"
61492     fi
61493   fi
61494 
61495   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61496   if test "x$test_cygdrive_prefix" = x; then
61497     # As a simple fix, exclude /usr/bin since it's not a real path.
61498     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61499       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61500       # a path prefixed by /cygdrive for fixpath to work.
61501       new_path="$CYGWIN_ROOT_PATH$input_path"
61502     fi
61503   fi
61504 
61505 
61506   if test "x$path" != "x$new_path"; then
61507     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61509 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61510   fi
61511 
61512     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61513 
61514   path="$POTENTIAL_FREETYPE_LIB_PATH"
61515   has_colon=`$ECHO $path | $GREP ^.:`
61516   new_path="$path"
61517   if test "x$has_colon" = x; then
61518     # Not in mixed or Windows style, start by that.
61519     new_path=`cmd //c echo $path`
61520   fi
61521 
61522 
61523   input_path="$new_path"
61524   # Check if we need to convert this using DOS-style short mode. If the path
61525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61526   # take no chances and rewrite it.
61527   # Note: m4 eats our [], so we need to use [ and ] instead.
61528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61529   if test "x$has_forbidden_chars" != x; then
61530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61532   fi
61533 
61534 
61535   windows_path="$new_path"
61536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61537     unix_path=`$CYGPATH -u "$windows_path"`
61538     new_path="$unix_path"
61539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61541     new_path="$unix_path"
61542   fi
61543 
61544   if test "x$path" != "x$new_path"; then
61545     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61547 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61548   fi
61549 
61550   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61551   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61552 
61553     else
61554       # We're on a unix platform. Hooray! :)
61555       path="$POTENTIAL_FREETYPE_LIB_PATH"
61556       has_space=`$ECHO "$path" | $GREP " "`
61557       if test "x$has_space" != x; then
61558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61559 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61560         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61561       fi
61562 
61563       # Use eval to expand a potential ~
61564       eval path="$path"
61565       if test ! -f "$path" && test ! -d "$path"; then
61566         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61567       fi
61568 
61569       if test -d "$path"; then
61570         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61571       else
61572         dir="`$DIRNAME "$path"`"
61573         base="`$BASENAME "$path"`"
61574         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61575       fi
61576     fi
61577   fi
61578 
61579 
61580     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61582 $as_echo_n "checking for freetype includes... " >&6; }
61583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61584 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61585     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61587 $as_echo_n "checking for freetype libraries... " >&6; }
61588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61589 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61590   fi
61591 
61592             else
61593 
61594   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61595   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61596   METHOD="well-known location"
61597 
61598   # Let's start with an optimistic view of the world :-)
61599   FOUND_FREETYPE=yes
61600 
61601   # First look for the canonical freetype main include file ft2build.h.
61602   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61603     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61604     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61605     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61606       # Fail.
61607       FOUND_FREETYPE=no
61608     fi
61609   fi
61610 
61611   if test "x$FOUND_FREETYPE" = xyes; then
61612     # Include file found, let's continue the sanity check.
61613     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61614 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61615 
61616     # Reset to default value
61617     FREETYPE_BASE_NAME=freetype
61618     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61619     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61620       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61621           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61622         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61623         # for the .6 version explicitly.
61624         FREETYPE_BASE_NAME=freetype.6
61625         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61626         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61627 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61628       else
61629         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61630 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61631         FOUND_FREETYPE=no
61632       fi
61633     else
61634       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61635         # On Windows, we will need both .lib and .dll file.
61636         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61637           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61638 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61639           FOUND_FREETYPE=no
61640         fi
61641       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61642           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61643         # Found lib in isa dir, use that instead.
61644         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61645         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61646 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61647       fi
61648     fi
61649   fi
61650 
61651   if test "x$FOUND_FREETYPE" = xyes; then
61652 
61653   # Only process if variable expands to non-empty
61654 
61655   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61656     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61657 
61658   # Input might be given as Windows format, start by converting to
61659   # unix format.
61660   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61661   new_path=`$CYGPATH -u "$path"`
61662 
61663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61666   # "foo.exe" is OK but "foo" is an error.
61667   #
61668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61669   # It is also a way to make sure we got the proper file name for the real test later on.
61670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61671   if test "x$test_shortpath" = x; then
61672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61673 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61674     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61675   fi
61676 
61677   # Call helper function which possibly converts this using DOS-style short mode.
61678   # If so, the updated path is stored in $new_path.
61679 
61680   input_path="$new_path"
61681   # Check if we need to convert this using DOS-style short mode. If the path
61682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61683   # take no chances and rewrite it.
61684   # Note: m4 eats our [], so we need to use [ and ] instead.
61685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61686   if test "x$has_forbidden_chars" != x; then
61687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61691       # Going to short mode and back again did indeed matter. Since short mode is
61692       # case insensitive, let's make it lowercase to improve readability.
61693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61694       # Now convert it back to Unix-style (cygpath)
61695       input_path=`$CYGPATH -u "$shortmode_path"`
61696       new_path="$input_path"
61697     fi
61698   fi
61699 
61700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61701   if test "x$test_cygdrive_prefix" = x; then
61702     # As a simple fix, exclude /usr/bin since it's not a real path.
61703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61705       # a path prefixed by /cygdrive for fixpath to work.
61706       new_path="$CYGWIN_ROOT_PATH$input_path"
61707     fi
61708   fi
61709 
61710 
61711   if test "x$path" != "x$new_path"; then
61712     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61714 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61715   fi
61716 
61717     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61718 
61719   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61720   has_colon=`$ECHO $path | $GREP ^.:`
61721   new_path="$path"
61722   if test "x$has_colon" = x; then
61723     # Not in mixed or Windows style, start by that.
61724     new_path=`cmd //c echo $path`
61725   fi
61726 
61727 
61728   input_path="$new_path"
61729   # Check if we need to convert this using DOS-style short mode. If the path
61730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61731   # take no chances and rewrite it.
61732   # Note: m4 eats our [], so we need to use [ and ] instead.
61733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61734   if test "x$has_forbidden_chars" != x; then
61735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61737   fi
61738 
61739 
61740   windows_path="$new_path"
61741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61742     unix_path=`$CYGPATH -u "$windows_path"`
61743     new_path="$unix_path"
61744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61746     new_path="$unix_path"
61747   fi
61748 
61749   if test "x$path" != "x$new_path"; then
61750     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61752 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61753   fi
61754 
61755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61757 
61758     else
61759       # We're on a unix platform. Hooray! :)
61760       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61761       has_space=`$ECHO "$path" | $GREP " "`
61762       if test "x$has_space" != x; then
61763         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61764 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61765         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61766       fi
61767 
61768       # Use eval to expand a potential ~
61769       eval path="$path"
61770       if test ! -f "$path" && test ! -d "$path"; then
61771         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61772       fi
61773 
61774       if test -d "$path"; then
61775         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61776       else
61777         dir="`$DIRNAME "$path"`"
61778         base="`$BASENAME "$path"`"
61779         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61780       fi
61781     fi
61782   fi
61783 
61784 
61785   # Only process if variable expands to non-empty
61786 
61787   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61788     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61789 
61790   # Input might be given as Windows format, start by converting to
61791   # unix format.
61792   path="$POTENTIAL_FREETYPE_LIB_PATH"
61793   new_path=`$CYGPATH -u "$path"`
61794 
61795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61798   # "foo.exe" is OK but "foo" is an error.
61799   #
61800   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61801   # It is also a way to make sure we got the proper file name for the real test later on.
61802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61803   if test "x$test_shortpath" = x; then
61804     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61805 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61806     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61807   fi
61808 
61809   # Call helper function which possibly converts this using DOS-style short mode.
61810   # If so, the updated path is stored in $new_path.
61811 
61812   input_path="$new_path"
61813   # Check if we need to convert this using DOS-style short mode. If the path
61814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61815   # take no chances and rewrite it.
61816   # Note: m4 eats our [], so we need to use [ and ] instead.
61817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61818   if test "x$has_forbidden_chars" != x; then
61819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61820     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61821     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61822     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61823       # Going to short mode and back again did indeed matter. Since short mode is
61824       # case insensitive, let's make it lowercase to improve readability.
61825       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61826       # Now convert it back to Unix-style (cygpath)
61827       input_path=`$CYGPATH -u "$shortmode_path"`
61828       new_path="$input_path"
61829     fi
61830   fi
61831 
61832   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61833   if test "x$test_cygdrive_prefix" = x; then
61834     # As a simple fix, exclude /usr/bin since it's not a real path.
61835     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61836       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61837       # a path prefixed by /cygdrive for fixpath to work.
61838       new_path="$CYGWIN_ROOT_PATH$input_path"
61839     fi
61840   fi
61841 
61842 
61843   if test "x$path" != "x$new_path"; then
61844     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61846 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61847   fi
61848 
61849     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61850 
61851   path="$POTENTIAL_FREETYPE_LIB_PATH"
61852   has_colon=`$ECHO $path | $GREP ^.:`
61853   new_path="$path"
61854   if test "x$has_colon" = x; then
61855     # Not in mixed or Windows style, start by that.
61856     new_path=`cmd //c echo $path`
61857   fi
61858 
61859 
61860   input_path="$new_path"
61861   # Check if we need to convert this using DOS-style short mode. If the path
61862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61863   # take no chances and rewrite it.
61864   # Note: m4 eats our [], so we need to use [ and ] instead.
61865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61866   if test "x$has_forbidden_chars" != x; then
61867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61869   fi
61870 
61871 
61872   windows_path="$new_path"
61873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61874     unix_path=`$CYGPATH -u "$windows_path"`
61875     new_path="$unix_path"
61876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61878     new_path="$unix_path"
61879   fi
61880 
61881   if test "x$path" != "x$new_path"; then
61882     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61884 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61885   fi
61886 
61887   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61888   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61889 
61890     else
61891       # We're on a unix platform. Hooray! :)
61892       path="$POTENTIAL_FREETYPE_LIB_PATH"
61893       has_space=`$ECHO "$path" | $GREP " "`
61894       if test "x$has_space" != x; then
61895         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61896 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61897         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61898       fi
61899 
61900       # Use eval to expand a potential ~
61901       eval path="$path"
61902       if test ! -f "$path" && test ! -d "$path"; then
61903         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61904       fi
61905 
61906       if test -d "$path"; then
61907         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61908       else
61909         dir="`$DIRNAME "$path"`"
61910         base="`$BASENAME "$path"`"
61911         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61912       fi
61913     fi
61914   fi
61915 
61916 
61917     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61919 $as_echo_n "checking for freetype includes... " >&6; }
61920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61921 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61922     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61923     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61924 $as_echo_n "checking for freetype libraries... " >&6; }
61925     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61926 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61927   fi
61928 
61929               if test "x$FOUND_FREETYPE" != xyes; then
61930 
61931   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61932   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61933   METHOD="well-known location"
61934 
61935   # Let's start with an optimistic view of the world :-)
61936   FOUND_FREETYPE=yes
61937 
61938   # First look for the canonical freetype main include file ft2build.h.
61939   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61940     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61941     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61942     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61943       # Fail.
61944       FOUND_FREETYPE=no
61945     fi
61946   fi
61947 
61948   if test "x$FOUND_FREETYPE" = xyes; then
61949     # Include file found, let's continue the sanity check.
61950     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61951 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61952 
61953     # Reset to default value
61954     FREETYPE_BASE_NAME=freetype
61955     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61956     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61957       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61958           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61959         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61960         # for the .6 version explicitly.
61961         FREETYPE_BASE_NAME=freetype.6
61962         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61963         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61964 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61965       else
61966         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61967 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61968         FOUND_FREETYPE=no
61969       fi
61970     else
61971       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61972         # On Windows, we will need both .lib and .dll file.
61973         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61974           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61975 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61976           FOUND_FREETYPE=no
61977         fi
61978       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61979           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61980         # Found lib in isa dir, use that instead.
61981         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61982         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61983 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61984       fi
61985     fi
61986   fi
61987 
61988   if test "x$FOUND_FREETYPE" = xyes; then
61989 
61990   # Only process if variable expands to non-empty
61991 
61992   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61993     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61994 
61995   # Input might be given as Windows format, start by converting to
61996   # unix format.
61997   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61998   new_path=`$CYGPATH -u "$path"`
61999 
62000   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62001   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62002   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62003   # "foo.exe" is OK but "foo" is an error.
62004   #
62005   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62006   # It is also a way to make sure we got the proper file name for the real test later on.
62007   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62008   if test "x$test_shortpath" = x; then
62009     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62010 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62011     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62012   fi
62013 
62014   # Call helper function which possibly converts this using DOS-style short mode.
62015   # If so, the updated path is stored in $new_path.
62016 
62017   input_path="$new_path"
62018   # Check if we need to convert this using DOS-style short mode. If the path
62019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62020   # take no chances and rewrite it.
62021   # Note: m4 eats our [], so we need to use [ and ] instead.
62022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62023   if test "x$has_forbidden_chars" != x; then
62024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62025     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62026     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62027     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62028       # Going to short mode and back again did indeed matter. Since short mode is
62029       # case insensitive, let's make it lowercase to improve readability.
62030       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62031       # Now convert it back to Unix-style (cygpath)
62032       input_path=`$CYGPATH -u "$shortmode_path"`
62033       new_path="$input_path"
62034     fi
62035   fi
62036 
62037   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62038   if test "x$test_cygdrive_prefix" = x; then
62039     # As a simple fix, exclude /usr/bin since it's not a real path.
62040     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62041       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62042       # a path prefixed by /cygdrive for fixpath to work.
62043       new_path="$CYGWIN_ROOT_PATH$input_path"
62044     fi
62045   fi
62046 
62047 
62048   if test "x$path" != "x$new_path"; then
62049     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62051 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62052   fi
62053 
62054     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62055 
62056   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62057   has_colon=`$ECHO $path | $GREP ^.:`
62058   new_path="$path"
62059   if test "x$has_colon" = x; then
62060     # Not in mixed or Windows style, start by that.
62061     new_path=`cmd //c echo $path`
62062   fi
62063 
62064 
62065   input_path="$new_path"
62066   # Check if we need to convert this using DOS-style short mode. If the path
62067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62068   # take no chances and rewrite it.
62069   # Note: m4 eats our [], so we need to use [ and ] instead.
62070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62071   if test "x$has_forbidden_chars" != x; then
62072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62073     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62074   fi
62075 
62076 
62077   windows_path="$new_path"
62078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62079     unix_path=`$CYGPATH -u "$windows_path"`
62080     new_path="$unix_path"
62081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62083     new_path="$unix_path"
62084   fi
62085 
62086   if test "x$path" != "x$new_path"; then
62087     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62088     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62089 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62090   fi
62091 
62092   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62093   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62094 
62095     else
62096       # We're on a unix platform. Hooray! :)
62097       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62098       has_space=`$ECHO "$path" | $GREP " "`
62099       if test "x$has_space" != x; then
62100         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62101 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62102         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62103       fi
62104 
62105       # Use eval to expand a potential ~
62106       eval path="$path"
62107       if test ! -f "$path" && test ! -d "$path"; then
62108         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62109       fi
62110 
62111       if test -d "$path"; then
62112         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62113       else
62114         dir="`$DIRNAME "$path"`"
62115         base="`$BASENAME "$path"`"
62116         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62117       fi
62118     fi
62119   fi
62120 
62121 
62122   # Only process if variable expands to non-empty
62123 
62124   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62125     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62126 
62127   # Input might be given as Windows format, start by converting to
62128   # unix format.
62129   path="$POTENTIAL_FREETYPE_LIB_PATH"
62130   new_path=`$CYGPATH -u "$path"`
62131 
62132   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62133   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62134   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62135   # "foo.exe" is OK but "foo" is an error.
62136   #
62137   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62138   # It is also a way to make sure we got the proper file name for the real test later on.
62139   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62140   if test "x$test_shortpath" = x; then
62141     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62142 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62143     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62144   fi
62145 
62146   # Call helper function which possibly converts this using DOS-style short mode.
62147   # If so, the updated path is stored in $new_path.
62148 
62149   input_path="$new_path"
62150   # Check if we need to convert this using DOS-style short mode. If the path
62151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62152   # take no chances and rewrite it.
62153   # Note: m4 eats our [], so we need to use [ and ] instead.
62154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62155   if test "x$has_forbidden_chars" != x; then
62156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62157     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62158     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62159     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62160       # Going to short mode and back again did indeed matter. Since short mode is
62161       # case insensitive, let's make it lowercase to improve readability.
62162       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62163       # Now convert it back to Unix-style (cygpath)
62164       input_path=`$CYGPATH -u "$shortmode_path"`
62165       new_path="$input_path"
62166     fi
62167   fi
62168 
62169   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62170   if test "x$test_cygdrive_prefix" = x; then
62171     # As a simple fix, exclude /usr/bin since it's not a real path.
62172     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62173       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62174       # a path prefixed by /cygdrive for fixpath to work.
62175       new_path="$CYGWIN_ROOT_PATH$input_path"
62176     fi
62177   fi
62178 
62179 
62180   if test "x$path" != "x$new_path"; then
62181     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62183 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62184   fi
62185 
62186     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62187 
62188   path="$POTENTIAL_FREETYPE_LIB_PATH"
62189   has_colon=`$ECHO $path | $GREP ^.:`
62190   new_path="$path"
62191   if test "x$has_colon" = x; then
62192     # Not in mixed or Windows style, start by that.
62193     new_path=`cmd //c echo $path`
62194   fi
62195 
62196 
62197   input_path="$new_path"
62198   # Check if we need to convert this using DOS-style short mode. If the path
62199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62200   # take no chances and rewrite it.
62201   # Note: m4 eats our [], so we need to use [ and ] instead.
62202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62203   if test "x$has_forbidden_chars" != x; then
62204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62206   fi
62207 
62208 
62209   windows_path="$new_path"
62210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62211     unix_path=`$CYGPATH -u "$windows_path"`
62212     new_path="$unix_path"
62213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62215     new_path="$unix_path"
62216   fi
62217 
62218   if test "x$path" != "x$new_path"; then
62219     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62221 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62222   fi
62223 
62224   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62225   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62226 
62227     else
62228       # We're on a unix platform. Hooray! :)
62229       path="$POTENTIAL_FREETYPE_LIB_PATH"
62230       has_space=`$ECHO "$path" | $GREP " "`
62231       if test "x$has_space" != x; then
62232         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62233 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62234         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62235       fi
62236 
62237       # Use eval to expand a potential ~
62238       eval path="$path"
62239       if test ! -f "$path" && test ! -d "$path"; then
62240         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62241       fi
62242 
62243       if test -d "$path"; then
62244         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62245       else
62246         dir="`$DIRNAME "$path"`"
62247         base="`$BASENAME "$path"`"
62248         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62249       fi
62250     fi
62251   fi
62252 
62253 
62254     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62256 $as_echo_n "checking for freetype includes... " >&6; }
62257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62258 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62259     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62260     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62261 $as_echo_n "checking for freetype libraries... " >&6; }
62262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62263 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62264   fi
62265 
62266               fi
62267             fi
62268           fi
62269         fi
62270       fi # end check in well-known locations
62271 
62272       if test "x$FOUND_FREETYPE" != xyes; then
62273 
62274   # Print a helpful message on how to acquire the necessary build dependency.
62275   # freetype is the help tag: freetype, cups, alsa etc
62276   MISSING_DEPENDENCY=freetype
62277 
62278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62279     cygwin_help $MISSING_DEPENDENCY
62280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62281     msys_help $MISSING_DEPENDENCY
62282   else
62283     PKGHANDLER_COMMAND=
62284 
62285     case $PKGHANDLER in
62286       apt-get)
62287         apt_help     $MISSING_DEPENDENCY ;;
62288       yum)
62289         yum_help     $MISSING_DEPENDENCY ;;
62290       port)
62291         port_help    $MISSING_DEPENDENCY ;;
62292       pkgutil)
62293         pkgutil_help $MISSING_DEPENDENCY ;;
62294       pkgadd)
62295         pkgadd_help  $MISSING_DEPENDENCY ;;
62296     esac
62297 
62298     if test "x$PKGHANDLER_COMMAND" != x; then
62299       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62300     fi
62301   fi
62302 
62303         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62304       fi
62305     fi # end user specified settings
62306 
62307     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62308     if test "x$FREETYPE_CFLAGS" = x; then
62309 
62310   # Only process if variable expands to non-empty
62311 
62312   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62313     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62314 
62315   # Input might be given as Windows format, start by converting to
62316   # unix format.
62317   path="$FREETYPE_INCLUDE_PATH"
62318   new_path=`$CYGPATH -u "$path"`
62319 
62320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62323   # "foo.exe" is OK but "foo" is an error.
62324   #
62325   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62326   # It is also a way to make sure we got the proper file name for the real test later on.
62327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62328   if test "x$test_shortpath" = x; then
62329     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62330 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62331     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62332   fi
62333 
62334   # Call helper function which possibly converts this using DOS-style short mode.
62335   # If so, the updated path is stored in $new_path.
62336 
62337   input_path="$new_path"
62338   # Check if we need to convert this using DOS-style short mode. If the path
62339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62340   # take no chances and rewrite it.
62341   # Note: m4 eats our [], so we need to use [ and ] instead.
62342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62343   if test "x$has_forbidden_chars" != x; then
62344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62348       # Going to short mode and back again did indeed matter. Since short mode is
62349       # case insensitive, let's make it lowercase to improve readability.
62350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62351       # Now convert it back to Unix-style (cygpath)
62352       input_path=`$CYGPATH -u "$shortmode_path"`
62353       new_path="$input_path"
62354     fi
62355   fi
62356 
62357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62358   if test "x$test_cygdrive_prefix" = x; then
62359     # As a simple fix, exclude /usr/bin since it's not a real path.
62360     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62362       # a path prefixed by /cygdrive for fixpath to work.
62363       new_path="$CYGWIN_ROOT_PATH$input_path"
62364     fi
62365   fi
62366 
62367 
62368   if test "x$path" != "x$new_path"; then
62369     FREETYPE_INCLUDE_PATH="$new_path"
62370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62371 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62372   fi
62373 
62374     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62375 
62376   path="$FREETYPE_INCLUDE_PATH"
62377   has_colon=`$ECHO $path | $GREP ^.:`
62378   new_path="$path"
62379   if test "x$has_colon" = x; then
62380     # Not in mixed or Windows style, start by that.
62381     new_path=`cmd //c echo $path`
62382   fi
62383 
62384 
62385   input_path="$new_path"
62386   # Check if we need to convert this using DOS-style short mode. If the path
62387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62388   # take no chances and rewrite it.
62389   # Note: m4 eats our [], so we need to use [ and ] instead.
62390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62391   if test "x$has_forbidden_chars" != x; then
62392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62394   fi
62395 
62396 
62397   windows_path="$new_path"
62398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62399     unix_path=`$CYGPATH -u "$windows_path"`
62400     new_path="$unix_path"
62401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62403     new_path="$unix_path"
62404   fi
62405 
62406   if test "x$path" != "x$new_path"; then
62407     FREETYPE_INCLUDE_PATH="$new_path"
62408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62409 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62410   fi
62411 
62412   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62413   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62414 
62415     else
62416       # We're on a unix platform. Hooray! :)
62417       path="$FREETYPE_INCLUDE_PATH"
62418       has_space=`$ECHO "$path" | $GREP " "`
62419       if test "x$has_space" != x; then
62420         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62421 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62422         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62423       fi
62424 
62425       # Use eval to expand a potential ~
62426       eval path="$path"
62427       if test ! -f "$path" && test ! -d "$path"; then
62428         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62429       fi
62430 
62431       if test -d "$path"; then
62432         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62433       else
62434         dir="`$DIRNAME "$path"`"
62435         base="`$BASENAME "$path"`"
62436         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62437       fi
62438     fi
62439   fi
62440 
62441       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62442         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62443       else
62444         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62445       fi
62446     fi
62447 
62448     if test "x$FREETYPE_LIBS" = x; then
62449 
62450   # Only process if variable expands to non-empty
62451 
62452   if test "x$FREETYPE_LIB_PATH" != x; then
62453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62454 
62455   # Input might be given as Windows format, start by converting to
62456   # unix format.
62457   path="$FREETYPE_LIB_PATH"
62458   new_path=`$CYGPATH -u "$path"`
62459 
62460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62463   # "foo.exe" is OK but "foo" is an error.
62464   #
62465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62466   # It is also a way to make sure we got the proper file name for the real test later on.
62467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62468   if test "x$test_shortpath" = x; then
62469     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62470 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62471     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62472   fi
62473 
62474   # Call helper function which possibly converts this using DOS-style short mode.
62475   # If so, the updated path is stored in $new_path.
62476 
62477   input_path="$new_path"
62478   # Check if we need to convert this using DOS-style short mode. If the path
62479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62480   # take no chances and rewrite it.
62481   # Note: m4 eats our [], so we need to use [ and ] instead.
62482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62483   if test "x$has_forbidden_chars" != x; then
62484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62488       # Going to short mode and back again did indeed matter. Since short mode is
62489       # case insensitive, let's make it lowercase to improve readability.
62490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62491       # Now convert it back to Unix-style (cygpath)
62492       input_path=`$CYGPATH -u "$shortmode_path"`
62493       new_path="$input_path"
62494     fi
62495   fi
62496 
62497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62498   if test "x$test_cygdrive_prefix" = x; then
62499     # As a simple fix, exclude /usr/bin since it's not a real path.
62500     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62502       # a path prefixed by /cygdrive for fixpath to work.
62503       new_path="$CYGWIN_ROOT_PATH$input_path"
62504     fi
62505   fi
62506 
62507 
62508   if test "x$path" != "x$new_path"; then
62509     FREETYPE_LIB_PATH="$new_path"
62510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62511 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62512   fi
62513 
62514     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62515 
62516   path="$FREETYPE_LIB_PATH"
62517   has_colon=`$ECHO $path | $GREP ^.:`
62518   new_path="$path"
62519   if test "x$has_colon" = x; then
62520     # Not in mixed or Windows style, start by that.
62521     new_path=`cmd //c echo $path`
62522   fi
62523 
62524 
62525   input_path="$new_path"
62526   # Check if we need to convert this using DOS-style short mode. If the path
62527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62528   # take no chances and rewrite it.
62529   # Note: m4 eats our [], so we need to use [ and ] instead.
62530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62531   if test "x$has_forbidden_chars" != x; then
62532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62533     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62534   fi
62535 
62536 
62537   windows_path="$new_path"
62538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62539     unix_path=`$CYGPATH -u "$windows_path"`
62540     new_path="$unix_path"
62541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62543     new_path="$unix_path"
62544   fi
62545 
62546   if test "x$path" != "x$new_path"; then
62547     FREETYPE_LIB_PATH="$new_path"
62548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62549 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62550   fi
62551 
62552   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62553   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62554 
62555     else
62556       # We're on a unix platform. Hooray! :)
62557       path="$FREETYPE_LIB_PATH"
62558       has_space=`$ECHO "$path" | $GREP " "`
62559       if test "x$has_space" != x; then
62560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62561 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62562         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62563       fi
62564 
62565       # Use eval to expand a potential ~
62566       eval path="$path"
62567       if test ! -f "$path" && test ! -d "$path"; then
62568         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62569       fi
62570 
62571       if test -d "$path"; then
62572         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62573       else
62574         dir="`$DIRNAME "$path"`"
62575         base="`$BASENAME "$path"`"
62576         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62577       fi
62578     fi
62579   fi
62580 
62581       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62582         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62583       else
62584         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62585       fi
62586     fi
62587 
62588     # Try to compile it
62589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62590 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62591     ac_ext=cpp
62592 ac_cpp='$CXXCPP $CPPFLAGS'
62593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62594 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62596 
62597     PREV_CXXCFLAGS="$CXXFLAGS"
62598     PREV_LIBS="$LIBS"
62599     PREV_CXX="$CXX"
62600     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62601     LIBS="$LIBS $FREETYPE_LIBS"
62602     CXX="$FIXPATH $CXX"
62603     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62604 /* end confdefs.h.  */
62605 
62606           #include<ft2build.h>
62607           #include FT_FREETYPE_H
62608           int main () {
62609             FT_Init_FreeType(NULL);
62610             return 0;
62611           }
62612 
62613 _ACEOF
62614 if ac_fn_cxx_try_link "$LINENO"; then :
62615 
62616           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62617 $as_echo "yes" >&6; }
62618 
62619 else
62620 
62621           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62622 $as_echo "no" >&6; }
62623           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62624 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62625           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62626 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62627 
62628 
62629   # Print a helpful message on how to acquire the necessary build dependency.
62630   # freetype is the help tag: freetype, cups, alsa etc
62631   MISSING_DEPENDENCY=freetype
62632 
62633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62634     cygwin_help $MISSING_DEPENDENCY
62635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62636     msys_help $MISSING_DEPENDENCY
62637   else
62638     PKGHANDLER_COMMAND=
62639 
62640     case $PKGHANDLER in
62641       apt-get)
62642         apt_help     $MISSING_DEPENDENCY ;;
62643       yum)
62644         yum_help     $MISSING_DEPENDENCY ;;
62645       port)
62646         port_help    $MISSING_DEPENDENCY ;;
62647       pkgutil)
62648         pkgutil_help $MISSING_DEPENDENCY ;;
62649       pkgadd)
62650         pkgadd_help  $MISSING_DEPENDENCY ;;
62651     esac
62652 
62653     if test "x$PKGHANDLER_COMMAND" != x; then
62654       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62655     fi
62656   fi
62657 
62658 
62659           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62660 
62661 
62662 fi
62663 rm -f core conftest.err conftest.$ac_objext \
62664     conftest$ac_exeext conftest.$ac_ext
62665     CXXCFLAGS="$PREV_CXXFLAGS"
62666     LIBS="$PREV_LIBS"
62667     CXX="$PREV_CXX"
62668     ac_ext=cpp
62669 ac_cpp='$CXXCPP $CPPFLAGS'
62670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62671 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62673 
62674 
62675     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62676 $as_echo_n "checking if we should bundle freetype... " >&6; }
62677     if test "x$BUNDLE_FREETYPE" = xyes; then
62678       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62679     fi
62680     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62681 $as_echo "$BUNDLE_FREETYPE" >&6; }
62682 
62683   fi # end freetype needed
62684 
62685 
62686 
62687 
62688 
62689 
62690 
62691 # Check whether --with-alsa was given.
62692 if test "${with_alsa+set}" = set; then :
62693   withval=$with_alsa;
62694 fi
62695 
62696 
62697 # Check whether --with-alsa-include was given.
62698 if test "${with_alsa_include+set}" = set; then :
62699   withval=$with_alsa_include;
62700 fi
62701 
62702 
62703 # Check whether --with-alsa-lib was given.
62704 if test "${with_alsa_lib+set}" = set; then :
62705   withval=$with_alsa_lib;
62706 fi
62707 
62708 
62709   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62710     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62711         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62712         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62713       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62714 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62715     fi
62716     ALSA_CFLAGS=
62717     ALSA_LIBS=
62718   else
62719     ALSA_FOUND=no
62720 
62721     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62722       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62723     fi
62724 
62725     if test "x${with_alsa}" != x; then
62726       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62727       ALSA_CFLAGS="-I${with_alsa}/include"
62728       ALSA_FOUND=yes
62729     fi
62730     if test "x${with_alsa_include}" != x; then
62731       ALSA_CFLAGS="-I${with_alsa_include}"
62732       ALSA_FOUND=yes
62733     fi
62734     if test "x${with_alsa_lib}" != x; then
62735       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62736       ALSA_FOUND=yes
62737     fi
62738     # Do not try pkg-config if we have a sysroot set.
62739     if test "x$SYSROOT" = x; then
62740       if test "x$ALSA_FOUND" = xno; then
62741 
62742 pkg_failed=no
62743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62744 $as_echo_n "checking for ALSA... " >&6; }
62745 
62746 if test -n "$ALSA_CFLAGS"; then
62747     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62748  elif test -n "$PKG_CONFIG"; then
62749     if test -n "$PKG_CONFIG" && \
62750     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62751   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62752   ac_status=$?
62753   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62754   test $ac_status = 0; }; then
62755   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62756 else
62757   pkg_failed=yes
62758 fi
62759  else
62760     pkg_failed=untried
62761 fi
62762 if test -n "$ALSA_LIBS"; then
62763     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62764  elif test -n "$PKG_CONFIG"; then
62765     if test -n "$PKG_CONFIG" && \
62766     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62767   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62768   ac_status=$?
62769   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62770   test $ac_status = 0; }; then
62771   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62772 else
62773   pkg_failed=yes
62774 fi
62775  else
62776     pkg_failed=untried
62777 fi
62778 
62779 
62780 
62781 if test $pkg_failed = yes; then
62782 
62783 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62784         _pkg_short_errors_supported=yes
62785 else
62786         _pkg_short_errors_supported=no
62787 fi
62788         if test $_pkg_short_errors_supported = yes; then
62789                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62790         else
62791                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62792         fi
62793         # Put the nasty error message in config.log where it belongs
62794         echo "$ALSA_PKG_ERRORS" >&5
62795 
62796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62797 $as_echo "no" >&6; }
62798                 ALSA_FOUND=no
62799 elif test $pkg_failed = untried; then
62800         ALSA_FOUND=no
62801 else
62802         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62803         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62804         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62805 $as_echo "yes" >&6; }
62806         ALSA_FOUND=yes
62807 fi
62808       fi
62809     fi
62810     if test "x$ALSA_FOUND" = xno; then
62811       for ac_header in alsa/asoundlib.h
62812 do :
62813   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62814 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62815   cat >>confdefs.h <<_ACEOF
62816 #define HAVE_ALSA_ASOUNDLIB_H 1
62817 _ACEOF
62818 
62819             ALSA_FOUND=yes
62820             ALSA_CFLAGS=-Iignoreme
62821             ALSA_LIBS=-lasound
62822             DEFAULT_ALSA=yes
62823 
62824 else
62825   ALSA_FOUND=no
62826 
62827 fi
62828 
62829 done
62830 
62831     fi
62832     if test "x$ALSA_FOUND" = xno; then
62833 
62834   # Print a helpful message on how to acquire the necessary build dependency.
62835   # alsa is the help tag: freetype, cups, alsa etc
62836   MISSING_DEPENDENCY=alsa
62837 
62838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62839     cygwin_help $MISSING_DEPENDENCY
62840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62841     msys_help $MISSING_DEPENDENCY
62842   else
62843     PKGHANDLER_COMMAND=
62844 
62845     case $PKGHANDLER in
62846       apt-get)
62847         apt_help     $MISSING_DEPENDENCY ;;
62848       yum)
62849         yum_help     $MISSING_DEPENDENCY ;;
62850       port)
62851         port_help    $MISSING_DEPENDENCY ;;
62852       pkgutil)
62853         pkgutil_help $MISSING_DEPENDENCY ;;
62854       pkgadd)
62855         pkgadd_help  $MISSING_DEPENDENCY ;;
62856     esac
62857 
62858     if test "x$PKGHANDLER_COMMAND" != x; then
62859       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62860     fi
62861   fi
62862 
62863       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62864     fi
62865   fi
62866 
62867 
62868 
62869 
62870 
62871 
62872 # Check whether --with-libffi was given.
62873 if test "${with_libffi+set}" = set; then :
62874   withval=$with_libffi;
62875 fi
62876 
62877 
62878 # Check whether --with-libffi-include was given.
62879 if test "${with_libffi_include+set}" = set; then :
62880   withval=$with_libffi_include;
62881 fi
62882 
62883 
62884 # Check whether --with-libffi-lib was given.
62885 if test "${with_libffi_lib+set}" = set; then :
62886   withval=$with_libffi_lib;
62887 fi
62888 
62889 
62890   if test "x$NEEDS_LIB_FFI" = xfalse; then
62891     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62892         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62893         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62894       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62895 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62896     fi
62897     LIBFFI_CFLAGS=
62898     LIBFFI_LIBS=
62899   else
62900     LIBFFI_FOUND=no
62901 
62902     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62903       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62904     fi
62905 
62906     if test "x${with_libffi}" != x; then
62907       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62908       LIBFFI_CFLAGS="-I${with_libffi}/include"
62909       LIBFFI_FOUND=yes
62910     fi
62911     if test "x${with_libffi_include}" != x; then
62912       LIBFFI_CFLAGS="-I${with_libffi_include}"
62913       LIBFFI_FOUND=yes
62914     fi
62915     if test "x${with_libffi_lib}" != x; then
62916       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62917       LIBFFI_FOUND=yes
62918     fi
62919     # Do not try pkg-config if we have a sysroot set.
62920     if test "x$SYSROOT" = x; then
62921       if test "x$LIBFFI_FOUND" = xno; then
62922         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62923 
62924 pkg_failed=no
62925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62926 $as_echo_n "checking for LIBFFI... " >&6; }
62927 
62928 if test -n "$LIBFFI_CFLAGS"; then
62929     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62930  elif test -n "$PKG_CONFIG"; then
62931     if test -n "$PKG_CONFIG" && \
62932     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62933   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62934   ac_status=$?
62935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62936   test $ac_status = 0; }; then
62937   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62938 else
62939   pkg_failed=yes
62940 fi
62941  else
62942     pkg_failed=untried
62943 fi
62944 if test -n "$LIBFFI_LIBS"; then
62945     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62946  elif test -n "$PKG_CONFIG"; then
62947     if test -n "$PKG_CONFIG" && \
62948     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62949   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62950   ac_status=$?
62951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62952   test $ac_status = 0; }; then
62953   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62954 else
62955   pkg_failed=yes
62956 fi
62957  else
62958     pkg_failed=untried
62959 fi
62960 
62961 
62962 
62963 if test $pkg_failed = yes; then
62964 
62965 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62966         _pkg_short_errors_supported=yes
62967 else
62968         _pkg_short_errors_supported=no
62969 fi
62970         if test $_pkg_short_errors_supported = yes; then
62971                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62972         else
62973                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62974         fi
62975         # Put the nasty error message in config.log where it belongs
62976         echo "$LIBFFI_PKG_ERRORS" >&5
62977 
62978         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62979 $as_echo "no" >&6; }
62980                 LIBFFI_FOUND=no
62981 elif test $pkg_failed = untried; then
62982         LIBFFI_FOUND=no
62983 else
62984         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62985         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62986         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62987 $as_echo "yes" >&6; }
62988         LIBFFI_FOUND=yes
62989 fi
62990       fi
62991     fi
62992     if test "x$LIBFFI_FOUND" = xno; then
62993       for ac_header in ffi.h
62994 do :
62995   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62996 if test "x$ac_cv_header_ffi_h" = xyes; then :
62997   cat >>confdefs.h <<_ACEOF
62998 #define HAVE_FFI_H 1
62999 _ACEOF
63000 
63001             LIBFFI_FOUND=yes
63002             LIBFFI_CFLAGS=
63003             LIBFFI_LIBS=-lffi
63004 
63005 else
63006   LIBFFI_FOUND=no
63007 
63008 fi
63009 
63010 done
63011 
63012     fi
63013     if test "x$LIBFFI_FOUND" = xno; then
63014 
63015   # Print a helpful message on how to acquire the necessary build dependency.
63016   # ffi is the help tag: freetype, cups, alsa etc
63017   MISSING_DEPENDENCY=ffi
63018 
63019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63020     cygwin_help $MISSING_DEPENDENCY
63021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63022     msys_help $MISSING_DEPENDENCY
63023   else
63024     PKGHANDLER_COMMAND=
63025 
63026     case $PKGHANDLER in
63027       apt-get)
63028         apt_help     $MISSING_DEPENDENCY ;;
63029       yum)
63030         yum_help     $MISSING_DEPENDENCY ;;
63031       port)
63032         port_help    $MISSING_DEPENDENCY ;;
63033       pkgutil)
63034         pkgutil_help $MISSING_DEPENDENCY ;;
63035       pkgadd)
63036         pkgadd_help  $MISSING_DEPENDENCY ;;
63037     esac
63038 
63039     if test "x$PKGHANDLER_COMMAND" != x; then
63040       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63041     fi
63042   fi
63043 
63044       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63045     fi
63046 
63047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63048 $as_echo_n "checking if libffi works... " >&6; }
63049     ac_ext=c
63050 ac_cpp='$CPP $CPPFLAGS'
63051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
63054 
63055     OLD_CFLAGS="$CFLAGS"
63056     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63057     OLD_LIBS="$LIBS"
63058     LIBS="$LIBS $LIBFFI_LIBS"
63059     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63060 /* end confdefs.h.  */
63061 #include <ffi.h>
63062 int
63063 main ()
63064 {
63065 
63066           ffi_call(NULL, NULL, NULL, NULL);
63067           return 0;
63068 
63069   ;
63070   return 0;
63071 }
63072 _ACEOF
63073 if ac_fn_c_try_link "$LINENO"; then :
63074   LIBFFI_WORKS=yes
63075 else
63076   LIBFFI_WORKS=no
63077 
63078 fi
63079 rm -f core conftest.err conftest.$ac_objext \
63080     conftest$ac_exeext conftest.$ac_ext
63081     CFLAGS="$OLD_CFLAGS"
63082     LIBS="$OLD_LIBS"
63083     ac_ext=cpp
63084 ac_cpp='$CXXCPP $CPPFLAGS'
63085 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63086 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63087 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63088 
63089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63090 $as_echo "$LIBFFI_WORKS" >&6; }
63091 
63092     if test "x$LIBFFI_WORKS" = xno; then
63093 
63094   # Print a helpful message on how to acquire the necessary build dependency.
63095   # ffi is the help tag: freetype, cups, alsa etc
63096   MISSING_DEPENDENCY=ffi
63097 
63098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63099     cygwin_help $MISSING_DEPENDENCY
63100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63101     msys_help $MISSING_DEPENDENCY
63102   else
63103     PKGHANDLER_COMMAND=
63104 
63105     case $PKGHANDLER in
63106       apt-get)
63107         apt_help     $MISSING_DEPENDENCY ;;
63108       yum)
63109         yum_help     $MISSING_DEPENDENCY ;;
63110       port)
63111         port_help    $MISSING_DEPENDENCY ;;
63112       pkgutil)
63113         pkgutil_help $MISSING_DEPENDENCY ;;
63114       pkgadd)
63115         pkgadd_help  $MISSING_DEPENDENCY ;;
63116     esac
63117 
63118     if test "x$PKGHANDLER_COMMAND" != x; then
63119       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63120     fi
63121   fi
63122 
63123       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63124     fi
63125   fi
63126 
63127 
63128 
63129 
63130 
63131   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63132     # Extract the first word of "llvm-config", so it can be a program name with args.
63133 set dummy llvm-config; ac_word=$2
63134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63135 $as_echo_n "checking for $ac_word... " >&6; }
63136 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63137   $as_echo_n "(cached) " >&6
63138 else
63139   if test -n "$LLVM_CONFIG"; then
63140   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63141 else
63142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63143 for as_dir in $PATH
63144 do
63145   IFS=$as_save_IFS
63146   test -z "$as_dir" && as_dir=.
63147     for ac_exec_ext in '' $ac_executable_extensions; do
63148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63149     ac_cv_prog_LLVM_CONFIG="llvm-config"
63150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63151     break 2
63152   fi
63153 done
63154   done
63155 IFS=$as_save_IFS
63156 
63157 fi
63158 fi
63159 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63160 if test -n "$LLVM_CONFIG"; then
63161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63162 $as_echo "$LLVM_CONFIG" >&6; }
63163 else
63164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63165 $as_echo "no" >&6; }
63166 fi
63167 
63168 
63169 
63170     if test "x$LLVM_CONFIG" != xllvm-config; then
63171       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63172     fi
63173 
63174     llvm_components="jit mcjit engine nativecodegen native"
63175     unset LLVM_CFLAGS
63176     for flag in $("$LLVM_CONFIG" --cxxflags); do
63177       if echo "${flag}" | grep -q '^-[ID]'; then
63178         if test "${flag}" != "-D_DEBUG" ; then
63179           if test "${LLVM_CFLAGS}" != "" ; then
63180             LLVM_CFLAGS="${LLVM_CFLAGS} "
63181           fi
63182           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63183         fi
63184       fi
63185     done
63186     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63187     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63188 
63189     unset LLVM_LDFLAGS
63190     for flag in $("${LLVM_CONFIG}" --ldflags); do
63191       if echo "${flag}" | grep -q '^-L'; then
63192         if test "${LLVM_LDFLAGS}" != ""; then
63193           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63194         fi
63195         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63196       fi
63197     done
63198 
63199     unset LLVM_LIBS
63200     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63201       if echo "${flag}" | grep -q '^-l'; then
63202         if test "${LLVM_LIBS}" != ""; then
63203           LLVM_LIBS="${LLVM_LIBS} "
63204         fi
63205         LLVM_LIBS="${LLVM_LIBS}${flag}"
63206       fi
63207     done
63208 
63209     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63210     # always properly detect -ltinfo
63211     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63212 
63213 
63214 
63215 
63216   fi
63217 
63218 
63219 
63220 # Check whether --with-libjpeg was given.
63221 if test "${with_libjpeg+set}" = set; then :
63222   withval=$with_libjpeg;
63223 fi
63224 
63225 
63226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63227 $as_echo_n "checking for which libjpeg to use... " >&6; }
63228   # default is bundled
63229   DEFAULT_LIBJPEG=bundled
63230   # if user didn't specify, use DEFAULT_LIBJPEG
63231   if test "x${with_libjpeg}" = "x"; then
63232     with_libjpeg=${DEFAULT_LIBJPEG}
63233   fi
63234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63235 $as_echo "${with_libjpeg}" >&6; }
63236 
63237   if test "x${with_libjpeg}" = "xbundled"; then
63238     USE_EXTERNAL_LIBJPEG=false
63239   elif test "x${with_libjpeg}" = "xsystem"; then
63240     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63241 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63242 
63243 else
63244    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63245 fi
63246 
63247 
63248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63249 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63250 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63251   $as_echo_n "(cached) " >&6
63252 else
63253   ac_check_lib_save_LIBS=$LIBS
63254 LIBS="-ljpeg  $LIBS"
63255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63256 /* end confdefs.h.  */
63257 
63258 /* Override any GCC internal prototype to avoid an error.
63259    Use char because int might match the return type of a GCC
63260    builtin and then its argument prototype would still apply.  */
63261 #ifdef __cplusplus
63262 extern "C"
63263 #endif
63264 char jpeg_CreateDecompress ();
63265 int
63266 main ()
63267 {
63268 return jpeg_CreateDecompress ();
63269   ;
63270   return 0;
63271 }
63272 _ACEOF
63273 if ac_fn_cxx_try_link "$LINENO"; then :
63274   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63275 else
63276   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63277 fi
63278 rm -f core conftest.err conftest.$ac_objext \
63279     conftest$ac_exeext conftest.$ac_ext
63280 LIBS=$ac_check_lib_save_LIBS
63281 fi
63282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63283 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63284 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63285   cat >>confdefs.h <<_ACEOF
63286 #define HAVE_LIBJPEG 1
63287 _ACEOF
63288 
63289   LIBS="-ljpeg $LIBS"
63290 
63291 else
63292    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63293 fi
63294 
63295 
63296     USE_EXTERNAL_LIBJPEG=true
63297   else
63298     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63299   fi
63300 
63301 
63302 
63303 
63304 
63305 # Check whether --with-giflib was given.
63306 if test "${with_giflib+set}" = set; then :
63307   withval=$with_giflib;
63308 fi
63309 
63310 
63311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63312 $as_echo_n "checking for which giflib to use... " >&6; }
63313   # default is bundled
63314   DEFAULT_GIFLIB=bundled
63315   # if user didn't specify, use DEFAULT_GIFLIB
63316   if test "x${with_giflib}" = "x"; then
63317     with_giflib=${DEFAULT_GIFLIB}
63318   fi
63319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63320 $as_echo "${with_giflib}" >&6; }
63321 
63322   if test "x${with_giflib}" = "xbundled"; then
63323     USE_EXTERNAL_LIBGIF=false
63324   elif test "x${with_giflib}" = "xsystem"; then
63325     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63326 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63327 
63328 else
63329    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63330 fi
63331 
63332 
63333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63334 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63335 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63336   $as_echo_n "(cached) " >&6
63337 else
63338   ac_check_lib_save_LIBS=$LIBS
63339 LIBS="-lgif  $LIBS"
63340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63341 /* end confdefs.h.  */
63342 
63343 /* Override any GCC internal prototype to avoid an error.
63344    Use char because int might match the return type of a GCC
63345    builtin and then its argument prototype would still apply.  */
63346 #ifdef __cplusplus
63347 extern "C"
63348 #endif
63349 char DGifGetCode ();
63350 int
63351 main ()
63352 {
63353 return DGifGetCode ();
63354   ;
63355   return 0;
63356 }
63357 _ACEOF
63358 if ac_fn_cxx_try_link "$LINENO"; then :
63359   ac_cv_lib_gif_DGifGetCode=yes
63360 else
63361   ac_cv_lib_gif_DGifGetCode=no
63362 fi
63363 rm -f core conftest.err conftest.$ac_objext \
63364     conftest$ac_exeext conftest.$ac_ext
63365 LIBS=$ac_check_lib_save_LIBS
63366 fi
63367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63368 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63369 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63370   cat >>confdefs.h <<_ACEOF
63371 #define HAVE_LIBGIF 1
63372 _ACEOF
63373 
63374   LIBS="-lgif $LIBS"
63375 
63376 else
63377    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63378 fi
63379 
63380 
63381     USE_EXTERNAL_LIBGIF=true
63382   else
63383     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63384   fi
63385 
63386 
63387 
63388 
63389 
63390 # Check whether --with-libpng was given.
63391 if test "${with_libpng+set}" = set; then :
63392   withval=$with_libpng;
63393 fi
63394 
63395 
63396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63397 $as_echo_n "checking for which libpng to use... " >&6; }
63398 
63399   # default is bundled
63400   DEFAULT_LIBPNG=bundled
63401   # if user didn't specify, use DEFAULT_LIBPNG
63402   if test "x${with_libpng}" = "x"; then
63403       with_libpng=${DEFAULT_LIBPNG}
63404   fi
63405 
63406   if test "x${with_libpng}" = "xbundled"; then
63407       USE_EXTERNAL_LIBPNG=false
63408       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63409 $as_echo "bundled" >&6; }
63410   elif test "x${with_libpng}" = "xsystem"; then
63411 
63412 pkg_failed=no
63413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63414 $as_echo_n "checking for PNG... " >&6; }
63415 
63416 if test -n "$PNG_CFLAGS"; then
63417     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63418  elif test -n "$PKG_CONFIG"; then
63419     if test -n "$PKG_CONFIG" && \
63420     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63421   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63422   ac_status=$?
63423   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63424   test $ac_status = 0; }; then
63425   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63426 else
63427   pkg_failed=yes
63428 fi
63429  else
63430     pkg_failed=untried
63431 fi
63432 if test -n "$PNG_LIBS"; then
63433     pkg_cv_PNG_LIBS="$PNG_LIBS"
63434  elif test -n "$PKG_CONFIG"; then
63435     if test -n "$PKG_CONFIG" && \
63436     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63437   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63438   ac_status=$?
63439   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63440   test $ac_status = 0; }; then
63441   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63442 else
63443   pkg_failed=yes
63444 fi
63445  else
63446     pkg_failed=untried
63447 fi
63448 
63449 
63450 
63451 if test $pkg_failed = yes; then
63452 
63453 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63454         _pkg_short_errors_supported=yes
63455 else
63456         _pkg_short_errors_supported=no
63457 fi
63458         if test $_pkg_short_errors_supported = yes; then
63459                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63460         else
63461                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63462         fi
63463         # Put the nasty error message in config.log where it belongs
63464         echo "$PNG_PKG_ERRORS" >&5
63465 
63466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63467 $as_echo "no" >&6; }
63468                  LIBPNG_FOUND=no
63469 elif test $pkg_failed = untried; then
63470          LIBPNG_FOUND=no
63471 else
63472         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63473         PNG_LIBS=$pkg_cv_PNG_LIBS
63474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63475 $as_echo "yes" >&6; }
63476          LIBPNG_FOUND=yes
63477 fi
63478       if test "x${LIBPNG_FOUND}" = "xyes"; then
63479           USE_EXTERNAL_LIBPNG=true
63480           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63481 $as_echo "system" >&6; }
63482       else
63483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63484 $as_echo "system not found" >&6; }
63485           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63486       fi
63487   else
63488       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63489   fi
63490 
63491 
63492 
63493 
63494 
63495 # Check whether --with-zlib was given.
63496 if test "${with_zlib+set}" = set; then :
63497   withval=$with_zlib;
63498 fi
63499 
63500 
63501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63502 $as_echo_n "checking for compress in -lz... " >&6; }
63503 if ${ac_cv_lib_z_compress+:} false; then :
63504   $as_echo_n "(cached) " >&6
63505 else
63506   ac_check_lib_save_LIBS=$LIBS
63507 LIBS="-lz  $LIBS"
63508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63509 /* end confdefs.h.  */
63510 
63511 /* Override any GCC internal prototype to avoid an error.
63512    Use char because int might match the return type of a GCC
63513    builtin and then its argument prototype would still apply.  */
63514 #ifdef __cplusplus
63515 extern "C"
63516 #endif
63517 char compress ();
63518 int
63519 main ()
63520 {
63521 return compress ();
63522   ;
63523   return 0;
63524 }
63525 _ACEOF
63526 if ac_fn_cxx_try_link "$LINENO"; then :
63527   ac_cv_lib_z_compress=yes
63528 else
63529   ac_cv_lib_z_compress=no
63530 fi
63531 rm -f core conftest.err conftest.$ac_objext \
63532     conftest$ac_exeext conftest.$ac_ext
63533 LIBS=$ac_check_lib_save_LIBS
63534 fi
63535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63536 $as_echo "$ac_cv_lib_z_compress" >&6; }
63537 if test "x$ac_cv_lib_z_compress" = xyes; then :
63538    ZLIB_FOUND=yes
63539 else
63540    ZLIB_FOUND=no
63541 fi
63542 
63543 
63544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63545 $as_echo_n "checking for which zlib to use... " >&6; }
63546 
63547   DEFAULT_ZLIB=system
63548   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63549     # On windows default is bundled...on others default is system
63550     DEFAULT_ZLIB=bundled
63551   fi
63552 
63553   if test "x${ZLIB_FOUND}" != "xyes"; then
63554     # If we don't find any system...set default to bundled
63555     DEFAULT_ZLIB=bundled
63556   fi
63557 
63558   # If user didn't specify, use DEFAULT_ZLIB
63559   if test "x${with_zlib}" = "x"; then
63560     with_zlib=${DEFAULT_ZLIB}
63561   fi
63562 
63563   if test "x${with_zlib}" = "xbundled"; then
63564     USE_EXTERNAL_LIBZ=false
63565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63566 $as_echo "bundled" >&6; }
63567   elif test "x${with_zlib}" = "xsystem"; then
63568     if test "x${ZLIB_FOUND}" = "xyes"; then
63569       USE_EXTERNAL_LIBZ=true
63570       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63571 $as_echo "system" >&6; }
63572     else
63573       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63574 $as_echo "system not found" >&6; }
63575       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63576     fi
63577   else
63578     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63579   fi
63580 
63581 
63582 
63583 
63584 
63585 # Check whether --with-lcms was given.
63586 if test "${with_lcms+set}" = set; then :
63587   withval=$with_lcms;
63588 fi
63589 
63590 
63591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63592 $as_echo_n "checking for which lcms to use... " >&6; }
63593 
63594   DEFAULT_LCMS=bundled
63595   # If user didn't specify, use DEFAULT_LCMS
63596   if test "x${with_lcms}" = "x"; then
63597       with_lcms=${DEFAULT_LCMS}
63598   fi
63599 
63600   if test "x${with_lcms}" = "xbundled"; then
63601     USE_EXTERNAL_LCMS=false
63602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63603 $as_echo "bundled" >&6; }
63604   elif test "x${with_lcms}" = "xsystem"; then
63605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63606 $as_echo "system" >&6; }
63607 
63608 pkg_failed=no
63609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63610 $as_echo_n "checking for LCMS... " >&6; }
63611 
63612 if test -n "$LCMS_CFLAGS"; then
63613     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63614  elif test -n "$PKG_CONFIG"; then
63615     if test -n "$PKG_CONFIG" && \
63616     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63617   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63618   ac_status=$?
63619   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63620   test $ac_status = 0; }; then
63621   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63622 else
63623   pkg_failed=yes
63624 fi
63625  else
63626     pkg_failed=untried
63627 fi
63628 if test -n "$LCMS_LIBS"; then
63629     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63630  elif test -n "$PKG_CONFIG"; then
63631     if test -n "$PKG_CONFIG" && \
63632     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63633   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63634   ac_status=$?
63635   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63636   test $ac_status = 0; }; then
63637   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63638 else
63639   pkg_failed=yes
63640 fi
63641  else
63642     pkg_failed=untried
63643 fi
63644 
63645 
63646 
63647 if test $pkg_failed = yes; then
63648 
63649 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63650         _pkg_short_errors_supported=yes
63651 else
63652         _pkg_short_errors_supported=no
63653 fi
63654         if test $_pkg_short_errors_supported = yes; then
63655                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63656         else
63657                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63658         fi
63659         # Put the nasty error message in config.log where it belongs
63660         echo "$LCMS_PKG_ERRORS" >&5
63661 
63662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63663 $as_echo "no" >&6; }
63664                 LCMS_FOUND=no
63665 elif test $pkg_failed = untried; then
63666         LCMS_FOUND=no
63667 else
63668         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63669         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63671 $as_echo "yes" >&6; }
63672         LCMS_FOUND=yes
63673 fi
63674     if test "x${LCMS_FOUND}" = "xyes"; then
63675       USE_EXTERNAL_LCMS=true
63676     else
63677       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63678     fi
63679   else
63680     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63681   fi
63682 
63683 
63684 
63685 
63686 
63687 
63688 
63689 
63690 
63691 
63692 
63693   # Setup libm (the maths library)
63694   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63696 $as_echo_n "checking for cos in -lm... " >&6; }
63697 if ${ac_cv_lib_m_cos+:} false; then :
63698   $as_echo_n "(cached) " >&6
63699 else
63700   ac_check_lib_save_LIBS=$LIBS
63701 LIBS="-lm  $LIBS"
63702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63703 /* end confdefs.h.  */
63704 
63705 /* Override any GCC internal prototype to avoid an error.
63706    Use char because int might match the return type of a GCC
63707    builtin and then its argument prototype would still apply.  */
63708 #ifdef __cplusplus
63709 extern "C"
63710 #endif
63711 char cos ();
63712 int
63713 main ()
63714 {
63715 return cos ();
63716   ;
63717   return 0;
63718 }
63719 _ACEOF
63720 if ac_fn_cxx_try_link "$LINENO"; then :
63721   ac_cv_lib_m_cos=yes
63722 else
63723   ac_cv_lib_m_cos=no
63724 fi
63725 rm -f core conftest.err conftest.$ac_objext \
63726     conftest$ac_exeext conftest.$ac_ext
63727 LIBS=$ac_check_lib_save_LIBS
63728 fi
63729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63730 $as_echo "$ac_cv_lib_m_cos" >&6; }
63731 if test "x$ac_cv_lib_m_cos" = xyes; then :
63732   cat >>confdefs.h <<_ACEOF
63733 #define HAVE_LIBM 1
63734 _ACEOF
63735 
63736   LIBS="-lm $LIBS"
63737 
63738 else
63739 
63740         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63741 $as_echo "$as_me: Maths library was not found" >&6;}
63742 
63743 fi
63744 
63745     LIBM="-lm"
63746   else
63747     LIBM=""
63748   fi
63749 
63750 
63751   # Setup libdl (for dynamic library loading)
63752   save_LIBS="$LIBS"
63753   LIBS=""
63754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63755 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63756 if ${ac_cv_lib_dl_dlopen+:} false; then :
63757   $as_echo_n "(cached) " >&6
63758 else
63759   ac_check_lib_save_LIBS=$LIBS
63760 LIBS="-ldl  $LIBS"
63761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63762 /* end confdefs.h.  */
63763 
63764 /* Override any GCC internal prototype to avoid an error.
63765    Use char because int might match the return type of a GCC
63766    builtin and then its argument prototype would still apply.  */
63767 #ifdef __cplusplus
63768 extern "C"
63769 #endif
63770 char dlopen ();
63771 int
63772 main ()
63773 {
63774 return dlopen ();
63775   ;
63776   return 0;
63777 }
63778 _ACEOF
63779 if ac_fn_cxx_try_link "$LINENO"; then :
63780   ac_cv_lib_dl_dlopen=yes
63781 else
63782   ac_cv_lib_dl_dlopen=no
63783 fi
63784 rm -f core conftest.err conftest.$ac_objext \
63785     conftest$ac_exeext conftest.$ac_ext
63786 LIBS=$ac_check_lib_save_LIBS
63787 fi
63788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63789 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63790 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63791   cat >>confdefs.h <<_ACEOF
63792 #define HAVE_LIBDL 1
63793 _ACEOF
63794 
63795   LIBS="-ldl $LIBS"
63796 
63797 fi
63798 
63799   LIBDL="$LIBS"
63800 
63801   LIBS="$save_LIBS"
63802 
63803   # Deprecated libraries, keep the flags for backwards compatibility
63804   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63805 
63806 
63807 # Check whether --with-dxsdk was given.
63808 if test "${with_dxsdk+set}" = set; then :
63809   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63810 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63811 fi
63812 
63813 
63814 
63815 
63816 # Check whether --with-dxsdk-lib was given.
63817 if test "${with_dxsdk_lib+set}" = set; then :
63818   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63819 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63820 fi
63821 
63822 
63823 
63824 
63825 # Check whether --with-dxsdk-include was given.
63826 if test "${with_dxsdk_include+set}" = set; then :
63827   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63828 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63829 fi
63830 
63831 
63832   fi
63833 
63834   # Control if libzip can use mmap. Available for purposes of overriding.
63835   LIBZIP_CAN_USE_MMAP=true
63836 
63837 
63838 
63839   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63840     # Find the root of the Solaris Studio installation from the compiler path
63841     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63842     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63843     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63844 $as_echo_n "checking for libstlport.so.1... " >&6; }
63845     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63846       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63847       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63848     fi
63849     if test -f "$STLPORT_LIB"; then
63850       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63851 $as_echo "yes, $STLPORT_LIB" >&6; }
63852 
63853   # Only process if variable expands to non-empty
63854 
63855   if test "x$STLPORT_LIB" != x; then
63856     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63857 
63858   # Input might be given as Windows format, start by converting to
63859   # unix format.
63860   path="$STLPORT_LIB"
63861   new_path=`$CYGPATH -u "$path"`
63862 
63863   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63864   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63865   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63866   # "foo.exe" is OK but "foo" is an error.
63867   #
63868   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63869   # It is also a way to make sure we got the proper file name for the real test later on.
63870   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63871   if test "x$test_shortpath" = x; then
63872     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63873 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63874     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63875   fi
63876 
63877   # Call helper function which possibly converts this using DOS-style short mode.
63878   # If so, the updated path is stored in $new_path.
63879 
63880   input_path="$new_path"
63881   # Check if we need to convert this using DOS-style short mode. If the path
63882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63883   # take no chances and rewrite it.
63884   # Note: m4 eats our [], so we need to use [ and ] instead.
63885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63886   if test "x$has_forbidden_chars" != x; then
63887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63891       # Going to short mode and back again did indeed matter. Since short mode is
63892       # case insensitive, let's make it lowercase to improve readability.
63893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63894       # Now convert it back to Unix-style (cygpath)
63895       input_path=`$CYGPATH -u "$shortmode_path"`
63896       new_path="$input_path"
63897     fi
63898   fi
63899 
63900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63901   if test "x$test_cygdrive_prefix" = x; then
63902     # As a simple fix, exclude /usr/bin since it's not a real path.
63903     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63905       # a path prefixed by /cygdrive for fixpath to work.
63906       new_path="$CYGWIN_ROOT_PATH$input_path"
63907     fi
63908   fi
63909 
63910 
63911   if test "x$path" != "x$new_path"; then
63912     STLPORT_LIB="$new_path"
63913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63914 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63915   fi
63916 
63917     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63918 
63919   path="$STLPORT_LIB"
63920   has_colon=`$ECHO $path | $GREP ^.:`
63921   new_path="$path"
63922   if test "x$has_colon" = x; then
63923     # Not in mixed or Windows style, start by that.
63924     new_path=`cmd //c echo $path`
63925   fi
63926 
63927 
63928   input_path="$new_path"
63929   # Check if we need to convert this using DOS-style short mode. If the path
63930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63931   # take no chances and rewrite it.
63932   # Note: m4 eats our [], so we need to use [ and ] instead.
63933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63934   if test "x$has_forbidden_chars" != x; then
63935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63937   fi
63938 
63939 
63940   windows_path="$new_path"
63941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63942     unix_path=`$CYGPATH -u "$windows_path"`
63943     new_path="$unix_path"
63944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63946     new_path="$unix_path"
63947   fi
63948 
63949   if test "x$path" != "x$new_path"; then
63950     STLPORT_LIB="$new_path"
63951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63952 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63953   fi
63954 
63955   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63956   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63957 
63958     else
63959       # We're on a unix platform. Hooray! :)
63960       path="$STLPORT_LIB"
63961       has_space=`$ECHO "$path" | $GREP " "`
63962       if test "x$has_space" != x; then
63963         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63964 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63965         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63966       fi
63967 
63968       # Use eval to expand a potential ~
63969       eval path="$path"
63970       if test ! -f "$path" && test ! -d "$path"; then
63971         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63972       fi
63973 
63974       if test -d "$path"; then
63975         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63976       else
63977         dir="`$DIRNAME "$path"`"
63978         base="`$BASENAME "$path"`"
63979         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63980       fi
63981     fi
63982   fi
63983 
63984     else
63985       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63986 $as_echo "no, not found at $STLPORT_LIB" >&6; }
63987       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63988     fi
63989 
63990   fi
63991 
63992 
63993 
63994 
63995 
63996 
63997 
63998 
63999 
64000 
64001 
64002 
64003 
64004 
64005 ###############################################################################
64006 #
64007 # We need to do some final tweaking, when everything else is done.
64008 #
64009 ###############################################################################
64010 
64011 
64012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64013 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64014 
64015   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64016     ENABLE_INTREE_EC=yes
64017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64018 $as_echo "yes" >&6; }
64019   else
64020     ENABLE_INTREE_EC=no
64021     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64022 $as_echo "no" >&6; }
64023   fi
64024 
64025 
64026 
64027 
64028   # Check whether --enable-jtreg-failure-handler was given.
64029 if test "${enable_jtreg_failure_handler+set}" = set; then :
64030   enableval=$enable_jtreg_failure_handler;
64031 fi
64032 
64033 
64034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64035 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64036 
64037   if test "x$enable_jtreg_failure_handler" = "xyes"; then
64038     if test "x$JT_HOME" = "x"; then
64039       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64040     else
64041       BUILD_FAILURE_HANDLER=true
64042       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64043 $as_echo "yes, forced" >&6; }
64044     fi
64045   elif test "x$enable_jtreg_failure_handler" = "xno"; then
64046     BUILD_FAILURE_HANDLER=false
64047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64048 $as_echo "no, forced" >&6; }
64049   elif test "x$enable_jtreg_failure_handler" = "xauto" \
64050       || test "x$enable_jtreg_failure_handler" = "x"; then
64051     if test "x$JT_HOME" = "x"; then
64052       BUILD_FAILURE_HANDLER=false
64053       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64054 $as_echo "no, missing jtreg" >&6; }
64055     else
64056       BUILD_FAILURE_HANDLER=true
64057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64058 $as_echo "yes, jtreg present" >&6; }
64059     fi
64060   else
64061     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64062   fi
64063 
64064 
64065 
64066 
64067   # Check whether --enable-generate-classlist was given.
64068 if test "${enable_generate_classlist+set}" = set; then :
64069   enableval=$enable_generate_classlist;
64070 fi
64071 
64072 
64073   # Check if it's likely that it's possible to generate the classlist. Depending
64074   # on exact jvm configuration it could be possible anyway.
64075   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64076     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64077   else
64078     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64079   fi
64080 
64081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64082 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64083   if test "x$enable_generate_classlist" = "xyes"; then
64084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64085 $as_echo "yes, forced" >&6; }
64086     ENABLE_GENERATE_CLASSLIST="true"
64087     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64088       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64089 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64090     fi
64091   elif test "x$enable_generate_classlist" = "xno"; then
64092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64093 $as_echo "no, forced" >&6; }
64094     ENABLE_GENERATE_CLASSLIST="false"
64095   elif test "x$enable_generate_classlist" = "x"; then
64096     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64097       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64098 $as_echo "yes" >&6; }
64099       ENABLE_GENERATE_CLASSLIST="true"
64100     else
64101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64102 $as_echo "no" >&6; }
64103       ENABLE_GENERATE_CLASSLIST="false"
64104     fi
64105   else
64106     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64107   fi
64108 
64109 
64110 
64111 
64112 ###############################################################################
64113 #
64114 # Configure parts of the build that only affect the build performance,
64115 # not the result.
64116 #
64117 ###############################################################################
64118 
64119 
64120   # How many cores do we have on this build system?
64121 
64122 # Check whether --with-num-cores was given.
64123 if test "${with_num_cores+set}" = set; then :
64124   withval=$with_num_cores;
64125 fi
64126 
64127   if test "x$with_num_cores" = x; then
64128     # The number of cores were not specified, try to probe them.
64129 
64130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64131 $as_echo_n "checking for number of cores... " >&6; }
64132   NUM_CORES=1
64133   FOUND_CORES=no
64134 
64135   if test -f /proc/cpuinfo; then
64136     # Looks like a Linux (or cygwin) system
64137     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64138     FOUND_CORES=yes
64139   elif test -x /usr/sbin/psrinfo; then
64140     # Looks like a Solaris system
64141     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64142     FOUND_CORES=yes
64143   elif test -x /usr/sbin/sysctl; then
64144     # Looks like a MacOSX system
64145     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64146     FOUND_CORES=yes
64147   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64148     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64149     FOUND_CORES=yes
64150   elif test -n "$NUMBER_OF_PROCESSORS"; then
64151     # On windows, look in the env
64152     NUM_CORES=$NUMBER_OF_PROCESSORS
64153     FOUND_CORES=yes
64154   fi
64155 
64156   if test "x$FOUND_CORES" = xyes; then
64157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64158 $as_echo "$NUM_CORES" >&6; }
64159   else
64160     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64161 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64162     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64163 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64164   fi
64165 
64166   else
64167     NUM_CORES=$with_num_cores
64168   fi
64169 
64170 
64171 
64172   # How much memory do we have on this build system?
64173 
64174 # Check whether --with-memory-size was given.
64175 if test "${with_memory_size+set}" = set; then :
64176   withval=$with_memory_size;
64177 fi
64178 
64179   if test "x$with_memory_size" = x; then
64180     # The memory size was not specified, try to probe it.
64181 
64182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64183 $as_echo_n "checking for memory size... " >&6; }
64184   # Default to 1024 MB
64185   MEMORY_SIZE=1024
64186   FOUND_MEM=no
64187 
64188   if test -f /proc/meminfo; then
64189     # Looks like a Linux (or cygwin) system
64190     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64191     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64192     FOUND_MEM=yes
64193   elif test -x /usr/sbin/prtconf; then
64194     # Looks like a Solaris or AIX system
64195     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64196     FOUND_MEM=yes
64197   elif test -x /usr/sbin/sysctl; then
64198     # Looks like a MacOSX system
64199     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64200     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64201     FOUND_MEM=yes
64202   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64203     # Windows, but without cygwin
64204     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64205     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64206     FOUND_MEM=yes
64207   fi
64208 
64209   if test "x$FOUND_MEM" = xyes; then
64210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64211 $as_echo "$MEMORY_SIZE MB" >&6; }
64212   else
64213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64214 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64215     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64216 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64217   fi
64218 
64219   else
64220     MEMORY_SIZE=$with_memory_size
64221   fi
64222 
64223 
64224 
64225   # Provide a decent default number of parallel jobs for make depending on
64226   # number of cores, amount of memory and machine architecture.
64227 
64228 # Check whether --with-jobs was given.
64229 if test "${with_jobs+set}" = set; then :
64230   withval=$with_jobs;
64231 fi
64232 
64233   if test "x$with_jobs" = x; then
64234     # Number of jobs was not specified, calculate.
64235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64236 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64237     # Approximate memory in GB.
64238     memory_gb=`expr $MEMORY_SIZE / 1024`
64239     # Pick the lowest of memory in gb and number of cores.
64240     if test "$memory_gb" -lt "$NUM_CORES"; then
64241       JOBS="$memory_gb"
64242     else
64243       JOBS="$NUM_CORES"
64244     fi
64245     if test "$JOBS" -eq "0"; then
64246       JOBS=1
64247     fi
64248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64249 $as_echo "$JOBS" >&6; }
64250   else
64251     JOBS=$with_jobs
64252   fi
64253 
64254 
64255 
64256   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64257 
64258 # Check whether --with-test-jobs was given.
64259 if test "${with_test_jobs+set}" = set; then :
64260   withval=$with_test_jobs;
64261 fi
64262 
64263   if test "x$with_test_jobs" = x; then
64264       TEST_JOBS=0
64265   else
64266       TEST_JOBS=$with_test_jobs
64267   fi
64268 
64269 
64270 
64271 # Setup arguments for the boot jdk (after cores and memory have been setup)
64272 
64273   ##############################################################################
64274   #
64275   # Specify jvm options for anything that is run with the Boot JDK.
64276   # Not all JVM:s accept the same arguments on the command line.
64277   #
64278 
64279 # Check whether --with-boot-jdk-jvmargs was given.
64280 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64281   withval=$with_boot_jdk_jvmargs;
64282 fi
64283 
64284 
64285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64286 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64287 
64288   # Disable special log output when a debug build is used as Boot JDK...
64289 
64290   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64291   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64292   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64293   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64294   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64295   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64296     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64297     JVM_ARG_OK=true
64298   else
64299     $ECHO "Arg failed:" >&5
64300     $ECHO "$OUTPUT" >&5
64301     JVM_ARG_OK=false
64302   fi
64303 
64304 
64305   # Force en-US environment
64306 
64307   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64308   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64309   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64310   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64311   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64312   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64313     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64314     JVM_ARG_OK=true
64315   else
64316     $ECHO "Arg failed:" >&5
64317     $ECHO "$OUTPUT" >&5
64318     JVM_ARG_OK=false
64319   fi
64320 
64321 
64322   # Apply user provided options.
64323 
64324   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64325   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64326   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64327   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64328   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64329   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64330     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64331     JVM_ARG_OK=true
64332   else
64333     $ECHO "Arg failed:" >&5
64334     $ECHO "$OUTPUT" >&5
64335     JVM_ARG_OK=false
64336   fi
64337 
64338 
64339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64340 $as_echo "$boot_jdk_jvmargs" >&6; }
64341 
64342   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64343   JAVA_FLAGS=$boot_jdk_jvmargs
64344 
64345 
64346 
64347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64348 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64349 
64350   # Starting amount of heap memory.
64351 
64352   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64353   $ECHO "Command: $JAVA -Xms64M -version" >&5
64354   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64355   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64356   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64357   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64358     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64359     JVM_ARG_OK=true
64360   else
64361     $ECHO "Arg failed:" >&5
64362     $ECHO "$OUTPUT" >&5
64363     JVM_ARG_OK=false
64364   fi
64365 
64366   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64367 
64368   # Maximum amount of heap memory and stack size.
64369   JVM_HEAP_LIMIT_32="1024"
64370   # Running a 64 bit JVM allows for and requires a bigger heap
64371   JVM_HEAP_LIMIT_64="1600"
64372   STACK_SIZE_32=768
64373   STACK_SIZE_64=1536
64374   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64375   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64376     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64377   fi
64378   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64379     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64380   fi
64381   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64382     JVM_HEAP_LIMIT_32=512
64383     JVM_HEAP_LIMIT_64=512
64384   fi
64385 
64386   if test "x$BOOT_JDK_BITS" = "x32"; then
64387     STACK_SIZE=$STACK_SIZE_32
64388     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64389   else
64390     STACK_SIZE=$STACK_SIZE_64
64391     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64392   fi
64393 
64394   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64395   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64396   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64397   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64398   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64399   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64400     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64401     JVM_ARG_OK=true
64402   else
64403     $ECHO "Arg failed:" >&5
64404     $ECHO "$OUTPUT" >&5
64405     JVM_ARG_OK=false
64406   fi
64407 
64408 
64409   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64410   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64411   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64412   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64413   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64414   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64415     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64416     JVM_ARG_OK=true
64417   else
64418     $ECHO "Arg failed:" >&5
64419     $ECHO "$OUTPUT" >&5
64420     JVM_ARG_OK=false
64421   fi
64422 
64423 
64424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64425 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64426 
64427   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64428 
64429 
64430   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64431     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64432     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64433   else
64434     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64435     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64436   fi
64437   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64438   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64440 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64442 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64443 
64444 
64445   # By default, the main javac compilations use big
64446   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64447 
64448 
64449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64450 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64451 
64452   # Use serial gc for small short lived tools if possible
64453 
64454   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64455   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64456   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64457   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64458   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64459   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64460     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64461     JVM_ARG_OK=true
64462   else
64463     $ECHO "Arg failed:" >&5
64464     $ECHO "$OUTPUT" >&5
64465     JVM_ARG_OK=false
64466   fi
64467 
64468 
64469   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64470   $ECHO "Command: $JAVA -Xms32M -version" >&5
64471   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64472   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64473   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64474   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64475     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64476     JVM_ARG_OK=true
64477   else
64478     $ECHO "Arg failed:" >&5
64479     $ECHO "$OUTPUT" >&5
64480     JVM_ARG_OK=false
64481   fi
64482 
64483 
64484   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64485   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64486   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64487   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64488   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64489   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64490     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64491     JVM_ARG_OK=true
64492   else
64493     $ECHO "Arg failed:" >&5
64494     $ECHO "$OUTPUT" >&5
64495     JVM_ARG_OK=false
64496   fi
64497 
64498 
64499   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64500   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64501   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64502   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64503   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64504   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64505     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64506     JVM_ARG_OK=true
64507   else
64508     $ECHO "Arg failed:" >&5
64509     $ECHO "$OUTPUT" >&5
64510     JVM_ARG_OK=false
64511   fi
64512 
64513 
64514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64515 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64516 
64517   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64518 
64519 
64520   JAVA_TOOL_FLAGS_SMALL=""
64521   for f in $JAVA_FLAGS_SMALL; do
64522     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64523   done
64524 
64525 
64526 
64527 # Setup smart javac (after cores and memory have been setup)
64528 
64529 
64530 # Check whether --with-sjavac-server-java was given.
64531 if test "${with_sjavac_server_java+set}" = set; then :
64532   withval=$with_sjavac_server_java;
64533 fi
64534 
64535 
64536   if test "x$with_sjavac_server_java" != x; then
64537     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64538     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64539     if test "x$FOUND_VERSION" = x; then
64540       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64541     fi
64542   else
64543     SJAVAC_SERVER_JAVA="$JAVA"
64544   fi
64545 
64546 
64547   if test "$MEMORY_SIZE" -gt "3000"; then
64548 
64549   $ECHO "Check if jvm arg is ok: -d64" >&5
64550   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64551   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64552   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64553   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64554   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64555     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64556     JVM_ARG_OK=true
64557   else
64558     $ECHO "Arg failed:" >&5
64559     $ECHO "$OUTPUT" >&5
64560     JVM_ARG_OK=false
64561   fi
64562 
64563     if test "$JVM_ARG_OK" = true; then
64564       JVM_64BIT=true
64565       JVM_ARG_OK=false
64566     fi
64567   fi
64568 
64569   MX_VALUE=`expr $MEMORY_SIZE / 2`
64570   if test "$JVM_64BIT" = true; then
64571     # Set ms lower than mx since more than one instance of the server might
64572     # get launched at the same time before they figure out which instance won.
64573     MS_VALUE=512
64574     if test "$MX_VALUE" -gt "2048"; then
64575       MX_VALUE=2048
64576     fi
64577   else
64578     MS_VALUE=256
64579     if test "$MX_VALUE" -gt "1500"; then
64580       MX_VALUE=1500
64581     fi
64582   fi
64583   if test "$MX_VALUE" -lt "512"; then
64584     MX_VALUE=512
64585   fi
64586 
64587   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64588   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64589   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64590   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64591   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64592   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64593     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64594     JVM_ARG_OK=true
64595   else
64596     $ECHO "Arg failed:" >&5
64597     $ECHO "$OUTPUT" >&5
64598     JVM_ARG_OK=false
64599   fi
64600 
64601 
64602 
64603   # Check whether --enable-sjavac was given.
64604 if test "${enable_sjavac+set}" = set; then :
64605   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64606 else
64607   ENABLE_SJAVAC="no"
64608 fi
64609 
64610   if test "x$JVM_ARG_OK" = "xfalse"; then
64611     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64612 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64613     ENABLE_SJAVAC="no"
64614   fi
64615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64616 $as_echo_n "checking whether to use sjavac... " >&6; }
64617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64618 $as_echo "$ENABLE_SJAVAC" >&6; }
64619 
64620 
64621   # Check whether --enable-javac-server was given.
64622 if test "${enable_javac_server+set}" = set; then :
64623   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64624 else
64625   ENABLE_JAVAC_SERVER="yes"
64626 fi
64627 
64628   if test "x$JVM_ARG_OK" = "xfalse"; then
64629     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64630 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64631     ENABLE_JAVAC_SERVER="no"
64632   fi
64633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64634 $as_echo_n "checking whether to use javac server... " >&6; }
64635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64636 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64637 
64638 
64639   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64640     # When using a server javac, the small client instances do not need much
64641     # resources.
64642     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64643   fi
64644 
64645 
64646 # Setup use of icecc if requested
64647 
64648   # Check whether --enable-icecc was given.
64649 if test "${enable_icecc+set}" = set; then :
64650   enableval=$enable_icecc;
64651 fi
64652 
64653 
64654   if test "x${enable_icecc}" = "xyes"; then
64655 
64656 
64657 
64658   # Publish this variable in the help.
64659 
64660 
64661   if [ -z "${ICECC_CMD+x}" ]; then
64662     # The variable is not set by user, try to locate tool using the code snippet
64663     for ac_prog in icecc
64664 do
64665   # Extract the first word of "$ac_prog", so it can be a program name with args.
64666 set dummy $ac_prog; ac_word=$2
64667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64668 $as_echo_n "checking for $ac_word... " >&6; }
64669 if ${ac_cv_path_ICECC_CMD+:} false; then :
64670   $as_echo_n "(cached) " >&6
64671 else
64672   case $ICECC_CMD in
64673   [\\/]* | ?:[\\/]*)
64674   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64675   ;;
64676   *)
64677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64678 for as_dir in $PATH
64679 do
64680   IFS=$as_save_IFS
64681   test -z "$as_dir" && as_dir=.
64682     for ac_exec_ext in '' $ac_executable_extensions; do
64683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64684     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64686     break 2
64687   fi
64688 done
64689   done
64690 IFS=$as_save_IFS
64691 
64692   ;;
64693 esac
64694 fi
64695 ICECC_CMD=$ac_cv_path_ICECC_CMD
64696 if test -n "$ICECC_CMD"; then
64697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64698 $as_echo "$ICECC_CMD" >&6; }
64699 else
64700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64701 $as_echo "no" >&6; }
64702 fi
64703 
64704 
64705   test -n "$ICECC_CMD" && break
64706 done
64707 
64708   else
64709     # The variable is set, but is it from the command line or the environment?
64710 
64711     # Try to remove the string !ICECC_CMD! from our list.
64712     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64713     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64714       # If it failed, the variable was not from the command line. Ignore it,
64715       # but warn the user (except for BASH, which is always set by the calling BASH).
64716       if test "xICECC_CMD" != xBASH; then
64717         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64718 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64719       fi
64720       # Try to locate tool using the code snippet
64721       for ac_prog in icecc
64722 do
64723   # Extract the first word of "$ac_prog", so it can be a program name with args.
64724 set dummy $ac_prog; ac_word=$2
64725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64726 $as_echo_n "checking for $ac_word... " >&6; }
64727 if ${ac_cv_path_ICECC_CMD+:} false; then :
64728   $as_echo_n "(cached) " >&6
64729 else
64730   case $ICECC_CMD in
64731   [\\/]* | ?:[\\/]*)
64732   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64733   ;;
64734   *)
64735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64736 for as_dir in $PATH
64737 do
64738   IFS=$as_save_IFS
64739   test -z "$as_dir" && as_dir=.
64740     for ac_exec_ext in '' $ac_executable_extensions; do
64741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64742     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64744     break 2
64745   fi
64746 done
64747   done
64748 IFS=$as_save_IFS
64749 
64750   ;;
64751 esac
64752 fi
64753 ICECC_CMD=$ac_cv_path_ICECC_CMD
64754 if test -n "$ICECC_CMD"; then
64755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64756 $as_echo "$ICECC_CMD" >&6; }
64757 else
64758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64759 $as_echo "no" >&6; }
64760 fi
64761 
64762 
64763   test -n "$ICECC_CMD" && break
64764 done
64765 
64766     else
64767       # If it succeeded, then it was overridden by the user. We will use it
64768       # for the tool.
64769 
64770       # First remove it from the list of overridden variables, so we can test
64771       # for unknown variables in the end.
64772       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64773 
64774       # Check if we try to supply an empty value
64775       if test "x$ICECC_CMD" = x; then
64776         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64777 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64778         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64779 $as_echo_n "checking for ICECC_CMD... " >&6; }
64780         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64781 $as_echo "disabled" >&6; }
64782       else
64783         # Check if the provided tool contains a complete path.
64784         tool_specified="$ICECC_CMD"
64785         tool_basename="${tool_specified##*/}"
64786         if test "x$tool_basename" = "x$tool_specified"; then
64787           # A command without a complete path is provided, search $PATH.
64788           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64789 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64790           # Extract the first word of "$tool_basename", so it can be a program name with args.
64791 set dummy $tool_basename; ac_word=$2
64792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64793 $as_echo_n "checking for $ac_word... " >&6; }
64794 if ${ac_cv_path_ICECC_CMD+:} false; then :
64795   $as_echo_n "(cached) " >&6
64796 else
64797   case $ICECC_CMD in
64798   [\\/]* | ?:[\\/]*)
64799   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64800   ;;
64801   *)
64802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64803 for as_dir in $PATH
64804 do
64805   IFS=$as_save_IFS
64806   test -z "$as_dir" && as_dir=.
64807     for ac_exec_ext in '' $ac_executable_extensions; do
64808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64809     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64811     break 2
64812   fi
64813 done
64814   done
64815 IFS=$as_save_IFS
64816 
64817   ;;
64818 esac
64819 fi
64820 ICECC_CMD=$ac_cv_path_ICECC_CMD
64821 if test -n "$ICECC_CMD"; then
64822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64823 $as_echo "$ICECC_CMD" >&6; }
64824 else
64825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64826 $as_echo "no" >&6; }
64827 fi
64828 
64829 
64830           if test "x$ICECC_CMD" = x; then
64831             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64832           fi
64833         else
64834           # Otherwise we believe it is a complete path. Use it as it is.
64835           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64836 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64837           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64838 $as_echo_n "checking for ICECC_CMD... " >&6; }
64839           if test ! -x "$tool_specified"; then
64840             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64841 $as_echo "not found" >&6; }
64842             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64843           fi
64844           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64845 $as_echo "$tool_specified" >&6; }
64846         fi
64847       fi
64848     fi
64849 
64850   fi
64851 
64852 
64853 
64854   if test "x$ICECC_CMD" = x; then
64855     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64856   fi
64857 
64858 
64859     old_path="$PATH"
64860 
64861     # Look for icecc-create-env in some known places
64862     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64863 
64864 
64865 
64866   # Publish this variable in the help.
64867 
64868 
64869   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64870     # The variable is not set by user, try to locate tool using the code snippet
64871     for ac_prog in icecc-create-env
64872 do
64873   # Extract the first word of "$ac_prog", so it can be a program name with args.
64874 set dummy $ac_prog; ac_word=$2
64875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64876 $as_echo_n "checking for $ac_word... " >&6; }
64877 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64878   $as_echo_n "(cached) " >&6
64879 else
64880   case $ICECC_CREATE_ENV in
64881   [\\/]* | ?:[\\/]*)
64882   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64883   ;;
64884   *)
64885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64886 for as_dir in $PATH
64887 do
64888   IFS=$as_save_IFS
64889   test -z "$as_dir" && as_dir=.
64890     for ac_exec_ext in '' $ac_executable_extensions; do
64891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64892     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64894     break 2
64895   fi
64896 done
64897   done
64898 IFS=$as_save_IFS
64899 
64900   ;;
64901 esac
64902 fi
64903 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64904 if test -n "$ICECC_CREATE_ENV"; then
64905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64906 $as_echo "$ICECC_CREATE_ENV" >&6; }
64907 else
64908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64909 $as_echo "no" >&6; }
64910 fi
64911 
64912 
64913   test -n "$ICECC_CREATE_ENV" && break
64914 done
64915 
64916   else
64917     # The variable is set, but is it from the command line or the environment?
64918 
64919     # Try to remove the string !ICECC_CREATE_ENV! from our list.
64920     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64921     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64922       # If it failed, the variable was not from the command line. Ignore it,
64923       # but warn the user (except for BASH, which is always set by the calling BASH).
64924       if test "xICECC_CREATE_ENV" != xBASH; then
64925         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64926 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64927       fi
64928       # Try to locate tool using the code snippet
64929       for ac_prog in icecc-create-env
64930 do
64931   # Extract the first word of "$ac_prog", so it can be a program name with args.
64932 set dummy $ac_prog; ac_word=$2
64933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64934 $as_echo_n "checking for $ac_word... " >&6; }
64935 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64936   $as_echo_n "(cached) " >&6
64937 else
64938   case $ICECC_CREATE_ENV in
64939   [\\/]* | ?:[\\/]*)
64940   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64941   ;;
64942   *)
64943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64944 for as_dir in $PATH
64945 do
64946   IFS=$as_save_IFS
64947   test -z "$as_dir" && as_dir=.
64948     for ac_exec_ext in '' $ac_executable_extensions; do
64949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64950     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64952     break 2
64953   fi
64954 done
64955   done
64956 IFS=$as_save_IFS
64957 
64958   ;;
64959 esac
64960 fi
64961 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64962 if test -n "$ICECC_CREATE_ENV"; then
64963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64964 $as_echo "$ICECC_CREATE_ENV" >&6; }
64965 else
64966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64967 $as_echo "no" >&6; }
64968 fi
64969 
64970 
64971   test -n "$ICECC_CREATE_ENV" && break
64972 done
64973 
64974     else
64975       # If it succeeded, then it was overridden by the user. We will use it
64976       # for the tool.
64977 
64978       # First remove it from the list of overridden variables, so we can test
64979       # for unknown variables in the end.
64980       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64981 
64982       # Check if we try to supply an empty value
64983       if test "x$ICECC_CREATE_ENV" = x; then
64984         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64985 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64987 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64989 $as_echo "disabled" >&6; }
64990       else
64991         # Check if the provided tool contains a complete path.
64992         tool_specified="$ICECC_CREATE_ENV"
64993         tool_basename="${tool_specified##*/}"
64994         if test "x$tool_basename" = "x$tool_specified"; then
64995           # A command without a complete path is provided, search $PATH.
64996           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64997 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64998           # Extract the first word of "$tool_basename", so it can be a program name with args.
64999 set dummy $tool_basename; ac_word=$2
65000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65001 $as_echo_n "checking for $ac_word... " >&6; }
65002 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65003   $as_echo_n "(cached) " >&6
65004 else
65005   case $ICECC_CREATE_ENV in
65006   [\\/]* | ?:[\\/]*)
65007   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65008   ;;
65009   *)
65010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65011 for as_dir in $PATH
65012 do
65013   IFS=$as_save_IFS
65014   test -z "$as_dir" && as_dir=.
65015     for ac_exec_ext in '' $ac_executable_extensions; do
65016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65017     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65019     break 2
65020   fi
65021 done
65022   done
65023 IFS=$as_save_IFS
65024 
65025   ;;
65026 esac
65027 fi
65028 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65029 if test -n "$ICECC_CREATE_ENV"; then
65030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65031 $as_echo "$ICECC_CREATE_ENV" >&6; }
65032 else
65033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65034 $as_echo "no" >&6; }
65035 fi
65036 
65037 
65038           if test "x$ICECC_CREATE_ENV" = x; then
65039             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65040           fi
65041         else
65042           # Otherwise we believe it is a complete path. Use it as it is.
65043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65044 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65045           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65046 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65047           if test ! -x "$tool_specified"; then
65048             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65049 $as_echo "not found" >&6; }
65050             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65051           fi
65052           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65053 $as_echo "$tool_specified" >&6; }
65054         fi
65055       fi
65056     fi
65057 
65058   fi
65059 
65060 
65061 
65062   if test "x$ICECC_CREATE_ENV" = x; then
65063     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65064   fi
65065 
65066 
65067     # Use icecc-create-env to create a minimal compilation environment that can
65068     # be sent to the other hosts in the icecream cluster.
65069     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65070     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65071     # Older versions of icecc does not have the --gcc parameter
65072     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65073       icecc_gcc_arg="--gcc"
65074     fi
65075     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65076 
65077   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65078       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65079           ${icecc_create_env_log} 2>&1 )
65080   if test "$?" != "0"; then
65081     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65082 $as_echo "$as_me: icecc-create-env output:" >&6;}
65083     cat \
65084           ${icecc_create_env_log}
65085     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65086   fi
65087 
65088     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65089       # For clang, the icecc compilerwrapper is needed. It usually resides next
65090       # to icecc-create-env.
65091 
65092 
65093 
65094   # Publish this variable in the help.
65095 
65096 
65097   if [ -z "${ICECC_WRAPPER+x}" ]; then
65098     # The variable is not set by user, try to locate tool using the code snippet
65099     for ac_prog in compilerwrapper
65100 do
65101   # Extract the first word of "$ac_prog", so it can be a program name with args.
65102 set dummy $ac_prog; ac_word=$2
65103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65104 $as_echo_n "checking for $ac_word... " >&6; }
65105 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65106   $as_echo_n "(cached) " >&6
65107 else
65108   case $ICECC_WRAPPER in
65109   [\\/]* | ?:[\\/]*)
65110   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65111   ;;
65112   *)
65113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65114 for as_dir in $PATH
65115 do
65116   IFS=$as_save_IFS
65117   test -z "$as_dir" && as_dir=.
65118     for ac_exec_ext in '' $ac_executable_extensions; do
65119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65120     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65122     break 2
65123   fi
65124 done
65125   done
65126 IFS=$as_save_IFS
65127 
65128   ;;
65129 esac
65130 fi
65131 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65132 if test -n "$ICECC_WRAPPER"; then
65133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65134 $as_echo "$ICECC_WRAPPER" >&6; }
65135 else
65136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65137 $as_echo "no" >&6; }
65138 fi
65139 
65140 
65141   test -n "$ICECC_WRAPPER" && break
65142 done
65143 
65144   else
65145     # The variable is set, but is it from the command line or the environment?
65146 
65147     # Try to remove the string !ICECC_WRAPPER! from our list.
65148     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65149     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65150       # If it failed, the variable was not from the command line. Ignore it,
65151       # but warn the user (except for BASH, which is always set by the calling BASH).
65152       if test "xICECC_WRAPPER" != xBASH; then
65153         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65154 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65155       fi
65156       # Try to locate tool using the code snippet
65157       for ac_prog in compilerwrapper
65158 do
65159   # Extract the first word of "$ac_prog", so it can be a program name with args.
65160 set dummy $ac_prog; ac_word=$2
65161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65162 $as_echo_n "checking for $ac_word... " >&6; }
65163 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65164   $as_echo_n "(cached) " >&6
65165 else
65166   case $ICECC_WRAPPER in
65167   [\\/]* | ?:[\\/]*)
65168   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65169   ;;
65170   *)
65171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65172 for as_dir in $PATH
65173 do
65174   IFS=$as_save_IFS
65175   test -z "$as_dir" && as_dir=.
65176     for ac_exec_ext in '' $ac_executable_extensions; do
65177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65178     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65180     break 2
65181   fi
65182 done
65183   done
65184 IFS=$as_save_IFS
65185 
65186   ;;
65187 esac
65188 fi
65189 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65190 if test -n "$ICECC_WRAPPER"; then
65191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65192 $as_echo "$ICECC_WRAPPER" >&6; }
65193 else
65194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65195 $as_echo "no" >&6; }
65196 fi
65197 
65198 
65199   test -n "$ICECC_WRAPPER" && break
65200 done
65201 
65202     else
65203       # If it succeeded, then it was overridden by the user. We will use it
65204       # for the tool.
65205 
65206       # First remove it from the list of overridden variables, so we can test
65207       # for unknown variables in the end.
65208       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65209 
65210       # Check if we try to supply an empty value
65211       if test "x$ICECC_WRAPPER" = x; then
65212         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65213 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65214         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65215 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65216         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65217 $as_echo "disabled" >&6; }
65218       else
65219         # Check if the provided tool contains a complete path.
65220         tool_specified="$ICECC_WRAPPER"
65221         tool_basename="${tool_specified##*/}"
65222         if test "x$tool_basename" = "x$tool_specified"; then
65223           # A command without a complete path is provided, search $PATH.
65224           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65225 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65226           # Extract the first word of "$tool_basename", so it can be a program name with args.
65227 set dummy $tool_basename; ac_word=$2
65228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65229 $as_echo_n "checking for $ac_word... " >&6; }
65230 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65231   $as_echo_n "(cached) " >&6
65232 else
65233   case $ICECC_WRAPPER in
65234   [\\/]* | ?:[\\/]*)
65235   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65236   ;;
65237   *)
65238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65239 for as_dir in $PATH
65240 do
65241   IFS=$as_save_IFS
65242   test -z "$as_dir" && as_dir=.
65243     for ac_exec_ext in '' $ac_executable_extensions; do
65244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65245     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65247     break 2
65248   fi
65249 done
65250   done
65251 IFS=$as_save_IFS
65252 
65253   ;;
65254 esac
65255 fi
65256 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65257 if test -n "$ICECC_WRAPPER"; then
65258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65259 $as_echo "$ICECC_WRAPPER" >&6; }
65260 else
65261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65262 $as_echo "no" >&6; }
65263 fi
65264 
65265 
65266           if test "x$ICECC_WRAPPER" = x; then
65267             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65268           fi
65269         else
65270           # Otherwise we believe it is a complete path. Use it as it is.
65271           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65272 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65273           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65274 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65275           if test ! -x "$tool_specified"; then
65276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65277 $as_echo "not found" >&6; }
65278             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65279           fi
65280           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65281 $as_echo "$tool_specified" >&6; }
65282         fi
65283       fi
65284     fi
65285 
65286   fi
65287 
65288 
65289 
65290   if test "x$ICECC_WRAPPER" = x; then
65291     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65292   fi
65293 
65294 
65295 
65296   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65297       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65298   if test "$?" != "0"; then
65299     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65300 $as_echo "$as_me: icecc-create-env output:" >&6;}
65301     cat ${icecc_create_env_log}
65302     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65303   fi
65304 
65305     else
65306       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65307     fi
65308     PATH="$old_path"
65309     # The bundle with the compiler gets a name based on checksums. Parse log file
65310     # to find it.
65311     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65312     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65313     if test ! -f ${ICECC_ENV_BUNDLE}; then
65314       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65315     fi
65316     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65317 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65318     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65319 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65320     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65321 
65322     if test "x${COMPILE_TYPE}" = "xcross"; then
65323       # If cross compiling, create a separate env package for the build compiler
65324       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65325       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65326       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65327 
65328   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65329       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65330             ${icecc_create_env_log_build} 2>&1 )
65331   if test "$?" != "0"; then
65332     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65333 $as_echo "$as_me: icecc-create-env output:" >&6;}
65334     cat \
65335             ${icecc_create_env_log_build}
65336     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65337   fi
65338 
65339       elif test "x${BUILD_CC##*/}" = "xclang"; then
65340 
65341   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65342       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65343   if test "$?" != "0"; then
65344     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65345 $as_echo "$as_me: icecc-create-env output:" >&6;}
65346     cat ${icecc_create_env_log_build}
65347     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65348   fi
65349 
65350       else
65351         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65352       fi
65353       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65354       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65355       if test ! -f ${ICECC_ENV_BUNDLE}; then
65356         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65357       fi
65358       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65359 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65360       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65361 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65362       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65363           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65364     else
65365       BUILD_ICECC="${ICECC}"
65366     fi
65367 
65368 
65369   fi
65370 
65371 
65372 # Can the C/C++ compiler use precompiled headers?
65373 
65374 
65375   ###############################################################################
65376   #
65377   # Can the C/C++ compiler use precompiled headers?
65378   #
65379   # Check whether --enable-precompiled-headers was given.
65380 if test "${enable_precompiled_headers+set}" = set; then :
65381   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65382 else
65383   ENABLE_PRECOMPH=yes
65384 fi
65385 
65386 
65387   USE_PRECOMPILED_HEADER=1
65388   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65389 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65390   if test "x$ENABLE_PRECOMPH" = xno; then
65391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65392 $as_echo "no, forced" >&6; }
65393     USE_PRECOMPILED_HEADER=0
65394   elif test "x$ICECC" != "x"; then
65395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65396 $as_echo "no, does not work effectively with icecc" >&6; }
65397     USE_PRECOMPILED_HEADER=0
65398   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65400 $as_echo "no, does not work with Solaris Studio" >&6; }
65401     USE_PRECOMPILED_HEADER=0
65402   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65404 $as_echo "no, does not work with xlc" >&6; }
65405     USE_PRECOMPILED_HEADER=0
65406   else
65407     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65408 $as_echo "yes" >&6; }
65409   fi
65410 
65411   if test "x$ENABLE_PRECOMPH" = xyes; then
65412     # Check that the compiler actually supports precomp headers.
65413     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65414       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65415 $as_echo_n "checking that precompiled headers work... " >&6; }
65416       echo "int alfa();" > conftest.h
65417       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65418       if test ! -f conftest.hpp.gch; then
65419         USE_PRECOMPILED_HEADER=0
65420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65421 $as_echo "no" >&6; }
65422       else
65423         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65424 $as_echo "yes" >&6; }
65425       fi
65426       $RM conftest.h conftest.hpp.gch
65427     fi
65428   fi
65429 
65430 
65431 
65432 
65433 # Setup use of ccache, if available
65434 
65435   # Check whether --enable-ccache was given.
65436 if test "${enable_ccache+set}" = set; then :
65437   enableval=$enable_ccache;
65438 fi
65439 
65440 
65441   CCACHE_STATUS=
65442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65443 $as_echo_n "checking is ccache enabled... " >&6; }
65444   if test "x$enable_ccache" = xyes; then
65445     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65447 $as_echo "yes" >&6; }
65448       OLD_PATH="$PATH"
65449       if test "x$TOOLCHAIN_PATH" != x; then
65450         PATH=$TOOLCHAIN_PATH:$PATH
65451       fi
65452 
65453 
65454 
65455   # Publish this variable in the help.
65456 
65457 
65458   if [ -z "${CCACHE+x}" ]; then
65459     # The variable is not set by user, try to locate tool using the code snippet
65460     for ac_prog in ccache
65461 do
65462   # Extract the first word of "$ac_prog", so it can be a program name with args.
65463 set dummy $ac_prog; ac_word=$2
65464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65465 $as_echo_n "checking for $ac_word... " >&6; }
65466 if ${ac_cv_path_CCACHE+:} false; then :
65467   $as_echo_n "(cached) " >&6
65468 else
65469   case $CCACHE in
65470   [\\/]* | ?:[\\/]*)
65471   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65472   ;;
65473   *)
65474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65475 for as_dir in $PATH
65476 do
65477   IFS=$as_save_IFS
65478   test -z "$as_dir" && as_dir=.
65479     for ac_exec_ext in '' $ac_executable_extensions; do
65480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65481     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65483     break 2
65484   fi
65485 done
65486   done
65487 IFS=$as_save_IFS
65488 
65489   ;;
65490 esac
65491 fi
65492 CCACHE=$ac_cv_path_CCACHE
65493 if test -n "$CCACHE"; then
65494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65495 $as_echo "$CCACHE" >&6; }
65496 else
65497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65498 $as_echo "no" >&6; }
65499 fi
65500 
65501 
65502   test -n "$CCACHE" && break
65503 done
65504 
65505   else
65506     # The variable is set, but is it from the command line or the environment?
65507 
65508     # Try to remove the string !CCACHE! from our list.
65509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65511       # If it failed, the variable was not from the command line. Ignore it,
65512       # but warn the user (except for BASH, which is always set by the calling BASH).
65513       if test "xCCACHE" != xBASH; then
65514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65515 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65516       fi
65517       # Try to locate tool using the code snippet
65518       for ac_prog in ccache
65519 do
65520   # Extract the first word of "$ac_prog", so it can be a program name with args.
65521 set dummy $ac_prog; ac_word=$2
65522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65523 $as_echo_n "checking for $ac_word... " >&6; }
65524 if ${ac_cv_path_CCACHE+:} false; then :
65525   $as_echo_n "(cached) " >&6
65526 else
65527   case $CCACHE in
65528   [\\/]* | ?:[\\/]*)
65529   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65530   ;;
65531   *)
65532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65533 for as_dir in $PATH
65534 do
65535   IFS=$as_save_IFS
65536   test -z "$as_dir" && as_dir=.
65537     for ac_exec_ext in '' $ac_executable_extensions; do
65538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65539     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65541     break 2
65542   fi
65543 done
65544   done
65545 IFS=$as_save_IFS
65546 
65547   ;;
65548 esac
65549 fi
65550 CCACHE=$ac_cv_path_CCACHE
65551 if test -n "$CCACHE"; then
65552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65553 $as_echo "$CCACHE" >&6; }
65554 else
65555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65556 $as_echo "no" >&6; }
65557 fi
65558 
65559 
65560   test -n "$CCACHE" && break
65561 done
65562 
65563     else
65564       # If it succeeded, then it was overridden by the user. We will use it
65565       # for the tool.
65566 
65567       # First remove it from the list of overridden variables, so we can test
65568       # for unknown variables in the end.
65569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65570 
65571       # Check if we try to supply an empty value
65572       if test "x$CCACHE" = x; then
65573         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65574 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65576 $as_echo_n "checking for CCACHE... " >&6; }
65577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65578 $as_echo "disabled" >&6; }
65579       else
65580         # Check if the provided tool contains a complete path.
65581         tool_specified="$CCACHE"
65582         tool_basename="${tool_specified##*/}"
65583         if test "x$tool_basename" = "x$tool_specified"; then
65584           # A command without a complete path is provided, search $PATH.
65585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65586 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65587           # Extract the first word of "$tool_basename", so it can be a program name with args.
65588 set dummy $tool_basename; ac_word=$2
65589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65590 $as_echo_n "checking for $ac_word... " >&6; }
65591 if ${ac_cv_path_CCACHE+:} false; then :
65592   $as_echo_n "(cached) " >&6
65593 else
65594   case $CCACHE in
65595   [\\/]* | ?:[\\/]*)
65596   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65597   ;;
65598   *)
65599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65600 for as_dir in $PATH
65601 do
65602   IFS=$as_save_IFS
65603   test -z "$as_dir" && as_dir=.
65604     for ac_exec_ext in '' $ac_executable_extensions; do
65605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65606     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65608     break 2
65609   fi
65610 done
65611   done
65612 IFS=$as_save_IFS
65613 
65614   ;;
65615 esac
65616 fi
65617 CCACHE=$ac_cv_path_CCACHE
65618 if test -n "$CCACHE"; then
65619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65620 $as_echo "$CCACHE" >&6; }
65621 else
65622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65623 $as_echo "no" >&6; }
65624 fi
65625 
65626 
65627           if test "x$CCACHE" = x; then
65628             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65629           fi
65630         else
65631           # Otherwise we believe it is a complete path. Use it as it is.
65632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65633 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65634           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65635 $as_echo_n "checking for CCACHE... " >&6; }
65636           if test ! -x "$tool_specified"; then
65637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65638 $as_echo "not found" >&6; }
65639             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65640           fi
65641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65642 $as_echo "$tool_specified" >&6; }
65643         fi
65644       fi
65645     fi
65646 
65647   fi
65648 
65649 
65650 
65651   if test "x$CCACHE" = x; then
65652     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65653   fi
65654 
65655 
65656       PATH="$OLD_PATH"
65657       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65658       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65659     else
65660       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65661 $as_echo "no" >&6; }
65662       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65663 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65664     fi
65665   elif test "x$enable_ccache" = xno; then
65666     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65667 $as_echo "no, explicitly disabled" >&6; }
65668     CCACHE_STATUS="Disabled"
65669   elif test "x$enable_ccache" = x; then
65670     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65671 $as_echo "no" >&6; }
65672   else
65673     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65674 $as_echo "unknown" >&6; }
65675     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65676   fi
65677 
65678 
65679 
65680 # Check whether --with-ccache-dir was given.
65681 if test "${with_ccache_dir+set}" = set; then :
65682   withval=$with_ccache_dir;
65683 fi
65684 
65685 
65686   if test "x$with_ccache_dir" != x; then
65687     # When using a non home ccache directory, assume the use is to share ccache files
65688     # with other users. Thus change the umask.
65689     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65690     if test "x$CCACHE" = x; then
65691       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65692 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65693     fi
65694   fi
65695 
65696   if test "x$CCACHE" != x; then
65697 
65698   if test "x$CCACHE" != x; then
65699     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65700       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65701           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65702       if test "x$HAS_BAD_CCACHE" != "x"; then
65703         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65704       fi
65705       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65706 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65707       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65708       PUSHED_FLAGS="$CXXFLAGS"
65709       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65710       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65711 /* end confdefs.h.  */
65712 
65713 int
65714 main ()
65715 {
65716 
65717   ;
65718   return 0;
65719 }
65720 _ACEOF
65721 if ac_fn_cxx_try_compile "$LINENO"; then :
65722   CC_KNOWS_CCACHE_TRICK=yes
65723 else
65724   CC_KNOWS_CCACHE_TRICK=no
65725 fi
65726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65727       CXXFLAGS="$PUSHED_FLAGS"
65728       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65730 $as_echo "yes" >&6; }
65731         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65732 
65733         CCACHE_SLOPPINESS=pch_defines,time_macros
65734       else
65735         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65736 $as_echo "no" >&6; }
65737         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65738       fi
65739     fi
65740 
65741     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65742         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65743 
65744     if test "x$SET_CCACHE_DIR" != x; then
65745       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65746       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65747     fi
65748   fi
65749 
65750   fi
65751 
65752 
65753 ###############################################################################
65754 #
65755 # And now the finish...
65756 #
65757 ###############################################################################
65758 
65759 # Check for some common pitfalls
65760 
65761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65762     file_to_test="$SRC_ROOT/LICENSE"
65763     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65764       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
65765     fi
65766   fi
65767 
65768 
65769   # Did user specify any unknown variables?
65770 
65771   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65772     # Replace the separating ! with spaces before presenting for end user.
65773     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65774     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65775 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65776   fi
65777 
65778 
65779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65780 $as_echo_n "checking if build directory is on local disk... " >&6; }
65781 
65782   # df -l lists only local disks; if the given directory is not found then
65783   # a non-zero exit code is given
65784   if test "x$DF" = x; then
65785     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65786       # msys does not have df; use Windows "net use" instead.
65787       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65788       if test "x$IS_NETWORK_DISK" = x; then
65789         OUTPUT_DIR_IS_LOCAL="yes"
65790       else
65791         OUTPUT_DIR_IS_LOCAL="no"
65792       fi
65793     else
65794       # No df here, say it's local
65795       OUTPUT_DIR_IS_LOCAL="yes"
65796     fi
65797   else
65798     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65799       OUTPUT_DIR_IS_LOCAL="yes"
65800     else
65801       OUTPUT_DIR_IS_LOCAL="no"
65802     fi
65803   fi
65804 
65805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65806 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65807 
65808 
65809 
65810   # Check if the user has any old-style ALT_ variables set.
65811   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65812 
65813   # Before generating output files, test if they exist. If they do, this is a reconfigure.
65814   # Since we can't properly handle the dependencies for this, warn the user about the situation
65815   if test -e $OUTPUT_ROOT/spec.gmk; then
65816     IS_RECONFIGURE=yes
65817   else
65818     IS_RECONFIGURE=no
65819   fi
65820 
65821 
65822 # At the end, call the custom hook. (Dummy macro if no custom sources available)
65823 
65824 
65825 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65826 
65827   # Keep feature lists sorted and free of duplicates
65828   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65829   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65830   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65831   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65832   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65833   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65834   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65835 
65836   # Validate features
65837   for variant in $JVM_VARIANTS; do
65838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65839 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65840     features_var_name=JVM_FEATURES_$variant
65841     JVM_FEATURES_TO_TEST=${!features_var_name}
65842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65843 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65844     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65845     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65846     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65847     if test "x$INVALID_FEATURES" != x; then
65848       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65849     fi
65850   done
65851 
65852 
65853 # We're messing a bit with internal autoconf variables to put the config.status
65854 # in the output directory instead of the current directory.
65855 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65856 
65857 # Create the actual output files. Now the main work of configure is done.
65858 cat >confcache <<\_ACEOF
65859 # This file is a shell script that caches the results of configure
65860 # tests run on this system so they can be shared between configure
65861 # scripts and configure runs, see configure's option --config-cache.
65862 # It is not useful on other systems.  If it contains results you don't
65863 # want to keep, you may remove or edit it.
65864 #
65865 # config.status only pays attention to the cache file if you give it
65866 # the --recheck option to rerun configure.
65867 #
65868 # `ac_cv_env_foo' variables (set or unset) will be overridden when
65869 # loading this file, other *unset* `ac_cv_foo' will be assigned the
65870 # following values.
65871 
65872 _ACEOF
65873 
65874 # The following way of writing the cache mishandles newlines in values,
65875 # but we know of no workaround that is simple, portable, and efficient.
65876 # So, we kill variables containing newlines.
65877 # Ultrix sh set writes to stderr and can't be redirected directly,
65878 # and sets the high bit in the cache file unless we assign to the vars.
65879 (
65880   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65881     eval ac_val=\$$ac_var
65882     case $ac_val in #(
65883     *${as_nl}*)
65884       case $ac_var in #(
65885       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65886 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65887       esac
65888       case $ac_var in #(
65889       _ | IFS | as_nl) ;; #(
65890       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65891       *) { eval $ac_var=; unset $ac_var;} ;;
65892       esac ;;
65893     esac
65894   done
65895 
65896   (set) 2>&1 |
65897     case $as_nl`(ac_space=' '; set) 2>&1` in #(
65898     *${as_nl}ac_space=\ *)
65899       # `set' does not quote correctly, so add quotes: double-quote
65900       # substitution turns \\\\ into \\, and sed turns \\ into \.
65901       sed -n \
65902         "s/'/'\\\\''/g;
65903           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65904       ;; #(
65905     *)
65906       # `set' quotes correctly as required by POSIX, so do not add quotes.
65907       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65908       ;;
65909     esac |
65910     sort
65911 ) |
65912   sed '
65913      /^ac_cv_env_/b end
65914      t clear
65915      :clear
65916      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65917      t end
65918      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65919      :end' >>confcache
65920 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65921   if test -w "$cache_file"; then
65922     if test "x$cache_file" != "x/dev/null"; then
65923       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65924 $as_echo "$as_me: updating cache $cache_file" >&6;}
65925       if test ! -f "$cache_file" || test -h "$cache_file"; then
65926         cat confcache >"$cache_file"
65927       else
65928         case $cache_file in #(
65929         */* | ?:*)
65930           mv -f confcache "$cache_file"$$ &&
65931           mv -f "$cache_file"$$ "$cache_file" ;; #(
65932         *)
65933           mv -f confcache "$cache_file" ;;
65934         esac
65935       fi
65936     fi
65937   else
65938     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65939 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65940   fi
65941 fi
65942 rm -f confcache
65943 
65944 test "x$prefix" = xNONE && prefix=$ac_default_prefix
65945 # Let make expand exec_prefix.
65946 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65947 
65948 # Transform confdefs.h into DEFS.
65949 # Protect against shell expansion while executing Makefile rules.
65950 # Protect against Makefile macro expansion.
65951 #
65952 # If the first sed substitution is executed (which looks for macros that
65953 # take arguments), then branch to the quote section.  Otherwise,
65954 # look for a macro that doesn't take arguments.
65955 ac_script='
65956 :mline
65957 /\\$/{
65958  N
65959  s,\\\n,,
65960  b mline
65961 }
65962 t clear
65963 :clear
65964 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
65965 t quote
65966 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
65967 t quote
65968 b any
65969 :quote
65970 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65971 s/\[/\\&/g
65972 s/\]/\\&/g
65973 s/\$/$$/g
65974 H
65975 :any
65976 ${
65977         g
65978         s/^\n//
65979         s/\n/ /g
65980         p
65981 }
65982 '
65983 DEFS=`sed -n "$ac_script" confdefs.h`
65984 
65985 
65986 ac_libobjs=
65987 ac_ltlibobjs=
65988 U=
65989 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65990   # 1. Remove the extension, and $U if already installed.
65991   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65992   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65993   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65994   #    will be set to the directory where LIBOBJS objects are built.
65995   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65996   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65997 done
65998 LIBOBJS=$ac_libobjs
65999 
66000 LTLIBOBJS=$ac_ltlibobjs
66001 
66002 
66003 
66004 : "${CONFIG_STATUS=./config.status}"
66005 ac_write_fail=0
66006 ac_clean_files_save=$ac_clean_files
66007 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66008 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66009 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66010 as_write_fail=0
66011 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66012 #! $SHELL
66013 # Generated by $as_me.
66014 # Run this file to recreate the current configuration.
66015 # Compiler output produced by configure, useful for debugging
66016 # configure, is in config.log if it exists.
66017 
66018 debug=false
66019 ac_cs_recheck=false
66020 ac_cs_silent=false
66021 
66022 SHELL=\${CONFIG_SHELL-$SHELL}
66023 export SHELL
66024 _ASEOF
66025 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66026 ## -------------------- ##
66027 ## M4sh Initialization. ##
66028 ## -------------------- ##
66029 
66030 # Be more Bourne compatible
66031 DUALCASE=1; export DUALCASE # for MKS sh
66032 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66033   emulate sh
66034   NULLCMD=:
66035   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66036   # is contrary to our usage.  Disable this feature.
66037   alias -g '${1+"$@"}'='"$@"'
66038   setopt NO_GLOB_SUBST
66039 else
66040   case `(set -o) 2>/dev/null` in #(
66041   *posix*) :
66042     set -o posix ;; #(
66043   *) :
66044      ;;
66045 esac
66046 fi
66047 
66048 
66049 as_nl='
66050 '
66051 export as_nl
66052 # Printing a long string crashes Solaris 7 /usr/bin/printf.
66053 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66054 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66055 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66056 # Prefer a ksh shell builtin over an external printf program on Solaris,
66057 # but without wasting forks for bash or zsh.
66058 if test -z "$BASH_VERSION$ZSH_VERSION" \
66059     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66060   as_echo='print -r --'
66061   as_echo_n='print -rn --'
66062 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66063   as_echo='printf %s\n'
66064   as_echo_n='printf %s'
66065 else
66066   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66067     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66068     as_echo_n='/usr/ucb/echo -n'
66069   else
66070     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66071     as_echo_n_body='eval
66072       arg=$1;
66073       case $arg in #(
66074       *"$as_nl"*)
66075         expr "X$arg" : "X\\(.*\\)$as_nl";
66076         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66077       esac;
66078       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66079     '
66080     export as_echo_n_body
66081     as_echo_n='sh -c $as_echo_n_body as_echo'
66082   fi
66083   export as_echo_body
66084   as_echo='sh -c $as_echo_body as_echo'
66085 fi
66086 
66087 # The user is always right.
66088 if test "${PATH_SEPARATOR+set}" != set; then
66089   PATH_SEPARATOR=:
66090   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66091     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66092       PATH_SEPARATOR=';'
66093   }
66094 fi
66095 
66096 
66097 # IFS
66098 # We need space, tab and new line, in precisely that order.  Quoting is
66099 # there to prevent editors from complaining about space-tab.
66100 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66101 # splitting by setting IFS to empty value.)
66102 IFS=" ""        $as_nl"
66103 
66104 # Find who we are.  Look in the path if we contain no directory separator.
66105 as_myself=
66106 case $0 in #((
66107   *[\\/]* ) as_myself=$0 ;;
66108   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66109 for as_dir in $PATH
66110 do
66111   IFS=$as_save_IFS
66112   test -z "$as_dir" && as_dir=.
66113     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66114   done
66115 IFS=$as_save_IFS
66116 
66117      ;;
66118 esac
66119 # We did not find ourselves, most probably we were run as `sh COMMAND'
66120 # in which case we are not to be found in the path.
66121 if test "x$as_myself" = x; then
66122   as_myself=$0
66123 fi
66124 if test ! -f "$as_myself"; then
66125   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66126   exit 1
66127 fi
66128 
66129 # Unset variables that we do not need and which cause bugs (e.g. in
66130 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66131 # suppresses any "Segmentation fault" message there.  '((' could
66132 # trigger a bug in pdksh 5.2.14.
66133 for as_var in BASH_ENV ENV MAIL MAILPATH
66134 do eval test x\${$as_var+set} = xset \
66135   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66136 done
66137 PS1='$ '
66138 PS2='> '
66139 PS4='+ '
66140 
66141 # NLS nuisances.
66142 LC_ALL=C
66143 export LC_ALL
66144 LANGUAGE=C
66145 export LANGUAGE
66146 
66147 # CDPATH.
66148 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66149 
66150 
66151 # as_fn_error STATUS ERROR [LINENO LOG_FD]
66152 # ----------------------------------------
66153 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66154 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66155 # script with STATUS, using 1 if that was 0.
66156 as_fn_error ()
66157 {
66158   as_status=$1; test $as_status -eq 0 && as_status=1
66159   if test "$4"; then
66160     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66161     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66162   fi
66163   $as_echo "$as_me: error: $2" >&2
66164   as_fn_exit $as_status
66165 } # as_fn_error
66166 
66167 
66168 # as_fn_set_status STATUS
66169 # -----------------------
66170 # Set $? to STATUS, without forking.
66171 as_fn_set_status ()
66172 {
66173   return $1
66174 } # as_fn_set_status
66175 
66176 # as_fn_exit STATUS
66177 # -----------------
66178 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66179 as_fn_exit ()
66180 {
66181   set +e
66182   as_fn_set_status $1
66183   exit $1
66184 } # as_fn_exit
66185 
66186 # as_fn_unset VAR
66187 # ---------------
66188 # Portably unset VAR.
66189 as_fn_unset ()
66190 {
66191   { eval $1=; unset $1;}
66192 }
66193 as_unset=as_fn_unset
66194 # as_fn_append VAR VALUE
66195 # ----------------------
66196 # Append the text in VALUE to the end of the definition contained in VAR. Take
66197 # advantage of any shell optimizations that allow amortized linear growth over
66198 # repeated appends, instead of the typical quadratic growth present in naive
66199 # implementations.
66200 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66201   eval 'as_fn_append ()
66202   {
66203     eval $1+=\$2
66204   }'
66205 else
66206   as_fn_append ()
66207   {
66208     eval $1=\$$1\$2
66209   }
66210 fi # as_fn_append
66211 
66212 # as_fn_arith ARG...
66213 # ------------------
66214 # Perform arithmetic evaluation on the ARGs, and store the result in the
66215 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66216 # must be portable across $(()) and expr.
66217 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66218   eval 'as_fn_arith ()
66219   {
66220     as_val=$(( $* ))
66221   }'
66222 else
66223   as_fn_arith ()
66224   {
66225     as_val=`expr "$@" || test $? -eq 1`
66226   }
66227 fi # as_fn_arith
66228 
66229 
66230 if expr a : '\(a\)' >/dev/null 2>&1 &&
66231    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66232   as_expr=expr
66233 else
66234   as_expr=false
66235 fi
66236 
66237 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66238   as_basename=basename
66239 else
66240   as_basename=false
66241 fi
66242 
66243 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66244   as_dirname=dirname
66245 else
66246   as_dirname=false
66247 fi
66248 
66249 as_me=`$as_basename -- "$0" ||
66250 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66251          X"$0" : 'X\(//\)$' \| \
66252          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66253 $as_echo X/"$0" |
66254     sed '/^.*\/\([^/][^/]*\)\/*$/{
66255             s//\1/
66256             q
66257           }
66258           /^X\/\(\/\/\)$/{
66259             s//\1/
66260             q
66261           }
66262           /^X\/\(\/\).*/{
66263             s//\1/
66264             q
66265           }
66266           s/.*/./; q'`
66267 
66268 # Avoid depending upon Character Ranges.
66269 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66270 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66271 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66272 as_cr_digits='0123456789'
66273 as_cr_alnum=$as_cr_Letters$as_cr_digits
66274 
66275 ECHO_C= ECHO_N= ECHO_T=
66276 case `echo -n x` in #(((((
66277 -n*)
66278   case `echo 'xy\c'` in
66279   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66280   xy)  ECHO_C='\c';;
66281   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66282        ECHO_T=' ';;
66283   esac;;
66284 *)
66285   ECHO_N='-n';;
66286 esac
66287 
66288 rm -f conf$$ conf$$.exe conf$$.file
66289 if test -d conf$$.dir; then
66290   rm -f conf$$.dir/conf$$.file
66291 else
66292   rm -f conf$$.dir
66293   mkdir conf$$.dir 2>/dev/null
66294 fi
66295 if (echo >conf$$.file) 2>/dev/null; then
66296   if ln -s conf$$.file conf$$ 2>/dev/null; then
66297     as_ln_s='ln -s'
66298     # ... but there are two gotchas:
66299     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66300     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66301     # In both cases, we have to default to `cp -pR'.
66302     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66303       as_ln_s='cp -pR'
66304   elif ln conf$$.file conf$$ 2>/dev/null; then
66305     as_ln_s=ln
66306   else
66307     as_ln_s='cp -pR'
66308   fi
66309 else
66310   as_ln_s='cp -pR'
66311 fi
66312 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66313 rmdir conf$$.dir 2>/dev/null
66314 
66315 
66316 # as_fn_mkdir_p
66317 # -------------
66318 # Create "$as_dir" as a directory, including parents if necessary.
66319 as_fn_mkdir_p ()
66320 {
66321 
66322   case $as_dir in #(
66323   -*) as_dir=./$as_dir;;
66324   esac
66325   test -d "$as_dir" || eval $as_mkdir_p || {
66326     as_dirs=
66327     while :; do
66328       case $as_dir in #(
66329       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66330       *) as_qdir=$as_dir;;
66331       esac
66332       as_dirs="'$as_qdir' $as_dirs"
66333       as_dir=`$as_dirname -- "$as_dir" ||
66334 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66335          X"$as_dir" : 'X\(//\)[^/]' \| \
66336          X"$as_dir" : 'X\(//\)$' \| \
66337          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66338 $as_echo X"$as_dir" |
66339     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66340             s//\1/
66341             q
66342           }
66343           /^X\(\/\/\)[^/].*/{
66344             s//\1/
66345             q
66346           }
66347           /^X\(\/\/\)$/{
66348             s//\1/
66349             q
66350           }
66351           /^X\(\/\).*/{
66352             s//\1/
66353             q
66354           }
66355           s/.*/./; q'`
66356       test -d "$as_dir" && break
66357     done
66358     test -z "$as_dirs" || eval "mkdir $as_dirs"
66359   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66360 
66361 
66362 } # as_fn_mkdir_p
66363 if mkdir -p . 2>/dev/null; then
66364   as_mkdir_p='mkdir -p "$as_dir"'
66365 else
66366   test -d ./-p && rmdir ./-p
66367   as_mkdir_p=false
66368 fi
66369 
66370 
66371 # as_fn_executable_p FILE
66372 # -----------------------
66373 # Test if FILE is an executable regular file.
66374 as_fn_executable_p ()
66375 {
66376   test -f "$1" && test -x "$1"
66377 } # as_fn_executable_p
66378 as_test_x='test -x'
66379 as_executable_p=as_fn_executable_p
66380 
66381 # Sed expression to map a string onto a valid CPP name.
66382 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66383 
66384 # Sed expression to map a string onto a valid variable name.
66385 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66386 
66387 
66388 exec 6>&1
66389 ## ----------------------------------- ##
66390 ## Main body of $CONFIG_STATUS script. ##
66391 ## ----------------------------------- ##
66392 _ASEOF
66393 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66394 
66395 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66396 # Save the log message, to keep $0 and so on meaningful, and to
66397 # report actual input values of CONFIG_FILES etc. instead of their
66398 # values after options handling.
66399 ac_log="
66400 This file was extended by OpenJDK $as_me jdk9, which was
66401 generated by GNU Autoconf 2.69.  Invocation command line was
66402 
66403   CONFIG_FILES    = $CONFIG_FILES
66404   CONFIG_HEADERS  = $CONFIG_HEADERS
66405   CONFIG_LINKS    = $CONFIG_LINKS
66406   CONFIG_COMMANDS = $CONFIG_COMMANDS
66407   $ $0 $@
66408 
66409 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66410 "
66411 
66412 _ACEOF
66413 
66414 case $ac_config_files in *"
66415 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66416 esac
66417 
66418 
66419 
66420 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66421 # Files that config.status was made for.
66422 config_files="$ac_config_files"
66423 
66424 _ACEOF
66425 
66426 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66427 ac_cs_usage="\
66428 \`$as_me' instantiates files and other configuration actions
66429 from templates according to the current configuration.  Unless the files
66430 and actions are specified as TAGs, all are instantiated by default.
66431 
66432 Usage: $0 [OPTION]... [TAG]...
66433 
66434   -h, --help       print this help, then exit
66435   -V, --version    print version number and configuration settings, then exit
66436       --config     print configuration, then exit
66437   -q, --quiet, --silent
66438                    do not print progress messages
66439   -d, --debug      don't remove temporary files
66440       --recheck    update $as_me by reconfiguring in the same conditions
66441       --file=FILE[:TEMPLATE]
66442                    instantiate the configuration file FILE
66443 
66444 Configuration files:
66445 $config_files
66446 
66447 Report bugs to <build-dev@openjdk.java.net>.
66448 OpenJDK home page: <http://openjdk.java.net>."
66449 
66450 _ACEOF
66451 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66452 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66453 ac_cs_version="\\
66454 OpenJDK config.status jdk9
66455 configured by $0, generated by GNU Autoconf 2.69,
66456   with options \\"\$ac_cs_config\\"
66457 
66458 Copyright (C) 2012 Free Software Foundation, Inc.
66459 This config.status script is free software; the Free Software Foundation
66460 gives unlimited permission to copy, distribute and modify it."
66461 
66462 ac_pwd='$ac_pwd'
66463 srcdir='$srcdir'
66464 AWK='$AWK'
66465 test -n "\$AWK" || AWK=awk
66466 _ACEOF
66467 
66468 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66469 # The default lists apply if the user does not specify any file.
66470 ac_need_defaults=:
66471 while test $# != 0
66472 do
66473   case $1 in
66474   --*=?*)
66475     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66476     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66477     ac_shift=:
66478     ;;
66479   --*=)
66480     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66481     ac_optarg=
66482     ac_shift=:
66483     ;;
66484   *)
66485     ac_option=$1
66486     ac_optarg=$2
66487     ac_shift=shift
66488     ;;
66489   esac
66490 
66491   case $ac_option in
66492   # Handling of the options.
66493   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66494     ac_cs_recheck=: ;;
66495   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66496     $as_echo "$ac_cs_version"; exit ;;
66497   --config | --confi | --conf | --con | --co | --c )
66498     $as_echo "$ac_cs_config"; exit ;;
66499   --debug | --debu | --deb | --de | --d | -d )
66500     debug=: ;;
66501   --file | --fil | --fi | --f )
66502     $ac_shift
66503     case $ac_optarg in
66504     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66505     '') as_fn_error $? "missing file argument" ;;
66506     esac
66507     as_fn_append CONFIG_FILES " '$ac_optarg'"
66508     ac_need_defaults=false;;
66509   --he | --h |  --help | --hel | -h )
66510     $as_echo "$ac_cs_usage"; exit ;;
66511   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66512   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66513     ac_cs_silent=: ;;
66514 
66515   # This is an error.
66516   -*) as_fn_error $? "unrecognized option: \`$1'
66517 Try \`$0 --help' for more information." ;;
66518 
66519   *) as_fn_append ac_config_targets " $1"
66520      ac_need_defaults=false ;;
66521 
66522   esac
66523   shift
66524 done
66525 
66526 ac_configure_extra_args=
66527 
66528 if $ac_cs_silent; then
66529   exec 6>/dev/null
66530   ac_configure_extra_args="$ac_configure_extra_args --silent"
66531 fi
66532 
66533 _ACEOF
66534 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66535 if \$ac_cs_recheck; then
66536   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66537   shift
66538   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66539   CONFIG_SHELL='$SHELL'
66540   export CONFIG_SHELL
66541   exec "\$@"
66542 fi
66543 
66544 _ACEOF
66545 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66546 exec 5>>config.log
66547 {
66548   echo
66549   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66550 ## Running $as_me. ##
66551 _ASBOX
66552   $as_echo "$ac_log"
66553 } >&5
66554 
66555 _ACEOF
66556 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66557 _ACEOF
66558 
66559 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66560 
66561 # Handling of arguments.
66562 for ac_config_target in $ac_config_targets
66563 do
66564   case $ac_config_target in
66565     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66566     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66567     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66568     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66569     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66570 
66571   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66572   esac
66573 done
66574 
66575 
66576 # If the user did not use the arguments to specify the items to instantiate,
66577 # then the envvar interface is used.  Set only those that are not.
66578 # We use the long form for the default assignment because of an extremely
66579 # bizarre bug on SunOS 4.1.3.
66580 if $ac_need_defaults; then
66581   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66582 fi
66583 
66584 # Have a temporary directory for convenience.  Make it in the build tree
66585 # simply because there is no reason against having it here, and in addition,
66586 # creating and moving files from /tmp can sometimes cause problems.
66587 # Hook for its removal unless debugging.
66588 # Note that there is a small window in which the directory will not be cleaned:
66589 # after its creation but before its name has been assigned to `$tmp'.
66590 $debug ||
66591 {
66592   tmp= ac_tmp=
66593   trap 'exit_status=$?
66594   : "${ac_tmp:=$tmp}"
66595   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66596 ' 0
66597   trap 'as_fn_exit 1' 1 2 13 15
66598 }
66599 # Create a (secure) tmp directory for tmp files.
66600 
66601 {
66602   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66603   test -d "$tmp"
66604 }  ||
66605 {
66606   tmp=./conf$$-$RANDOM
66607   (umask 077 && mkdir "$tmp")
66608 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66609 ac_tmp=$tmp
66610 
66611 # Set up the scripts for CONFIG_FILES section.
66612 # No need to generate them if there are no CONFIG_FILES.
66613 # This happens for instance with `./config.status config.h'.
66614 if test -n "$CONFIG_FILES"; then
66615 
66616 
66617 ac_cr=`echo X | tr X '\015'`
66618 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66619 # But we know of no other shell where ac_cr would be empty at this
66620 # point, so we can use a bashism as a fallback.
66621 if test "x$ac_cr" = x; then
66622   eval ac_cr=\$\'\\r\'
66623 fi
66624 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66625 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66626   ac_cs_awk_cr='\\r'
66627 else
66628   ac_cs_awk_cr=$ac_cr
66629 fi
66630 
66631 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66632 _ACEOF
66633 
66634 
66635 {
66636   echo "cat >conf$$subs.awk <<_ACEOF" &&
66637   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66638   echo "_ACEOF"
66639 } >conf$$subs.sh ||
66640   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66641 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66642 ac_delim='%!_!# '
66643 for ac_last_try in false false false false false :; do
66644   . ./conf$$subs.sh ||
66645     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66646 
66647   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66648   if test $ac_delim_n = $ac_delim_num; then
66649     break
66650   elif $ac_last_try; then
66651     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66652   else
66653     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66654   fi
66655 done
66656 rm -f conf$$subs.sh
66657 
66658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66659 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66660 _ACEOF
66661 sed -n '
66662 h
66663 s/^/S["/; s/!.*/"]=/
66664 p
66665 g
66666 s/^[^!]*!//
66667 :repl
66668 t repl
66669 s/'"$ac_delim"'$//
66670 t delim
66671 :nl
66672 h
66673 s/\(.\{148\}\)..*/\1/
66674 t more1
66675 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66676 p
66677 n
66678 b repl
66679 :more1
66680 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66681 p
66682 g
66683 s/.\{148\}//
66684 t nl
66685 :delim
66686 h
66687 s/\(.\{148\}\)..*/\1/
66688 t more2
66689 s/["\\]/\\&/g; s/^/"/; s/$/"/
66690 p
66691 b
66692 :more2
66693 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66694 p
66695 g
66696 s/.\{148\}//
66697 t delim
66698 ' <conf$$subs.awk | sed '
66699 /^[^""]/{
66700   N
66701   s/\n//
66702 }
66703 ' >>$CONFIG_STATUS || ac_write_fail=1
66704 rm -f conf$$subs.awk
66705 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66706 _ACAWK
66707 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66708   for (key in S) S_is_set[key] = 1
66709   FS = ""
66710 
66711 }
66712 {
66713   line = $ 0
66714   nfields = split(line, field, "@")
66715   substed = 0
66716   len = length(field[1])
66717   for (i = 2; i < nfields; i++) {
66718     key = field[i]
66719     keylen = length(key)
66720     if (S_is_set[key]) {
66721       value = S[key]
66722       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66723       len += length(value) + length(field[++i])
66724       substed = 1
66725     } else
66726       len += 1 + keylen
66727   }
66728 
66729   print line
66730 }
66731 
66732 _ACAWK
66733 _ACEOF
66734 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66735 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66736   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66737 else
66738   cat
66739 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66740   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66741 _ACEOF
66742 
66743 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66744 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66745 # trailing colons and then remove the whole line if VPATH becomes empty
66746 # (actually we leave an empty line to preserve line numbers).
66747 if test "x$srcdir" = x.; then
66748   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66749 h
66750 s///
66751 s/^/:/
66752 s/[      ]*$/:/
66753 s/:\$(srcdir):/:/g
66754 s/:\${srcdir}:/:/g
66755 s/:@srcdir@:/:/g
66756 s/^:*//
66757 s/:*$//
66758 x
66759 s/\(=[   ]*\).*/\1/
66760 G
66761 s/\n//
66762 s/^[^=]*=[       ]*$//
66763 }'
66764 fi
66765 
66766 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66767 fi # test -n "$CONFIG_FILES"
66768 
66769 
66770 eval set X "  :F $CONFIG_FILES      "
66771 shift
66772 for ac_tag
66773 do
66774   case $ac_tag in
66775   :[FHLC]) ac_mode=$ac_tag; continue;;
66776   esac
66777   case $ac_mode$ac_tag in
66778   :[FHL]*:*);;
66779   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66780   :[FH]-) ac_tag=-:-;;
66781   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66782   esac
66783   ac_save_IFS=$IFS
66784   IFS=:
66785   set x $ac_tag
66786   IFS=$ac_save_IFS
66787   shift
66788   ac_file=$1
66789   shift
66790 
66791   case $ac_mode in
66792   :L) ac_source=$1;;
66793   :[FH])
66794     ac_file_inputs=
66795     for ac_f
66796     do
66797       case $ac_f in
66798       -) ac_f="$ac_tmp/stdin";;
66799       *) # Look for the file first in the build tree, then in the source tree
66800          # (if the path is not absolute).  The absolute path cannot be DOS-style,
66801          # because $ac_f cannot contain `:'.
66802          test -f "$ac_f" ||
66803            case $ac_f in
66804            [\\/$]*) false;;
66805            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66806            esac ||
66807            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66808       esac
66809       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66810       as_fn_append ac_file_inputs " '$ac_f'"
66811     done
66812 
66813     # Let's still pretend it is `configure' which instantiates (i.e., don't
66814     # use $as_me), people would be surprised to read:
66815     #    /* config.h.  Generated by config.status.  */
66816     configure_input='Generated from '`
66817           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66818         `' by configure.'
66819     if test x"$ac_file" != x-; then
66820       configure_input="$ac_file.  $configure_input"
66821       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66822 $as_echo "$as_me: creating $ac_file" >&6;}
66823     fi
66824     # Neutralize special characters interpreted by sed in replacement strings.
66825     case $configure_input in #(
66826     *\&* | *\|* | *\\* )
66827        ac_sed_conf_input=`$as_echo "$configure_input" |
66828        sed 's/[\\\\&|]/\\\\&/g'`;; #(
66829     *) ac_sed_conf_input=$configure_input;;
66830     esac
66831 
66832     case $ac_tag in
66833     *:-:* | *:-) cat >"$ac_tmp/stdin" \
66834       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66835     esac
66836     ;;
66837   esac
66838 
66839   ac_dir=`$as_dirname -- "$ac_file" ||
66840 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66841          X"$ac_file" : 'X\(//\)[^/]' \| \
66842          X"$ac_file" : 'X\(//\)$' \| \
66843          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66844 $as_echo X"$ac_file" |
66845     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66846             s//\1/
66847             q
66848           }
66849           /^X\(\/\/\)[^/].*/{
66850             s//\1/
66851             q
66852           }
66853           /^X\(\/\/\)$/{
66854             s//\1/
66855             q
66856           }
66857           /^X\(\/\).*/{
66858             s//\1/
66859             q
66860           }
66861           s/.*/./; q'`
66862   as_dir="$ac_dir"; as_fn_mkdir_p
66863   ac_builddir=.
66864 
66865 case "$ac_dir" in
66866 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66867 *)
66868   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66869   # A ".." for each directory in $ac_dir_suffix.
66870   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66871   case $ac_top_builddir_sub in
66872   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66873   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66874   esac ;;
66875 esac
66876 ac_abs_top_builddir=$ac_pwd
66877 ac_abs_builddir=$ac_pwd$ac_dir_suffix
66878 # for backward compatibility:
66879 ac_top_builddir=$ac_top_build_prefix
66880 
66881 case $srcdir in
66882   .)  # We are building in place.
66883     ac_srcdir=.
66884     ac_top_srcdir=$ac_top_builddir_sub
66885     ac_abs_top_srcdir=$ac_pwd ;;
66886   [\\/]* | ?:[\\/]* )  # Absolute name.
66887     ac_srcdir=$srcdir$ac_dir_suffix;
66888     ac_top_srcdir=$srcdir
66889     ac_abs_top_srcdir=$srcdir ;;
66890   *) # Relative name.
66891     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66892     ac_top_srcdir=$ac_top_build_prefix$srcdir
66893     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66894 esac
66895 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66896 
66897 
66898   case $ac_mode in
66899   :F)
66900   #
66901   # CONFIG_FILE
66902   #
66903 
66904 _ACEOF
66905 
66906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66907 # If the template does not know about datarootdir, expand it.
66908 # FIXME: This hack should be removed a few years after 2.60.
66909 ac_datarootdir_hack=; ac_datarootdir_seen=
66910 ac_sed_dataroot='
66911 /datarootdir/ {
66912   p
66913   q
66914 }
66915 /@datadir@/p
66916 /@docdir@/p
66917 /@infodir@/p
66918 /@localedir@/p
66919 /@mandir@/p'
66920 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66921 *datarootdir*) ac_datarootdir_seen=yes;;
66922 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66923   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66924 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66925 _ACEOF
66926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66927   ac_datarootdir_hack='
66928   s&@datadir@&$datadir&g
66929   s&@docdir@&$docdir&g
66930   s&@infodir@&$infodir&g
66931   s&@localedir@&$localedir&g
66932   s&@mandir@&$mandir&g
66933   s&\\\${datarootdir}&$datarootdir&g' ;;
66934 esac
66935 _ACEOF
66936 
66937 # Neutralize VPATH when `$srcdir' = `.'.
66938 # Shell code in configure.ac might set extrasub.
66939 # FIXME: do we really want to maintain this feature?
66940 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66941 ac_sed_extra="$ac_vpsub
66942 $extrasub
66943 _ACEOF
66944 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66945 :t
66946 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66947 s|@configure_input@|$ac_sed_conf_input|;t t
66948 s&@top_builddir@&$ac_top_builddir_sub&;t t
66949 s&@top_build_prefix@&$ac_top_build_prefix&;t t
66950 s&@srcdir@&$ac_srcdir&;t t
66951 s&@abs_srcdir@&$ac_abs_srcdir&;t t
66952 s&@top_srcdir@&$ac_top_srcdir&;t t
66953 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66954 s&@builddir@&$ac_builddir&;t t
66955 s&@abs_builddir@&$ac_abs_builddir&;t t
66956 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66957 $ac_datarootdir_hack
66958 "
66959 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66960   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66961 
66962 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66963   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66964   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
66965       "$ac_tmp/out"`; test -z "$ac_out"; } &&
66966   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66967 which seems to be undefined.  Please make sure it is defined" >&5
66968 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66969 which seems to be undefined.  Please make sure it is defined" >&2;}
66970 
66971   rm -f "$ac_tmp/stdin"
66972   case $ac_file in
66973   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66974   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66975   esac \
66976   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66977  ;;
66978 
66979 
66980 
66981   esac
66982 
66983 done # for ac_tag
66984 
66985 
66986 as_fn_exit 0
66987 _ACEOF
66988 ac_clean_files=$ac_clean_files_save
66989 
66990 test $ac_write_fail = 0 ||
66991   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66992 
66993 
66994 # configure is writing to config.log, and then calls config.status.
66995 # config.status does its own redirection, appending to config.log.
66996 # Unfortunately, on DOS this fails, as config.log is still kept open
66997 # by configure, so config.status won't be able to write to it; its
66998 # output is simply discarded.  So we exec the FD to /dev/null,
66999 # effectively closing config.log, so it can be properly (re)opened and
67000 # appended to by config.status.  When coming back to configure, we
67001 # need to make the FD available again.
67002 if test "$no_create" != yes; then
67003   ac_cs_success=:
67004   ac_config_status_args=
67005   test "$silent" = yes &&
67006     ac_config_status_args="$ac_config_status_args --quiet"
67007   exec 5>/dev/null
67008   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67009   exec 5>>config.log
67010   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67011   # would make configure fail if this is the last instruction.
67012   $ac_cs_success || as_fn_exit 1
67013 fi
67014 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67015   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67016 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67017 fi
67018 
67019 
67020 # After AC_OUTPUT, we need to do final work
67021 
67022 
67023   # Try to move config.log (generated by autoconf) to the configure-support directory.
67024   if test -e ./config.log; then
67025     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67026   fi
67027 
67028   # Rotate our log file (configure.log)
67029   if test -e "$OUTPUT_ROOT/configure.log.old"; then
67030     $RM -f "$OUTPUT_ROOT/configure.log.old"
67031   fi
67032   if test -e "$OUTPUT_ROOT/configure.log"; then
67033     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67034   fi
67035 
67036   # Move configure.log from current directory to the build output root
67037   if test -e ./configure.log; then
67038     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67039   fi
67040 
67041   # Make the compare script executable
67042   $CHMOD +x $OUTPUT_ROOT/compare.sh
67043 
67044 
67045 # Finally output some useful information to the user
67046 
67047   # Finally output some useful information to the user
67048 
67049   printf "\n"
67050   printf "====================================================\n"
67051   if test "x$no_create" != "xyes"; then
67052     if test "x$IS_RECONFIGURE" != "xyes"; then
67053       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67054     else
67055       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67056     fi
67057   else
67058     if test "x$IS_RECONFIGURE" != "xyes"; then
67059       printf "A configuration has been successfully checked but not created\n"
67060     else
67061       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67062     fi
67063   fi
67064   if test "x$CONFIGURE_COMMAND_LINE" != x; then
67065     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67066   else
67067     printf "using default settings.\n"
67068   fi
67069 
67070   printf "\n"
67071   printf "Configuration summary:\n"
67072   printf "* Debug level:    $DEBUG_LEVEL\n"
67073   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67074   printf "* JDK variant:    $JDK_VARIANT\n"
67075   printf "* JVM variants:   $JVM_VARIANTS\n"
67076   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67077   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67078 
67079   printf "\n"
67080   printf "Tools summary:\n"
67081   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67082     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67083   fi
67084   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67085   if test "x$TOOLCHAIN_VERSION" != "x"; then
67086     print_version=" $TOOLCHAIN_VERSION"
67087   fi
67088   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67089   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67090   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67091 
67092   printf "\n"
67093   printf "Build performance summary:\n"
67094   printf "* Cores to use:   $JOBS\n"
67095   printf "* Memory limit:   $MEMORY_SIZE MB\n"
67096   if test "x$CCACHE_STATUS" != "x"; then
67097     printf "* ccache status:  $CCACHE_STATUS\n"
67098   fi
67099   printf "\n"
67100 
67101   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67102     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67103     printf "will result in longer build times.\n"
67104     printf "\n"
67105   fi
67106 
67107   if test "x$FOUND_ALT_VARIABLES" != "x"; then
67108     printf "WARNING: You have old-style ALT_ environment variables set.\n"
67109     printf "These are not respected, and will be ignored. It is recommended\n"
67110     printf "that you clean your environment. The following variables are set:\n"
67111     printf "$FOUND_ALT_VARIABLES\n"
67112     printf "\n"
67113   fi
67114 
67115   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67116     printf "WARNING: Your build output directory is not on a local disk.\n"
67117     printf "This will severely degrade build performance!\n"
67118     printf "It is recommended that you create an output directory on a local disk,\n"
67119     printf "and run the configure script again from that directory.\n"
67120     printf "\n"
67121   fi
67122 
67123   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67124     printf "WARNING: The result of this configuration has overridden an older\n"
67125     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67126     printf "proper build. Failure to do so might result in strange build problems.\n"
67127     printf "\n"
67128   fi
67129 
67130   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67131     printf "WARNING: The result of this configuration was not saved.\n"
67132     printf "You should run without '--no-create | -n' to create the configuration.\n"
67133     printf "\n"
67134   fi
67135 
67136 
67137 
67138   # Locate config.log.
67139   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67140     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67141   elif test -e "./config.log"; then
67142     CONFIG_LOG_PATH="."
67143   fi
67144 
67145   if test -e "$CONFIG_LOG_PATH/config.log"; then
67146     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67147     if test $? -eq 0; then
67148       printf "The following warnings were produced. Repeated here for convenience:\n"
67149       # We must quote sed expression (using []) to stop m4 from eating the [].
67150       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67151       printf "\n"
67152     fi
67153   fi
67154